Expanded GTK3 icon-menu construction in menu.c to build menu items with a GtkBox, GtkImage, and mnemonic label when using icon names.

Updated channel list icon menu items to build GTK3 menu items with GtkBox/GtkImage/GtkLabel while preserving GTK2 GtkImageMenuItem paths.
Updated sexy spell entry icon menu items to build GTK3 menu items with GtkBox/GtkImage/GtkLabel while preserving GTK2 GtkImageMenuItem paths
This commit is contained in:
2026-01-23 16:00:02 -07:00
parent b0a9f34dc4
commit 5538e738a8
3 changed files with 18 additions and 31 deletions

View File

@@ -124,11 +124,12 @@ chanlist_icon_button (const char *label, const char *icon_name,
return button;
}
#if HAVE_GTK3
static GtkWidget *
chanlist_menu_item_new_with_icon (const char *label, const char *icon_name)
chanlist_icon_menu_item (const char *label, const char *icon_name,
GCallback callback, gpointer userdata)
{
GtkWidget *item;
#if HAVE_GTK3
GtkWidget *box;
GtkWidget *image = NULL;
GtkWidget *label_widget;
@@ -142,18 +143,6 @@ chanlist_menu_item_new_with_icon (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);
return item;
}
#endif
static GtkWidget *
chanlist_icon_menu_item (const char *label, const char *icon_name,
GCallback callback, gpointer userdata)
{
GtkWidget *item;
#if HAVE_GTK3
item = chanlist_menu_item_new_with_icon (label, icon_name);
#endif
#if !HAVE_GTK3
GtkWidget *image;