fix gtk3 tableview contextmenu newapi

Fri, 29 Nov 2024 22:02:38 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Fri, 29 Nov 2024 22:02:38 +0100
branch
newapi
changeset 401
55fb6bad549d
parent 400
a1946c97de09
child 402
96a055be7f0b

fix gtk3 tableview contextmenu

ui/gtk/list.c file | annotate | diff | comparison | revisions
--- a/ui/gtk/list.c	Fri Nov 29 21:54:41 2024 +0100
+++ b/ui/gtk/list.c	Fri Nov 29 22:02:38 2024 +0100
@@ -435,7 +435,11 @@
     
     if(args.contextmenu) {
         UIMENU menu = ui_contextmenu_create(args.contextmenu, obj, scroll_area);
+#if GTK_MAJOR_VERSION >= 4
         ui_widget_set_contextmenu(scroll_area, menu);
+#else
+        ui_widget_set_contextmenu(view, menu);
+#endif
     }
     
     UI_APPLY_LAYOUT1(current, args);

mercurial