Fri, 09 Nov 2018 15:43:46 +0100
fixes ui_textfield_set (Motif)
application/main.c | file | annotate | diff | comparison | revisions | |
ui/common/context.c | file | annotate | diff | comparison | revisions | |
ui/motif/text.c | file | annotate | diff | comparison | revisions |
--- a/application/main.c Sun Jul 01 19:03:26 2018 +0200 +++ b/application/main.c Fri Nov 09 15:43:46 2018 +0100 @@ -97,26 +97,26 @@ Document *doc = ui_document_new(sizeof(Document)); UiContext *ctx = ui_document_context(doc); - doc->text = ui_text_new(ctx, "text"); + //doc->text = ui_text_new(ctx, "text"); doc->t1 = ui_string_new(ctx, "t1"); - doc->t2 = ui_string_new(ctx, "t2"); - doc->t3 = ui_string_new(ctx, "t3"); + //doc->t2 = ui_string_new(ctx, "t2"); + //doc->t3 = ui_string_new(ctx, "t3"); - doc->i = ui_int_new(ctx, "int"); - doc->d = ui_double_new(ctx, "d"); - doc->r = ui_range_new(ctx, "r"); + //doc->i = ui_int_new(ctx, "int"); + //doc->d = ui_double_new(ctx, "d"); + //->r = ui_range_new(ctx, "r"); - doc->progress = ui_double_new(ctx, "progress"); + //doc->progress = ui_double_new(ctx, "progress"); - doc->list = ui_list_new(ctx, "list"); + //doc->list = ui_list_new(ctx, "list"); Entry *e1 = calloc(1, sizeof(Entry)); e1->name = "test"; e1->desc = "test file"; Entry *e2 = calloc(1, sizeof(Entry)); e2->name = str; e2->desc = "important document"; - ui_list_append(doc->list, e1); - ui_list_append(doc->list, e2); + //ui_list_append(doc->list, e1); + //ui_list_append(doc->list, e2); return doc; }
--- a/ui/common/context.c Sun Jul 01 19:03:26 2018 +0200 +++ b/ui/common/context.c Fri Nov 09 15:43:46 2018 +0100 @@ -90,7 +90,7 @@ UCX_MAP_FOREACH(key, var, i) { UiVar *v = ucx_map_get(root->bound, key); if(v) { - // copy binding: after this all doc vars with names of previously + // copy binding: after this, all doc vars with names of previously // bound variables are bound to the widgets // the widgets still hold a pointer to the root ctx vars, but this // vars have a pointer to the document variable value - confusing
--- a/ui/motif/text.c Sun Jul 01 19:03:26 2018 +0200 +++ b/ui/motif/text.c Fri Nov 09 15:43:46 2018 +0100 @@ -462,10 +462,10 @@ } void ui_textfield_set(UiString *str, char *value) { + XmTextSetString(str->obj, value); if(str->value.ptr) { str->value.free(str->value.ptr); } str->value.ptr = NULL; - XmTextSetString(str->obj, value); }