Happy Christmas Eve.
Me again, trying to do more weird things with menus. Now I'm trying to get a menuitem to use markup. I dug around this forum for a few hours and pestered google to no avail.
I tried this and many variants of this, but it seems menuitems do not like their labels set this way:
Code:
gchar *text = "Label with <b>bold</b>";
menuitem1 = gtk_image_menu_item_new ( );
GtkWidget *label1 = gtk_label_new ( NULL );
gtk_label_set_markup_with_mnemonic ( GTK_LABEL(label1), text );
gtk_widget_add_mnemonic_label ( GTK_WIDGET(menuitem1), label1 );
It compiles fine, but segfaults with:
Code:
(deskmenu:10550): Gtk-CRITICAL **: gtk_widget_get_pango_context: assertion `GTK_IS_WIDGET (widget)' failed
(deskmenu:10550): Pango-CRITICAL **: pango_context_get_language: assertion `context != NULL' failed
Segmentation fault
Any notions?