Small multiselect improvements

This commit is contained in:
XorTroll 2019-11-10 00:08:09 +01:00
parent d04b43e1ce
commit 47a1fdce5d
2 changed files with 14 additions and 11 deletions

View file

@ -9,6 +9,8 @@
"menu_move_to_folder": "Would you like to move all selected entries inside a new folder or an already existing one?",
"menu_move_new_folder": "New folder",
"menu_move_existing_folder": "Existing folder",
"menu_move_select_folder": "Select a folder to move the selected content to.",
"menu_move_select_folder_cancel": "Folder selection cancelled.",
"menu_move_existing_folder_conf": "Would you like to move all selected entries into this folder?",
"swkbd_new_folder_guide": "Enter folder name",
"menu_move_from_folder": "Would you like to move all selected entries back to main menu?",

View file

@ -155,19 +155,16 @@ namespace ui
{
auto &folder = list.folders[index];
auto sopt = qapp->CreateShowDialog(cfg::GetLanguageString(config.main_lang, config.default_lang, "multiselect"), cfg::GetLanguageString(config.main_lang, config.default_lang, "menu_move_existing_folder_conf"), { cfg::GetLanguageString(config.main_lang, config.default_lang, "yes"), cfg::GetLanguageString(config.main_lang, config.default_lang, "no"), cfg::GetLanguageString(config.main_lang, config.default_lang, "cancel") }, true);
if(sopt == 0)
{
this->HandleMultiselectMoveToFolder(folder.name);
this->select_dir = false;
}
else if(sopt == 1)
{
this->select_dir = false;
this->StopMultiselect();
}
if(sopt == 0) this->HandleMultiselectMoveToFolder(folder.name);
else if(sopt == 1) this->StopMultiselect();
}
}
}
else if(down & KEY_B)
{
this->select_dir = false;
qapp->ShowNotification(cfg::GetLanguageString(config.main_lang, config.default_lang, "menu_move_select_folder_cancel"));
}
}
else
{
@ -235,7 +232,11 @@ namespace ui
swkbdClose(&swkbd);
if(R_SUCCEEDED(rc)) this->HandleMultiselectMoveToFolder(dir);
}
else if(sopt == 1) this->select_dir = true;
else if(sopt == 1)
{
this->select_dir = true;
qapp->ShowNotification(cfg::GetLanguageString(config.main_lang, config.default_lang, "menu_move_select_folder"));
}
else if(sopt == 2) this->StopMultiselect();
}
else