From b419804ddb0ab7597463eb850bed319717132bdd Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 18 Feb 2026 00:05:44 -0700 Subject: [PATCH] Updated GTK3 icon resolution so gtkutil_image_new_from_stock() now preserves zc-menu-* icon IDs (when no stock-to-theme mapping exists), allowing those items to load directly from the data/icons/menu resource set instead of falling back inconsistently to theme icon names. Updated channel list popup menu icon creation to pass the original icon ID directly into the shared loader, so those menu items use the same icon pipeline and set as other menus (data/icons/menu). --- src/fe-gtk/chanlist.c | 6 +----- src/fe-gtk/gtkutil.c | 2 ++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/fe-gtk/chanlist.c b/src/fe-gtk/chanlist.c index 6a739dbc..eec1cbae 100644 --- a/src/fe-gtk/chanlist.c +++ b/src/fe-gtk/chanlist.c @@ -153,14 +153,10 @@ chanlist_icon_menu_item (const char *label, const char *icon_name, GtkWidget *box; GtkWidget *image = NULL; GtkWidget *label_widget; - const char *icon_name_gtk3; item = gtk_menu_item_new (); box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); - icon_name_gtk3 = gtkutil_icon_name_from_stock (icon_name); - if (!icon_name_gtk3) - icon_name_gtk3 = icon_name; - image = icon_name_gtk3 ? gtkutil_image_new_from_stock (icon_name_gtk3, GTK_ICON_SIZE_MENU) : NULL; + image = icon_name ? gtkutil_image_new_from_stock (icon_name, GTK_ICON_SIZE_MENU) : NULL; label_widget = gtk_label_new_with_mnemonic (label); if (image) gtk_box_pack_start (GTK_BOX (box), image, FALSE, FALSE, 0); diff --git a/src/fe-gtk/gtkutil.c b/src/fe-gtk/gtkutil.c index eda10867..7794b050 100644 --- a/src/fe-gtk/gtkutil.c +++ b/src/fe-gtk/gtkutil.c @@ -247,6 +247,8 @@ gtkutil_image_new_from_stock (const char *stock, GtkIconSize size) const char *icon_name; icon_name = gtkutil_icon_name_from_stock (stock); + if (!icon_name && stock && g_str_has_prefix (stock, "zc-menu-")) + icon_name = stock; if (size == GTK_ICON_SIZE_MENU) { const char *menu_icon_name = gtkutil_menu_custom_icon_from_stock (stock);