--- a/ui/gtk/list.c Thu Nov 21 13:17:56 2024 +0100 +++ b/ui/gtk/list.c Thu Nov 21 18:45:47 2024 +0100 @@ -37,6 +37,7 @@ #include "list.h" #include "icon.h" +#include "menu.h" void* ui_strmodel_getvalue(void *elm, int column) { @@ -235,6 +236,10 @@ G_CALLBACK(ui_listview_selection_event), event); } + if(args.contextmenu) { + UIMENU menu = ui_contextmenu_create(args.contextmenu, obj, view); + ui_widget_set_contextmenu(view, menu); + } // add widget to the current container @@ -396,7 +401,11 @@ event); } // TODO: destroy callback - + + if(args.contextmenu) { + UIMENU menu = ui_contextmenu_create(args.contextmenu, obj, view); + ui_widget_set_contextmenu(view, menu); + } GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(view)); if(args.multiselection) {