mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-10 07:50:19 +00:00
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:
@@ -37,6 +37,19 @@
|
||||
#include "palette.h"
|
||||
#include "notifygui.h"
|
||||
|
||||
#if HAVE_GTK3
|
||||
#define ICON_NOTIFY_NEW "document-new"
|
||||
#define ICON_NOTIFY_DELETE "edit-delete"
|
||||
#define LABEL_NOTIFY_CANCEL _("_Cancel")
|
||||
#define LABEL_NOTIFY_OK _("_OK")
|
||||
#endif
|
||||
#if !HAVE_GTK3
|
||||
#define ICON_NOTIFY_NEW GTK_STOCK_NEW
|
||||
#define ICON_NOTIFY_DELETE GTK_STOCK_DELETE
|
||||
#define LABEL_NOTIFY_CANCEL GTK_STOCK_CANCEL
|
||||
#define LABEL_NOTIFY_OK GTK_STOCK_OK
|
||||
#endif
|
||||
|
||||
|
||||
/* model for the notify treeview */
|
||||
enum
|
||||
@@ -373,8 +386,8 @@ fe_notify_ask (char *nick, char *networks)
|
||||
char buf[256];
|
||||
|
||||
dialog = gtk_dialog_new_with_buttons (msg, NULL, 0,
|
||||
GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
|
||||
GTK_STOCK_OK, GTK_RESPONSE_ACCEPT,
|
||||
LABEL_NOTIFY_CANCEL, GTK_RESPONSE_REJECT,
|
||||
LABEL_NOTIFY_OK, GTK_RESPONSE_ACCEPT,
|
||||
NULL);
|
||||
if (parent_window)
|
||||
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (parent_window));
|
||||
@@ -450,11 +463,11 @@ notify_opengui (void)
|
||||
gtk_box_pack_end (GTK_BOX (vbox), bbox, 0, 0, 0);
|
||||
gtk_widget_show (bbox);
|
||||
|
||||
gtkutil_button (bbox, GTK_STOCK_NEW, 0, notify_add_clicked, 0,
|
||||
gtkutil_button (bbox, ICON_NOTIFY_NEW, 0, notify_add_clicked, 0,
|
||||
_("Add..."));
|
||||
|
||||
notify_button_remove =
|
||||
gtkutil_button (bbox, GTK_STOCK_DELETE, 0, notify_remove_clicked, 0,
|
||||
gtkutil_button (bbox, ICON_NOTIFY_DELETE, 0, notify_remove_clicked, 0,
|
||||
_("Remove"));
|
||||
|
||||
notify_button_opendialog =
|
||||
|
||||
Reference in New Issue
Block a user