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