From d7966a72343294dbdb3806226a259eae36bc7e19 Mon Sep 17 00:00:00 2001 From: deepend Date: Fri, 23 Jan 2026 09:07:23 -0700 Subject: [PATCH] Clarified GTK3 vs. GTK2 icon macro guards in the channel list and plugin UI sources to keep named icons for GTK3 and stock icons for GTK2 builds. Split GTK3/GTK2 popup handling into explicit conditional blocks and made GTK3/GTK2 menu icon definitions explicit in the menu implementation. --- src/fe-gtk/chanlist.c | 6 ++++-- src/fe-gtk/menu.c | 6 ++++-- src/fe-gtk/plugingui.c | 3 ++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/fe-gtk/chanlist.c b/src/fe-gtk/chanlist.c index 346da8da..1dafcb7b 100644 --- a/src/fe-gtk/chanlist.c +++ b/src/fe-gtk/chanlist.c @@ -51,7 +51,8 @@ #define ICON_CHANLIST_FIND "edit-find" #define ICON_CHANLIST_REFRESH "view-refresh" #define ICON_CHANLIST_SAVE "document-save-as" -#else +#endif +#if !HAVE_GTK3 #define ICON_CHANLIST_JOIN GTK_STOCK_JUMP_TO #define ICON_CHANLIST_COPY GTK_STOCK_COPY #define ICON_CHANLIST_FIND GTK_STOCK_FIND @@ -735,7 +736,8 @@ chanlist_button_cb (GtkTreeView *tree, GdkEventButton *event, server *serv) GDK_GRAVITY_NORTH_WEST, NULL); } -#else +#endif +#if !HAVE_GTK3 gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, 0, event ? event->time : 0); #endif diff --git a/src/fe-gtk/menu.c b/src/fe-gtk/menu.c index da0fcb65..07cc61b0 100644 --- a/src/fe-gtk/menu.c +++ b/src/fe-gtk/menu.c @@ -596,7 +596,8 @@ menu_popup (GtkWidget *menu, GdkEventButton *event, gpointer objtounref) { gtk_menu_popup_at_pointer (GTK_MENU (menu), NULL); } -#else +#endif +#if !HAVE_GTK3 gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, 0, event ? event->time : 0); #endif @@ -1841,7 +1842,8 @@ menu_about (GtkWidget *wid, gpointer sess) #define ICON_FIND "edit-find" #define ICON_HELP "help-browser" #define ICON_ABOUT "help-about" -#else +#endif +#if !HAVE_GTK3 #define ICON_NEW GTK_STOCK_NEW #define ICON_LOAD_PLUGIN GTK_STOCK_REVERT_TO_SAVED #define ICON_DETACH GTK_STOCK_REDO diff --git a/src/fe-gtk/plugingui.c b/src/fe-gtk/plugingui.c index 9b7dd771..b3dba975 100644 --- a/src/fe-gtk/plugingui.c +++ b/src/fe-gtk/plugingui.c @@ -52,7 +52,8 @@ static GtkWidget *plugin_window = NULL; #define ICON_PLUGIN_LOAD "document-open" #define ICON_PLUGIN_UNLOAD "edit-delete" #define ICON_PLUGIN_RELOAD "view-refresh" -#else +#endif +#if !HAVE_GTK3 #define ICON_PLUGIN_LOAD GTK_STOCK_REVERT_TO_SAVED #define ICON_PLUGIN_UNLOAD GTK_STOCK_DELETE #define ICON_PLUGIN_RELOAD GTK_STOCK_REFRESH