--- a/application/main.c Tue Mar 25 20:25:09 2014 +0100 +++ b/application/main.c Wed Mar 26 15:53:43 2014 +0100 @@ -82,11 +82,13 @@ void action_undo(UiEvent *event, void *data) { printf("undo\n"); TestWindowData *wd = event->window; - //ui_text_undo(&wd->text); + ui_text_undo(&wd->text); } void action_redo(UiEvent *event, void *data) { printf("redo\n"); + TestWindowData *wd = event->window; + ui_text_redo(&wd->text); } @@ -101,7 +103,7 @@ ui_menuitem("Dokument 1", action_doc1, NULL); ui_menuitem("Dokument 2", action_doc2, NULL); ui_menuseparator(); - //ui_checkitem_nv("Check", "check1"); + ui_checkitem_nv("Check", "check1"); ui_menuitem("Close", action_close, NULL); @@ -123,7 +125,7 @@ printf("create window\n"); UiObject *window = ui_window("Mod0", NULL); - TestWindowData *wdata = malloc(sizeof(TestWindowData)); + TestWindowData *wdata = calloc(1, sizeof(TestWindowData)); window->window = wdata; TestDocument *doc1 = ui_document_new(sizeof(TestDocument));