From 7f05fda41a04ae84da708ce6e740782f5f05ea08 Mon Sep 17 00:00:00 2001 From: deepend Date: Fri, 23 Jan 2026 09:23:34 -0700 Subject: [PATCH] Added GTK3 named icon mappings for cancel/ok stock identifiers to align menu imagery with icon-name usage. Clarified GTK3 vs GTK2 popup menu handling with an explicit conditional split while preserving GTK2 fallback behavior --- src/fe-gtk/menu.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/fe-gtk/menu.c b/src/fe-gtk/menu.c index 4fbefae4..f6d17da6 100644 --- a/src/fe-gtk/menu.c +++ b/src/fe-gtk/menu.c @@ -276,6 +276,10 @@ menu_icon_name_from_stock (const char *stock_name) return "document-save"; if (strcmp (stock_name, "gtk-save-as") == 0) return "document-save-as"; + if (strcmp (stock_name, "gtk-cancel") == 0) + return "dialog-cancel"; + if (strcmp (stock_name, "gtk-ok") == 0) + return "dialog-ok"; if (strcmp (stock_name, "gtk-copy") == 0) return "edit-copy"; if (strcmp (stock_name, "gtk-delete") == 0) @@ -650,8 +654,7 @@ menu_popup (GtkWidget *menu, GdkEventButton *event, gpointer objtounref) { gtk_menu_popup_at_pointer (GTK_MENU (menu), NULL); } -#endif -#if !HAVE_GTK3 +#else gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, 0, event ? event->time : 0); #endif