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

@@ -283,12 +283,22 @@ menu_item_new_with_image_and_label (GtkWidget *image, const char *label)
static GtkWidget *
menu_item_new_with_icon_name_and_label (const char *icon_name, const char *label)
{
GtkWidget *item;
GtkWidget *box;
GtkWidget *image = NULL;
GtkWidget *label_widget;
item = gtk_menu_item_new ();
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
if (icon_name)
image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
label_widget = gtk_label_new_with_mnemonic (label);
if (image)
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 menu_item_new_with_image_and_label (image, label);
return item;
}
#endif