From 8642d8bde4eda4acf3ac110a5785af3853b424cc Mon Sep 17 00:00:00 2001 From: deepend Date: Tue, 17 Feb 2026 23:44:22 -0700 Subject: [PATCH] Updated the Network List menu entry to use the same menu icon mechanism as the other iconized menu items by switching it from M_MENUPIX (pix_book) to M_MENUSTOCK with a zc-menu-* icon name (zc-menu-network-list). Added the new network-list SVG icon in both light and dark variants under data/icons/menu, so it comes from the same icon set as the rest of the menu icons. Registered both new icon files in the compiled GResource manifest so they are available through the existing resource-loading path. --- data/icons/menu/dark/network-list.svg | 5 +++++ data/icons/menu/light/network-list.svg | 5 +++++ data/zoitechat.gresource.xml | 2 ++ src/fe-gtk/menu.c | 4 +++- 4 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 data/icons/menu/dark/network-list.svg create mode 100644 data/icons/menu/light/network-list.svg diff --git a/data/icons/menu/dark/network-list.svg b/data/icons/menu/dark/network-list.svg new file mode 100644 index 00000000..d1875770 --- /dev/null +++ b/data/icons/menu/dark/network-list.svg @@ -0,0 +1,5 @@ + diff --git a/data/icons/menu/light/network-list.svg b/data/icons/menu/light/network-list.svg new file mode 100644 index 00000000..d76e703e --- /dev/null +++ b/data/icons/menu/light/network-list.svg @@ -0,0 +1,5 @@ + diff --git a/data/zoitechat.gresource.xml b/data/zoitechat.gresource.xml index d4d87c3f..8ff44484 100644 --- a/data/zoitechat.gresource.xml +++ b/data/zoitechat.gresource.xml @@ -22,6 +22,7 @@ icons/tree_util.png icons/menu/light/new.svg + icons/menu/light/network-list.svg icons/menu/light/load-plugin.svg icons/menu/light/detach.svg icons/menu/light/close.svg @@ -39,6 +40,7 @@ icons/menu/light/about.svg icons/menu/dark/new.svg + icons/menu/dark/network-list.svg icons/menu/dark/load-plugin.svg icons/menu/dark/detach.svg icons/menu/dark/close.svg diff --git a/src/fe-gtk/menu.c b/src/fe-gtk/menu.c index 4b3f2c69..e9d23756 100644 --- a/src/fe-gtk/menu.c +++ b/src/fe-gtk/menu.c @@ -1974,6 +1974,7 @@ menu_about (GtkWidget *wid, gpointer sess) #if HAVE_GTK3 #define ICON_NEW "zc-menu-new" +#define ICON_NETWORK_LIST "zc-menu-network-list" #define ICON_LOAD_PLUGIN "zc-menu-load-plugin" #define ICON_DETACH "zc-menu-detach" #define ICON_CLOSE "zc-menu-close" @@ -1992,6 +1993,7 @@ menu_about (GtkWidget *wid, gpointer sess) #endif #if !HAVE_GTK3 #define ICON_NEW GTK_STOCK_NEW +#define ICON_NETWORK_LIST GTK_STOCK_INDEX #define ICON_LOAD_PLUGIN GTK_STOCK_REVERT_TO_SAVED #define ICON_DETACH GTK_STOCK_REDO #define ICON_CLOSE GTK_STOCK_CLOSE @@ -2096,7 +2098,7 @@ menu_icon_image_from_data_icons (const char *icon_name, const char *theme_varian static struct mymenu mymenu[] = { {N_("_ZoiteChat"), 0, 0, M_NEWMENU, MENU_ID_ZOITECHAT, 0, 1}, - {N_("Network Li_st"), menu_open_server_list, (char *)&pix_book, M_MENUPIX, 0, 0, 1, GDK_KEY_s}, + {N_("Network Li_st"), menu_open_server_list, ICON_NETWORK_LIST, M_MENUSTOCK, 0, 0, 1, GDK_KEY_s}, {0, 0, 0, M_SEP, 0, 0, 0}, {N_("_New"), 0, ICON_NEW, M_MENUSUB, 0, 0, 1},