ui/gtk/tree.c

changeset 123
55adc92e7c09
parent 116
480354705c2f
child 124
80609f9675f1
equal deleted inserted replaced
122:e82b01d17a78 123:55adc92e7c09
53 GtkTreeViewColumn *column = gtk_tree_view_column_new_with_attributes(NULL, renderer, "text", 0, NULL); 53 GtkTreeViewColumn *column = gtk_tree_view_column_new_with_attributes(NULL, renderer, "text", 0, NULL);
54 gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); 54 gtk_tree_view_append_column(GTK_TREE_VIEW(view), column);
55 55
56 gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(view), FALSE); 56 gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(view), FALSE);
57 #ifdef UI_GTK3 57 #ifdef UI_GTK3
58 #if GTK_MINOR_VERSION >= 8
58 gtk_tree_view_set_activate_on_single_click(GTK_TREE_VIEW(view), TRUE); 59 gtk_tree_view_set_activate_on_single_click(GTK_TREE_VIEW(view), TRUE);
59 #else 60 #else
60 61 // TODO: implement for older gtk3
62 #endif
63 #else
64 // TODO: implement for gtk2
61 #endif 65 #endif
62 66
63 UiModelInfo *modelinfo = ui_model_info(obj->ctx, UI_STRING, "", -1); 67 UiModelInfo *modelinfo = ui_model_info(obj->ctx, UI_STRING, "", -1);
64 modelinfo->getvalue = getvalue; 68 modelinfo->getvalue = getvalue;
65 UiListModel *model = ui_list_model_new(list, modelinfo); 69 UiListModel *model = ui_list_model_new(list, modelinfo);

mercurial