Wed, 22 Nov 2017 09:49:26 +0100
fixes uic_copy_binding
application/main.c | file | annotate | diff | comparison | revisions | |
ui/common/context.c | file | annotate | diff | comparison | revisions | |
ui/gtk/tree.c | file | annotate | diff | comparison | revisions | |
ui/gtk/tree.h | file | annotate | diff | comparison | revisions | |
ui/ui/tree.h | file | annotate | diff | comparison | revisions |
--- a/application/main.c Wed Nov 22 08:47:52 2017 +0100 +++ b/application/main.c Wed Nov 22 09:49:26 2017 +0100 @@ -109,11 +109,10 @@ doc->progress = ui_double_new(ctx, "progress"); doc->list = ui_list_new(ctx, "list"); - printf("doc list: %d\n", doc->list); - Entry *e1 = malloc(sizeof(Entry)); + Entry *e1 = calloc(1, sizeof(Entry)); e1->name = "test"; e1->desc = "test file"; - Entry *e2 = malloc(sizeof(Entry)); + Entry *e2 = calloc(1, sizeof(Entry)); e2->name = str; e2->desc = "important document"; ui_list_append(doc->list, e1); @@ -134,10 +133,9 @@ } void action_newdoc(UiEvent *event, void *data) { - printf("new doc\n"); + printf("new doc;\n "); Document *newd = next_doc(); - printf("newd: %d\n", (int)(intptr_t)newd); ui_set_document(event->obj, newd); }
--- a/ui/common/context.c Wed Nov 22 08:47:52 2017 +0100 +++ b/ui/common/context.c Wed Nov 22 09:49:26 2017 +0100 @@ -296,6 +296,7 @@ if(!f->obj) break; uic_list_copy(f, t); t->update(t, -1); + break; } case UI_VAR_RANGE: { UiRange *f = fromvalue; @@ -305,6 +306,7 @@ t->setextent(t, t->extent); t->setrange(t, t->min, t->max); t->set(t, t->value); + break; } } }
--- a/ui/gtk/tree.c Wed Nov 22 08:47:52 2017 +0100 +++ b/ui/gtk/tree.c Wed Nov 22 09:49:26 2017 +0100 @@ -258,6 +258,7 @@ event); } // TODO: destroy callback + GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(view)); gtk_tree_selection_set_mode(selection, GTK_SELECTION_MULTIPLE); @@ -335,6 +336,7 @@ void ui_table_dragsource(UIWIDGET tablewidget, int actions, char *target0, ...) { va_list ap; + va_start(ap, target0); int nelm; char **targets = targets2array(target0, ap, &nelm); va_end(ap); @@ -355,6 +357,7 @@ void ui_table_dragdest(UIWIDGET tablewidget, int actions, char *target0, ...) { va_list ap; + va_start(ap, target0); int nelm; char **targets = targets2array(target0, ap, &nelm); va_end(ap);
--- a/ui/gtk/tree.h Wed Nov 22 08:47:52 2017 +0100 +++ b/ui/gtk/tree.h Wed Nov 22 09:49:26 2017 +0100 @@ -39,7 +39,6 @@ typedef struct UiListView { UiObject *obj; - //UiContext *ctx; GtkWidget *widget; UiVar *var; UiModel *model;
--- a/ui/ui/tree.h Wed Nov 22 08:47:52 2017 +0100 +++ b/ui/ui/tree.h Wed Nov 22 09:49:26 2017 +0100 @@ -39,8 +39,6 @@ typedef struct UiListCallbacks UiListCallbacks; typedef struct UiListSelection UiListSelection; -typedef void*(*ui_getvaluefunc)(void*,int); - typedef enum UiModelType { UI_STRING = 0, UI_INTEGER,