mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-10 16:00:18 +00:00
Standardized GTK3 menu-related icon constants to the bundled zc-menu-* namespace so menu actions stop depending on mixed system-theme icon names (edit-copy, view-refresh, etc.) and instead use the same internal set. This was updated in channel list, plugin manager, URL grabber, and spell-entry menu definitions.
Updated GTK3 icon rendering paths in affected UI helpers to call gtkutil_image_new_from_stock(...), which is the path that resolves zc-menu-* resources correctly and consistently from data/icons/menu (instead of raw theme lookup). Added new icons to the shared bundled menu icon set (light/dark) for copy, delete, add, remove, spell-check, and refresh, and registered them in the GResource manifest so they are always available at runtime.
This commit is contained in:
@@ -47,9 +47,9 @@
|
||||
|
||||
#if HAVE_GTK3
|
||||
#define ICON_CHANLIST_JOIN "zc-menu-join"
|
||||
#define ICON_CHANLIST_COPY "edit-copy"
|
||||
#define ICON_CHANLIST_COPY "zc-menu-copy"
|
||||
#define ICON_CHANLIST_FIND "zc-menu-find"
|
||||
#define ICON_CHANLIST_REFRESH "view-refresh"
|
||||
#define ICON_CHANLIST_REFRESH "zc-menu-refresh"
|
||||
#define ICON_CHANLIST_SAVE "zc-menu-save"
|
||||
#endif
|
||||
#if !HAVE_GTK3
|
||||
@@ -132,7 +132,7 @@ chanlist_icon_button (const char *label, const char *icon_name,
|
||||
|
||||
button = gtk_button_new_with_mnemonic (label);
|
||||
#if HAVE_GTK3
|
||||
image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
|
||||
image = gtkutil_image_new_from_stock (icon_name, GTK_ICON_SIZE_MENU);
|
||||
#elif !HAVE_GTK3
|
||||
image = gtk_image_new_from_stock (icon_name, GTK_ICON_SIZE_MENU);
|
||||
#endif
|
||||
@@ -160,7 +160,7 @@ chanlist_icon_menu_item (const char *label, const char *icon_name,
|
||||
icon_name_gtk3 = gtkutil_icon_name_from_stock (icon_name);
|
||||
if (!icon_name_gtk3)
|
||||
icon_name_gtk3 = icon_name;
|
||||
image = icon_name_gtk3 ? gtk_image_new_from_icon_name (icon_name_gtk3, GTK_ICON_SIZE_MENU) : NULL;
|
||||
image = icon_name_gtk3 ? gtkutil_image_new_from_stock (icon_name_gtk3, 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);
|
||||
|
||||
@@ -66,8 +66,8 @@ plugingui_get_target_session (void)
|
||||
|
||||
#if HAVE_GTK3
|
||||
#define ICON_PLUGIN_LOAD "zc-menu-load-plugin"
|
||||
#define ICON_PLUGIN_UNLOAD "edit-delete"
|
||||
#define ICON_PLUGIN_RELOAD "view-refresh"
|
||||
#define ICON_PLUGIN_UNLOAD "zc-menu-delete"
|
||||
#define ICON_PLUGIN_RELOAD "zc-menu-refresh"
|
||||
#endif
|
||||
#if !HAVE_GTK3
|
||||
#define ICON_PLUGIN_LOAD GTK_STOCK_REVERT_TO_SAVED
|
||||
@@ -85,7 +85,7 @@ plugingui_icon_button (GtkWidget *box, const char *label,
|
||||
GtkWidget *image;
|
||||
|
||||
button = gtk_button_new_with_mnemonic (label);
|
||||
image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
|
||||
image = gtkutil_image_new_from_stock (icon_name, GTK_ICON_SIZE_MENU);
|
||||
gtk_button_set_image (GTK_BUTTON (button), image);
|
||||
gtk_button_set_use_underline (GTK_BUTTON (button), TRUE);
|
||||
gtk_container_add (GTK_CONTAINER (box), button);
|
||||
|
||||
@@ -60,9 +60,9 @@
|
||||
#endif
|
||||
|
||||
#if HAVE_GTK3
|
||||
#define ICON_ADD "list-add"
|
||||
#define ICON_REMOVE "list-remove"
|
||||
#define ICON_SPELL_CHECK "tools-check-spelling"
|
||||
#define ICON_ADD "zc-menu-add"
|
||||
#define ICON_REMOVE "zc-menu-remove"
|
||||
#define ICON_SPELL_CHECK "zc-menu-spell-check"
|
||||
#endif
|
||||
#if !HAVE_GTK3
|
||||
#define ICON_ADD GTK_STOCK_ADD
|
||||
@@ -737,7 +737,7 @@ sexy_spell_entry_icon_menu_item (const char *label, const char *stock_name)
|
||||
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);
|
||||
image = gtkutil_image_new_from_stock (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);
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
#if HAVE_GTK3
|
||||
#define ICON_URLGRAB_CLEAR "zc-menu-clear"
|
||||
#define ICON_URLGRAB_COPY "edit-copy"
|
||||
#define ICON_URLGRAB_COPY "zc-menu-copy"
|
||||
#define ICON_URLGRAB_SAVE_AS "zc-menu-save"
|
||||
#endif
|
||||
#if !HAVE_GTK3
|
||||
|
||||
Reference in New Issue
Block a user