mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-18 11:40:18 +00:00
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
This commit is contained in:
@@ -276,6 +276,10 @@ menu_icon_name_from_stock (const char *stock_name)
|
|||||||
return "document-save";
|
return "document-save";
|
||||||
if (strcmp (stock_name, "gtk-save-as") == 0)
|
if (strcmp (stock_name, "gtk-save-as") == 0)
|
||||||
return "document-save-as";
|
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)
|
if (strcmp (stock_name, "gtk-copy") == 0)
|
||||||
return "edit-copy";
|
return "edit-copy";
|
||||||
if (strcmp (stock_name, "gtk-delete") == 0)
|
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);
|
gtk_menu_popup_at_pointer (GTK_MENU (menu), NULL);
|
||||||
}
|
}
|
||||||
#endif
|
#else
|
||||||
#if !HAVE_GTK3
|
|
||||||
gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL,
|
gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL,
|
||||||
0, event ? event->time : 0);
|
0, event ? event->time : 0);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user