diff -r 0c881944fa10 -r da05df77652e application/application.c --- a/application/application.c Mon Oct 21 11:14:26 2024 +0200 +++ b/application/application.c Mon Oct 21 13:22:45 2024 +0200 @@ -99,6 +99,8 @@ ui_menuitem("Download", .onclick = action_download); ui_menuitem("Upload Files", .onclick = action_upload_file); ui_menuitem("Upload Directory", .onclick = action_upload_dir); + ui_menuitem("Open Properties", .onclick = action_open_properties); + ui_menuitem("Open as Text File", .onclick = action_open_properties, .onclickdata = "text/plain"); ui_menuseparator(); ui_menuitem("Settings", .onclick = action_open_settings); } @@ -236,6 +238,8 @@ } else { ui_openfiledialog(event->obj, UI_FILEDIALOG_SELECT_FOLDER, download_location_selected, first); } + + ui_listselection_free(sel); } } @@ -305,3 +309,17 @@ void action_open_settings(UiEvent *event, void *data) { } + +void action_open_properties(UiEvent *event, void *data) { + char *type = data; + DavBrowser *browser = event->document; + + UiListSelection sel = ui_list_getselection(browser->resources); + for(int i=0;iresources, sel.rows[i]); + if(res) { + davbrowser_open_resource(event->obj, browser, res, type); + } + } + ui_listselection_free(sel); +}