summaryrefslogtreecommitdiff
path: root/Applications/FileManager/main.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-09-18 18:02:57 +0200
committerAndreas Kling <kling@serenityos.org>2020-09-18 21:29:01 +0200
commit8075db683bc685408f3650a47158c84c0d89fb29 (patch)
treecaa1ca70bf19f908edd68ac4592de3705d4eecec /Applications/FileManager/main.cpp
parent9b893037670e16bd0b51b8cb7f4e0d30bb710413 (diff)
downloadserenity-8075db683bc685408f3650a47158c84c0d89fb29.zip
FileManager: Show an inline error message for inaccessible directories
Instead of popping up a message box whenever we can't read an opened directory, show the error message inside the DirectoryView (as a label) instead. This fixes a visual inconsistency where an inaccessible directory would be selected in the left-side treeview while the previous directory's contents were still showing on the right. This also makes keyboard navigation a bit more pleasant since you're not suddenly interrupted by a message box.
Diffstat (limited to 'Applications/FileManager/main.cpp')
-rw-r--r--Applications/FileManager/main.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/Applications/FileManager/main.cpp b/Applications/FileManager/main.cpp
index 66f6093434..7f09d0cb00 100644
--- a/Applications/FileManager/main.cpp
+++ b/Applications/FileManager/main.cpp
@@ -540,14 +540,6 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio
open_parent_directory_action->set_enabled(new_path != "/");
};
- directory_view.on_error = [&](int, const char* error_string, bool quit) {
- auto error_message = String::format("Could not read directory: %s", error_string);
- GUI::MessageBox::show(window, error_message, "File Manager", GUI::MessageBox::Type::Error);
-
- if (quit)
- exit(1);
- };
-
directory_view.on_status_message = [&](const StringView& message) {
statusbar.set_text(message);
};