Added per-file ICON_* macros with GTK3 icon-name mappings and GTK2 stock fallbacks across GTK UI modules like banlist, DCC, editlist, ignore, URL grabber, notify, text events, tray menu, chanview tabs, and join dialog UI.

Updated GTK helper usages to reference the new ICON_* (and label) macros so GTK3 builds no longer pass stock IDs to button/icon helpers or dialogs, including banlist buttons, DCC windows, rawlog actions, notify dialog/buttons, pevent dialog buttons, tray menu items, and join dialog image helper usage.
This commit is contained in:
2026-01-30 09:23:52 -07:00
parent e0c1796035
commit b48376c370
12 changed files with 165 additions and 37 deletions

View File

@@ -37,6 +37,17 @@
#include "maingui.h"
#include "banlist.h"
#if HAVE_GTK3
#define ICON_BANLIST_REMOVE "list-remove"
#define ICON_BANLIST_CLEAR "edit-clear"
#define ICON_BANLIST_REFRESH "view-refresh"
#endif
#if !HAVE_GTK3
#define ICON_BANLIST_REMOVE GTK_STOCK_REMOVE
#define ICON_BANLIST_CLEAR GTK_STOCK_CLEAR
#define ICON_BANLIST_REFRESH GTK_STOCK_REFRESH
#endif
/*
* These supports_* routines set capable, readable, writable bits */
static void supports_bans (banlist_info *, int);
@@ -860,14 +871,14 @@ banlist_opengui (struct session *sess)
gtk_box_pack_end (GTK_BOX (vbox), bbox, 0, 0, 0);
gtk_widget_show (bbox);
banl->but_remove = gtkutil_button (bbox, GTK_STOCK_REMOVE, 0, banlist_unban, banl,
banl->but_remove = gtkutil_button (bbox, ICON_BANLIST_REMOVE, 0, banlist_unban, banl,
_("Remove"));
banl->but_crop = gtkutil_button (bbox, GTK_STOCK_REMOVE, 0, banlist_crop, banl,
banl->but_crop = gtkutil_button (bbox, ICON_BANLIST_REMOVE, 0, banlist_crop, banl,
_("Crop"));
banl->but_clear = gtkutil_button (bbox, GTK_STOCK_CLEAR, 0, banlist_clear, banl,
banl->but_clear = gtkutil_button (bbox, ICON_BANLIST_CLEAR, 0, banlist_clear, banl,
_("Clear"));
banl->but_refresh = gtkutil_button (bbox, GTK_STOCK_REFRESH, 0, banlist_refresh, banl, _("Refresh"));
banl->but_refresh = gtkutil_button (bbox, ICON_BANLIST_REFRESH, 0, banlist_refresh, banl, _("Refresh"));
banlist_do_refresh (banl);