Clarify directory deletion strings.

This commit is contained in:
Steven Smith 2016-04-13 16:07:06 -07:00
parent 352fc5389a
commit afaef7040c
3 changed files with 22 additions and 4 deletions

View File

@ -13,6 +13,7 @@ void action_install_cias(file_info* info, bool* populated);
void action_install_cias_delete(file_info* info, bool* populated);
void action_copy_contents(file_info* info, bool* populated);
void action_delete_contents(file_info* info, bool* populated);
void action_delete_dir(file_info* info, bool* populated);
void action_delete_dir_contents(file_info* info, bool* populated);
void action_delete_dir_cias(file_info* info, bool* populated);
void action_paste_contents(file_info* info, bool* populated);

View File

@ -122,6 +122,23 @@ void action_delete_contents(file_info* info, bool* populated) {
ui_push(prompt_create("Confirmation", "Delete the selected content?", COLOR_TEXT, true, data, NULL, action_delete_dir_contents_draw_top, action_delete_dir_contents_onresponse));
}
void action_delete_dir(file_info* info, bool* populated) {
delete_dir_contents_data* data = (delete_dir_contents_data*) calloc(1, sizeof(delete_dir_contents_data));
data->base = info;
data->populated = populated;
data->processed = 0;
Result res = 0;
if(R_FAILED(res = util_populate_contents(&data->contents, &data->total, info->archive, info->path, true, false, NULL, NULL))) {
error_display_res(info, ui_draw_file_info, res, "Failed to retrieve content list.");
free(data);
return;
}
ui_push(prompt_create("Confirmation", "Delete the current directory?", COLOR_TEXT, true, data, NULL, action_delete_dir_contents_draw_top, action_delete_dir_contents_onresponse));
}
void action_delete_dir_contents(file_info* info, bool* populated) {
delete_dir_contents_data* data = (delete_dir_contents_data*) calloc(1, sizeof(delete_dir_contents_data));
data->base = info;
@ -136,7 +153,7 @@ void action_delete_dir_contents(file_info* info, bool* populated) {
return;
}
ui_push(prompt_create("Confirmation", "Delete all contents of the selected directory?", COLOR_TEXT, true, data, NULL, action_delete_dir_contents_draw_top, action_delete_dir_contents_onresponse));
ui_push(prompt_create("Confirmation", "Delete all contents of the current directory?", COLOR_TEXT, true, data, NULL, action_delete_dir_contents_draw_top, action_delete_dir_contents_onresponse));
}
void action_delete_dir_cias(file_info* info, bool* populated) {
@ -153,5 +170,5 @@ void action_delete_dir_cias(file_info* info, bool* populated) {
return;
}
ui_push(prompt_create("Confirmation", "Delete all CIAs in the selected directory?", COLOR_TEXT, true, data, NULL, action_delete_dir_contents_draw_top, action_delete_dir_contents_onresponse));
ui_push(prompt_create("Confirmation", "Delete all CIAs in the current directory?", COLOR_TEXT, true, data, NULL, action_delete_dir_contents_draw_top, action_delete_dir_contents_onresponse));
}

View File

@ -52,7 +52,7 @@ static list_item cia_files_action_items[CIA_FILES_ACTION_COUNT] = {
static u32 directories_action_count = DIRECTORIES_ACTION_COUNT;
static list_item directories_action_items[DIRECTORIES_ACTION_COUNT] = {
{"Delete all contents", COLOR_TEXT, action_delete_dir_contents},
{"Delete", COLOR_TEXT, action_delete_contents},
{"Delete", COLOR_TEXT, action_delete_dir},
{"Copy", COLOR_TEXT, action_copy_contents},
{"Paste", COLOR_TEXT, action_paste_contents},
};
@ -65,7 +65,7 @@ static list_item cia_directories_action_items[CIA_DIRECTORIES_ACTION_COUNT] = {
{"Install and delete all CIAs", COLOR_TEXT, action_install_cias_delete},
{"Delete all CIAs", COLOR_TEXT, action_delete_dir_cias},
{"Delete all contents", COLOR_TEXT, action_delete_dir_contents},
{"Delete", COLOR_TEXT, action_delete_contents},
{"Delete", COLOR_TEXT, action_delete_dir},
{"Copy", COLOR_TEXT, action_copy_contents},
{"Paste", COLOR_TEXT, action_paste_contents},
};