application/window.c

changeset 3
c04433993fbb
parent 2
ea89bbb0c4c8
child 4
d8e8f34e65ee
--- a/application/window.c	Thu Dec 10 13:43:25 2020 +0100
+++ b/application/window.c	Fri Dec 11 11:46:19 2020 +0100
@@ -28,6 +28,7 @@
 
 #include "window.h"
 #include "menu.h"
+#include "browser.h"
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -35,6 +36,7 @@
 UiObject* window_create(void) {
     UiObject *obj = ui_window("Note", NULL);
     WindowData *window = ui_malloc(obj->ctx, sizeof(WindowData));
+    memset(window, 0, sizeof(WindowData));
     obj->window = window;
     
     UI_CTN(obj, ui_hsplitpane(obj, 3)) {
@@ -44,9 +46,10 @@
             ui_listview_nv(obj, "notebooks", NULL, NULL, NULL);
         }
         
-        window->browser = ui_label(obj, "Browser");
+        window->browser = document_browser_create(obj);
         
         window->editor = ui_textarea_nv(obj, "text");
+        ui_widget_set_groups(obj->ctx, ui_textarea_gettextwidget(window->editor), (ui_enablefunc)ui_set_enabled, APPGR_DOCUMENT_OPEN, -1);
     }
     
     return obj;

mercurial