mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-11 08:20:17 +00:00
Made the GTK3 vs GTK2 icon menu item paths explicit in menu_quick_item, keeping the GTK3 boxed menu item and guarding the GtkImageMenuItem path under #if !HAVE_GTK3.
Updated the chanlist icon menu item to keep the GTK2 GtkImageMenuItem logic under #if !HAVE_GTK3. Updated the spelling menu icon item to keep the GTK2 GtkImageMenuItem logic under #if !HAVE_GTK3.
This commit is contained in:
@@ -142,7 +142,8 @@ chanlist_icon_menu_item (const char *label, const char *icon_name,
|
||||
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);
|
||||
#else
|
||||
#endif
|
||||
#if !HAVE_GTK3
|
||||
GtkWidget *image;
|
||||
|
||||
item = gtk_image_menu_item_new_with_mnemonic (label);
|
||||
|
||||
@@ -298,7 +298,8 @@ menu_quick_item (char *cmd, char *label, GtkWidget * menu, int flags,
|
||||
#if HAVE_GTK3
|
||||
icon_name = gtkutil_icon_name_from_stock (icon);
|
||||
img = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
|
||||
#else
|
||||
#endif
|
||||
#if !HAVE_GTK3
|
||||
img = gtk_image_new_from_stock (icon, GTK_ICON_SIZE_MENU);
|
||||
#endif
|
||||
}
|
||||
@@ -313,7 +314,8 @@ menu_quick_item (char *cmd, char *label, GtkWidget * menu, int flags,
|
||||
gtk_box_pack_start (GTK_BOX (box), img, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (box), label_widget, FALSE, FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (item), box);
|
||||
#else
|
||||
#endif
|
||||
#if !HAVE_GTK3
|
||||
item = gtk_image_menu_item_new_with_mnemonic (label);
|
||||
if (img)
|
||||
gtk_image_menu_item_set_image ((GtkImageMenuItem *)item, img);
|
||||
|
||||
@@ -648,7 +648,8 @@ sexy_spell_entry_icon_menu_item (const char *label, const char *stock_name)
|
||||
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);
|
||||
#else
|
||||
#endif
|
||||
#if !HAVE_GTK3
|
||||
GtkWidget *image;
|
||||
|
||||
item = gtk_image_menu_item_new_with_label (label);
|
||||
|
||||
Reference in New Issue
Block a user