ui/gtk/tree.c

changeset 75
efe2f65bea17
parent 69
419c8c3209e8
child 86
3c63f57a8f77
equal deleted inserted replaced
74:55718d4ed227 75:efe2f65bea17
99 GTK_POLICY_AUTOMATIC); // GTK_POLICY_ALWAYS 99 GTK_POLICY_AUTOMATIC); // GTK_POLICY_ALWAYS
100 gtk_container_add(GTK_CONTAINER(scroll_area), view); 100 gtk_container_add(GTK_CONTAINER(scroll_area), view);
101 101
102 UiContainer *ct = uic_get_current_container(obj); 102 UiContainer *ct = uic_get_current_container(obj);
103 ct->add(ct, scroll_area, TRUE); 103 ct->add(ct, scroll_area, TRUE);
104
105 // ct->current should point to view, not scroll_area, to make it possible
106 // to add a context menu
107 ct->current = view;
104 108
105 return scroll_area; 109 return scroll_area;
106 } 110 }
107 111
108 UIWIDGET ui_listview(UiObject *obj, UiList *list, ui_model_getvalue_f getvalue, ui_callback f, void *udata) { 112 UIWIDGET ui_listview(UiObject *obj, UiList *list, ui_model_getvalue_f getvalue, ui_callback f, void *udata) {
195 gtk_container_add(GTK_CONTAINER(scroll_area), view); 199 gtk_container_add(GTK_CONTAINER(scroll_area), view);
196 200
197 UiContainer *ct = uic_get_current_container(obj); 201 UiContainer *ct = uic_get_current_container(obj);
198 ct->add(ct, scroll_area, TRUE); 202 ct->add(ct, scroll_area, TRUE);
199 203
204 // ct->current should point to view, not scroll_area, to make it possible
205 // to add a context menu
206 ct->current = view;
207
200 return scroll_area; 208 return scroll_area;
201 } 209 }
202 210
203 UIWIDGET ui_table(UiObject *obj, UiList *list, UiModelInfo *modelinfo) { 211 UIWIDGET ui_table(UiObject *obj, UiList *list, UiModelInfo *modelinfo) {
204 UiListPtr *listptr = ucx_mempool_malloc(obj->ctx->mempool, sizeof(UiListPtr)); 212 UiListPtr *listptr = ucx_mempool_malloc(obj->ctx->mempool, sizeof(UiListPtr));

mercurial