ui/gtk/tree.c

changeset 29
3fc287f06305
parent 0
2483f517c562
child 32
e5f4d8af567e
--- a/ui/gtk/tree.c	Sun Feb 11 15:59:56 2024 +0100
+++ b/ui/gtk/tree.c	Mon Feb 12 17:32:02 2024 +0100
@@ -43,9 +43,7 @@
 }
 
 
-UIWIDGET ui_listview_str(UiObject *obj, UiList *list, ui_callback f, void *udata) {
-    return ui_listview(obj, list, ui_strmodel_getvalue, f, udata);
-}
+
 
 UIWIDGET ui_listview_var(UiObject *obj, UiVar *var, ui_getvaluefunc getvalue, ui_callback f, void *udata) {
     // create treeview
@@ -119,7 +117,7 @@
     return scroll_area;
 }
 
-UIWIDGET ui_listview(UiObject *obj, UiList *list, ui_getvaluefunc getvalue, ui_callback f, void *udata) {
+UIWIDGET ui_listview_deprecated(UiObject *obj, UiList *list, ui_getvaluefunc getvalue, ui_callback f, void *udata) {
     UiVar *var = malloc(sizeof(UiVar));
     var->value = list;
     var->type = UI_VAR_SPECIAL;
@@ -270,7 +268,7 @@
     return scroll_area;
 }
 
-UIWIDGET ui_table(UiObject *obj, UiList *list, UiModel *model, UiListCallbacks cb) {
+UIWIDGET ui_table_deprecated(UiObject *obj, UiList *list, UiModel *model, UiListCallbacks cb) {
     UiVar *var = malloc(sizeof(UiVar));
     var->value = list;
     var->type = UI_VAR_SPECIAL;
@@ -329,10 +327,14 @@
     int nelm;
     char **targets = targets2array(target0, ap, &nelm);
     va_end(ap);
-    ui_table_dragsource_a(tablewidget, actions, targets, nelm);
+    
+    // disabled
+    //ui_table_dragsource_a(tablewidget, actions, targets, nelm);
+    
     free(targets);
 }
 
+/*
 void ui_table_dragsource_a(UIWIDGET tablewidget, int actions, char **targets, int nelm) {
     GtkTargetEntry* t = targetstr2gtktargets(targets, nelm);
     gtk_tree_view_enable_model_drag_source(
@@ -344,6 +346,7 @@
     free(t);
 }
 
+
 void ui_table_dragdest(UIWIDGET tablewidget, int actions, char *target0, ...) {
     va_list ap;
     va_start(ap, target0);
@@ -363,7 +366,8 @@
             GDK_ACTION_COPY|GDK_ACTION_MOVE|GDK_ACTION_LINK);
     free(t);
 }
-
+*/
+ 
 void ui_listview_update(UiList *list, int i) {
     UiListView *view = list->obj;
     UiListModel *model = ui_list_model_new(view->obj, view->var, view->model);
@@ -464,11 +468,7 @@
 
 /* --------------------------- ComboBox ---------------------------  */
 
-UIWIDGET ui_combobox_str(UiObject *obj, UiList *list, ui_callback f, void *udata) {
-    return ui_combobox(obj, list, ui_strmodel_getvalue, f, udata);
-}
-
-UIWIDGET ui_combobox(UiObject *obj, UiList *list, ui_getvaluefunc getvalue, ui_callback f, void *udata) {
+UIWIDGET ui_combobox_deprecated(UiObject *obj, UiList *list, ui_getvaluefunc getvalue, ui_callback f, void *udata) {
     UiVar *var = malloc(sizeof(UiVar));
     var->value = list;
     var->type = UI_VAR_SPECIAL;

mercurial