1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:27:35 +00:00

FileManager: Disable "View as..." actions for desktop DirectoryView

This stops these actions from being activated with Ctrl+[1,2,3] or the
command palette.. Switching to table or columns view would just hide
all the icons, so let's not make those options available.
This commit is contained in:
Sam Atkins 2022-02-03 14:40:14 +00:00 committed by Andreas Kling
parent f92ee94fe2
commit a4cb6a49ae

View file

@ -612,6 +612,12 @@ void DirectoryView::setup_actions()
Config::write_string("FileManager", "DirectoryView", "ViewMode", "Columns");
},
window());
if (m_mode == Mode::Desktop) {
m_view_as_icons_action->set_enabled(false);
m_view_as_table_action->set_enabled(false);
m_view_as_columns_action->set_enabled(false);
}
}
void DirectoryView::handle_drop(GUI::ModelIndex const& index, GUI::DropEvent const& event)