mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:07:44 +00:00
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.
This commit is contained in:
parent
9b89303767
commit
8075db683b
3 changed files with 16 additions and 12 deletions
|
@ -86,7 +86,6 @@ public:
|
|||
Function<void(const GUI::ModelIndex&, const GUI::ContextMenuEvent&)> on_context_menu_request;
|
||||
Function<void(const StringView&)> on_status_message;
|
||||
Function<void(int done, int total)> on_thumbnail_progress;
|
||||
Function<void(int error, const char* error_string, bool quit)> on_error;
|
||||
|
||||
enum ViewMode {
|
||||
Invalid,
|
||||
|
@ -174,6 +173,8 @@ private:
|
|||
Vector<String> m_path_history;
|
||||
void add_path_to_history(const StringView& path);
|
||||
|
||||
RefPtr<GUI::Label> m_error_label;
|
||||
|
||||
RefPtr<GUI::TableView> m_table_view;
|
||||
RefPtr<GUI::IconView> m_icon_view;
|
||||
RefPtr<GUI::ColumnsView> m_columns_view;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue