mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:07:43 +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:
parent
f92ee94fe2
commit
a4cb6a49ae
1 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue