233 selection, |
234 selection, |
234 "changed", |
235 "changed", |
235 G_CALLBACK(ui_listview_selection_event), |
236 G_CALLBACK(ui_listview_selection_event), |
236 event); |
237 event); |
237 } |
238 } |
|
239 if(args.contextmenu) { |
|
240 UIMENU menu = ui_contextmenu_create(args.contextmenu, obj, view); |
|
241 ui_widget_set_contextmenu(view, menu); |
|
242 } |
238 |
243 |
239 |
244 |
240 // add widget to the current container |
245 // add widget to the current container |
241 GtkWidget *scroll_area = SCROLLEDWINDOW_NEW(); |
246 GtkWidget *scroll_area = SCROLLEDWINDOW_NEW(); |
242 gtk_scrolled_window_set_policy( |
247 gtk_scrolled_window_set_policy( |
394 "changed", |
399 "changed", |
395 G_CALLBACK(ui_listview_selection_event), |
400 G_CALLBACK(ui_listview_selection_event), |
396 event); |
401 event); |
397 } |
402 } |
398 // TODO: destroy callback |
403 // TODO: destroy callback |
399 |
404 |
|
405 if(args.contextmenu) { |
|
406 UIMENU menu = ui_contextmenu_create(args.contextmenu, obj, view); |
|
407 ui_widget_set_contextmenu(view, menu); |
|
408 } |
400 |
409 |
401 GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(view)); |
410 GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(view)); |
402 if(args.multiselection) { |
411 if(args.multiselection) { |
403 gtk_tree_selection_set_mode(selection, GTK_SELECTION_MULTIPLE); |
412 gtk_tree_selection_set_mode(selection, GTK_SELECTION_MULTIPLE); |
404 } |
413 } |