1
0
mirror of synced 2024-11-12 10:10:53 +01:00

sys: Add functionality to clear recent files (#395)

* sys: Add functionality to clear recent files

* sys: Remove clear recent files from welcome window
This commit is contained in:
draftshade 2022-01-08 23:17:47 +01:00 committed by GitHub
parent f45cc3fc73
commit fe04d05c28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 0 deletions

View File

@ -333,6 +333,15 @@ namespace hex::plugin::builtin {
}
}
ImGui::Separator();
if (ImGui::MenuItem("hex.builtin.view.hexeditor.menu.file.clear_recent"_lang)) {
SharedData::recentFilePaths.clear();
ContentRegistry::Settings::write(
"hex.builtin.setting.imhex",
"hex.builtin.setting.imhex.recent_files",
std::vector<std::string>{});
}
ImGui::EndMenu();
}

View File

@ -188,6 +188,7 @@ namespace hex::plugin::builtin {
{ "hex.builtin.view.hexeditor.menu.file.open_file", "Datei öffnen..." },
{ "hex.builtin.view.hexeditor.menu.file.open_recent", "Kürzlich geöffnete Dateien" },
{ "hex.builtin.view.hexeditor.menu.file.clear_recent", "Löschen" },
{ "hex.builtin.view.hexeditor.menu.file.open_other", "Provider öffnen..." },
{ "hex.builtin.view.hexeditor.menu.file.save", "Speichern" },
{ "hex.builtin.view.hexeditor.menu.file.save_as", "Speichern unter..." },

View File

@ -191,6 +191,7 @@ namespace hex::plugin::builtin {
{ "hex.builtin.view.hexeditor.menu.file.open_file", "Open File..." },
{ "hex.builtin.view.hexeditor.menu.file.open_recent", "Open Recent" },
{ "hex.builtin.view.hexeditor.menu.file.clear_recent", "Clear" },
{ "hex.builtin.view.hexeditor.menu.file.open_other", "Open Other..." },
{ "hex.builtin.view.hexeditor.menu.file.save", "Save" },
{ "hex.builtin.view.hexeditor.menu.file.save_as", "Save As..." },

View File

@ -171,6 +171,7 @@ namespace hex::plugin::builtin {
{ "hex.builtin.view.hexeditor.create_file", "Nuovo" },
{ "hex.builtin.view.hexeditor.open_file", "Apri" },
{ "hex.builtin.view.hexeditor.menu.file.open_recent", "File recenti" },
//{ "hex.builtin.view.hexeditor.menu.file.clear_recent", "Clear" },
//{ "hex.builtin.view.hexeditor.menu.file.open_other", "Open Other..." },
{ "hex.builtin.view.hexeditor.open_project", "Apri i Progetti" },
{ "hex.builtin.view.hexeditor.save_project", "Salva i Progetti" },

View File

@ -188,6 +188,7 @@ namespace hex::plugin::builtin {
{ "hex.builtin.view.hexeditor.menu.file.open_file", "打开文件..." },
{ "hex.builtin.view.hexeditor.menu.file.open_recent", "打开最近" },
//{ "hex.builtin.view.hexeditor.menu.file.clear_recent", "Clear" },
//{ "hex.builtin.view.hexeditor.menu.file.open_other", "Open Other..." },
{ "hex.builtin.view.hexeditor.menu.file.save", "保存" },
{ "hex.builtin.view.hexeditor.menu.file.save_as", "另存为..." },