diff -r 31bc86844659 -r 3ac472683246 application/application.c --- a/application/application.c Thu Oct 03 18:08:29 2024 +0200 +++ b/application/application.c Thu Oct 03 18:24:13 2024 +0200 @@ -94,7 +94,13 @@ ui_toolbar_toggleitem("PreviewPane", .icon = UI_ICON_DOCK_RIGHT); ui_toolbar_appmenu() { - ui_menuitem("TODO", NULL); + ui_menuitem("New Window", .onclick = action_window_new); + ui_menuseparator(); + ui_menuitem("Download", .onclick = action_download); + ui_menuitem("Upload Files", .onclick = action_upload_file); + ui_menuitem("Upload Directory", .onclick = action_upload_dir); + ui_menuseparator(); + ui_menuitem("Settings", .onclick = action_open_settings); } //ui_toolbar_add_default("Home", UI_TOOLBAR_LEFT); @@ -237,6 +243,10 @@ ui_openfiledialog(event->obj, UI_FILEDIALOG_SELECT_MULTI, file_selected, NULL); } +void action_upload_dir(UiEvent *event, void *data) { + ui_openfiledialog(event->obj, UI_FILEDIALOG_SELECT_FOLDER|UI_FILEDIALOG_SELECT_MULTI, file_selected, NULL); +} + void action_delete(UiEvent *event, void *data) { DavBrowser *browser = event->document; UiListSelection sel = ui_list_getselection(browser->resources); @@ -291,3 +301,7 @@ .button2_label = "Cancel", .result = newfolderdialog_result); } + +void action_open_settings(UiEvent *event, void *data) { + +}