LibGUI: FilePicker: Set initial sort to name instead of undefined
Well, technically the initial sort order is 'ascending inode'. However, that is unpredictable for the user. In the rare case it is desired, it can be re-enabled by revealing the inode column, and then sorting by it, in the TableView.
This commit is contained in:
parent
b6bea3d25b
commit
cfbc49b5fc
Notes:
sideshowbarker
2024-07-19 07:02:57 +09:00
Author: https://github.com/BenWiederhake Commit: https://github.com/SerenityOS/serenity/commit/cfbc49b5fc6 Pull-request: https://github.com/SerenityOS/serenity/pull/2036 Reviewed-by: https://github.com/awesomekling Reviewed-by: https://github.com/zlotny
1 changed files with 1 additions and 0 deletions
|
@ -114,6 +114,7 @@ FilePicker::FilePicker(Mode mode, const StringView& file_name, const StringView&
|
|||
m_view = vertical_container.add<MultiView>();
|
||||
m_view->set_model(SortingProxyModel::create(*m_model));
|
||||
m_view->set_model_column(FileSystemModel::Column::Name);
|
||||
m_view->model()->set_key_column_and_sort_order(GUI::FileSystemModel::Column::Name, GUI::SortOrder::Ascending);
|
||||
m_view->set_column_hidden(FileSystemModel::Column::Owner, true);
|
||||
m_view->set_column_hidden(FileSystemModel::Column::Group, true);
|
||||
m_view->set_column_hidden(FileSystemModel::Column::Permissions, true);
|
||||
|
|
Loading…
Add table
Reference in a new issue