summaryrefslogtreecommitdiff
path: root/Userland/Applications/FileManager/DirectoryView.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-08-26 19:14:12 +0200
committerAndreas Kling <kling@serenityos.org>2021-08-26 23:41:38 +0200
commitc8c58626e9eb09136ea7a558e681ce6e98510690 (patch)
treedd1b1855b2d0fc9472795fcecf85b97f1a3e4c8c /Userland/Applications/FileManager/DirectoryView.h
parentedf784340999b6e8f44241e04e6d6f8afc27be29 (diff)
downloadserenity-c8c58626e9eb09136ea7a558e681ce6e98510690.zip
FileManager: Move "View as ViewType" actions into DirectoryView
Let DirectoryView manage these actions itself. This matches what we already do for a bunch of other actions, and prepares for the next patch which will add Config::Listener to the mix.
Diffstat (limited to 'Userland/Applications/FileManager/DirectoryView.h')
-rw-r--r--Userland/Applications/FileManager/DirectoryView.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/Userland/Applications/FileManager/DirectoryView.h b/Userland/Applications/FileManager/DirectoryView.h
index 5410dec6a5..e652bfe9d6 100644
--- a/Userland/Applications/FileManager/DirectoryView.h
+++ b/Userland/Applications/FileManager/DirectoryView.h
@@ -80,6 +80,8 @@ public:
void set_view_mode(ViewMode);
ViewMode view_mode() const { return m_view_mode; }
+ void set_view_mode_from_string(String const&);
+
GUI::AbstractView& current_view()
{
switch (m_view_mode) {
@@ -124,6 +126,9 @@ public:
GUI::Action& delete_action() { return *m_delete_action; }
GUI::Action& force_delete_action() { return *m_force_delete_action; }
GUI::Action& rename_action() { return *m_rename_action; }
+ GUI::Action& view_as_icons_action() { return *m_view_as_icons_action; }
+ GUI::Action& view_as_table_action() { return *m_view_as_table_action; }
+ GUI::Action& view_as_columns_action() { return *m_view_as_columns_action; }
private:
explicit DirectoryView(Mode);
@@ -170,6 +175,10 @@ private:
RefPtr<GUI::Action> m_delete_action;
RefPtr<GUI::Action> m_force_delete_action;
RefPtr<GUI::Action> m_rename_action;
+
+ RefPtr<GUI::Action> m_view_as_table_action;
+ RefPtr<GUI::Action> m_view_as_icons_action;
+ RefPtr<GUI::Action> m_view_as_columns_action;
};
}