mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-10 07:50:19 +00:00
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:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user