feat: properties menu in Files and delete confirmation for directories
This commit is contained in:
@@ -139,10 +139,12 @@ void filemanager_delete_selected(FileManagerState* fm) {
|
||||
char fullpath[512];
|
||||
filemanager_build_fullpath(fullpath, 512,
|
||||
fm->current_path, fm->entry_names[fm->selected]);
|
||||
if (fm->is_dir[fm->selected])
|
||||
filemanager_delete_recursive(fullpath);
|
||||
else
|
||||
if (fm->is_dir[fm->selected]) {
|
||||
filemanager_show_directory_delete_confirmation(fm, fm->selected);
|
||||
return;
|
||||
} else {
|
||||
montauk::fdelete(fullpath);
|
||||
}
|
||||
filemanager_read_dir(fm);
|
||||
}
|
||||
|
||||
@@ -162,12 +164,14 @@ void filemanager_open_ctx_menu(FileManagerState* fm, int local_x, int local_y, i
|
||||
|| (filemanager_is_virtual_view(fm) && tt == FM_ENTRY_VIRTUAL_APP)) {
|
||||
// Drive, Home, Apps shortcut, or app entry: only Open
|
||||
fm->ctx_items[fm->ctx_item_count++] = CTX_OPEN;
|
||||
fm->ctx_items[fm->ctx_item_count++] = CTX_PROPERTIES;
|
||||
} else {
|
||||
fm->ctx_items[fm->ctx_item_count++] = CTX_OPEN;
|
||||
fm->ctx_items[fm->ctx_item_count++] = CTX_COPY;
|
||||
fm->ctx_items[fm->ctx_item_count++] = CTX_CUT;
|
||||
fm->ctx_items[fm->ctx_item_count++] = CTX_RENAME;
|
||||
fm->ctx_items[fm->ctx_item_count++] = CTX_DELETE;
|
||||
fm->ctx_items[fm->ctx_item_count++] = CTX_PROPERTIES;
|
||||
}
|
||||
} else {
|
||||
// Background click
|
||||
|
||||
Reference in New Issue
Block a user