ux: Display an error message if file picker can't be opened (#748)

* add error message for the file picker

* set a different message for Windows/MacOS

* fix typos

* Moved file dialog error handling to a callback function

Co-authored-by: Nik <werwolv98@gmail.com>
This commit is contained in:
iTrooz_
2022-09-20 15:47:59 +02:00
committed by GitHub
parent 9656b40d53
commit 3a94be9abb
11 changed files with 144 additions and 7 deletions

View File

@@ -119,6 +119,21 @@ namespace hex::plugin::builtin {
//{ "hex.builtin.popup.error.project.load", "Failed to load project!" },
//{ "hex.builtin.popup.error.project.save", "Failed to save project!" },
//{ "hex.builtin.popup.error.task_exception", "Exception thrown in Task '{}':\n\n{}" },
//{ "hex.builtin.popup.error.file_dialog.portal",
// "There was an error while opening the file browser. This might be caused by your system not having a xdg-desktop-portal backend installed correctly.\n"
// "\n"
// "On KDE, it's xdg-desktop-portal-kde.\n"
// "On Gnome it's xdg-desktop-portal-gnome.\n"
// "On wlroots it's xdg-desktop-portal-wlr.\n"
// "Otherwise, you can try to use xdg-desktop-portal-gtk.\n"
// "\n"
// "Reboot your system after installing it.\n"
// "\n"
// "If the file browser still doesn't work after this, submit an issue at https://github.com/WerWolv/ImHex/issues\n"
// "\n"
// "In the meantime files can still be opened by dragging them onto the ImHex window!"
//},
//{ "hex.builtin.popup.error.file_dialog.common", "An error occurred while opening the file browser!" },
{ "hex.builtin.menu.file", "File" },
//{ "hex.builtin.menu.file.create_file", "New File..." },