Consolidated the GTK3/GTK2 branching for icon menu items in menu_quick_item and create_icon_menu to use the GtkMenuItem + GtkBox path under GTK3 and GtkImageMenuItem under GTK2.

Unified the GTK3/GTK2 icon menu item construction branches in the channel list menu helper to match the GtkBox + GtkImage + GtkLabel pattern for GTK3 while preserving GTK2 behavior.
Aligned the spelling menu icon item helper with the same GTK3/GTK2 branching structure, keeping GTK2 GtkImageMenuItem intact.
This commit is contained in:
2026-01-23 18:01:07 -07:00
parent c2e8507402
commit fd83f3636d
3 changed files with 4 additions and 8 deletions

View File

@@ -142,8 +142,7 @@ 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);
#endif
#if !HAVE_GTK3
#else
GtkWidget *image;
item = gtk_image_menu_item_new_with_mnemonic (label);

View File

@@ -316,8 +316,7 @@ menu_quick_item (char *cmd, char *label, GtkWidget * menu, int flags,
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
item = gtk_image_menu_item_new_with_mnemonic (label);
if (img)
gtk_image_menu_item_set_image ((GtkImageMenuItem *)item, img);
@@ -2043,8 +2042,7 @@ create_icon_menu (char *labeltext, void *stock_name, int is_stock)
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
item = gtk_image_menu_item_new_with_mnemonic (labeltext);
gtk_image_menu_item_set_image ((GtkImageMenuItem *)item, img);
gtk_widget_show (img);

View File

@@ -649,8 +649,7 @@ 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);
#endif
#if !HAVE_GTK3
#else
GtkWidget *image;
item = gtk_image_menu_item_new_with_label (label);