mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-14 09:40:20 +00:00
Restructured icon menu item creation in menu_quick_item to use explicit GTK3 GtkMenuItem + GtkBox + GtkImage/GtkLabel handling with a GTK2 GtkImageMenuItem fallback.
Added GTK3 image null checks and explicit GTK3/GTK2 branching for chanlist icon menu items. Added GTK3 image null checks and explicit GTK3/GTK2 branching for sexy spell entry icon menu items.
This commit is contained in:
@@ -138,11 +138,11 @@ chanlist_icon_menu_item (const char *label, const char *icon_name,
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
||||
image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
|
||||
label_widget = gtk_label_new_with_mnemonic (label);
|
||||
gtk_box_pack_start (GTK_BOX (box), image, FALSE, FALSE, 0);
|
||||
if (image)
|
||||
gtk_box_pack_start (GTK_BOX (box), image, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (box), label_widget, FALSE, FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (item), box);
|
||||
#endif
|
||||
#if !HAVE_GTK3
|
||||
#else
|
||||
GtkWidget *image;
|
||||
|
||||
item = gtk_image_menu_item_new_with_mnemonic (label);
|
||||
|
||||
Reference in New Issue
Block a user