mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 22:08:12 +00:00
LibGUI: Refactor AbstractView "multi select" mode into "selection mode"
There are three possible selection modes for a GUI::AbstractView. - NoSelection - SingleSelection - MultiSelection We don't enforce these modes fully yet, this patch mostly adds them in place of the old "multi select" flag.
This commit is contained in:
parent
207ecf454a
commit
f7116bba43
8 changed files with 31 additions and 25 deletions
|
@ -123,7 +123,7 @@ FilePicker::FilePicker(Window* parent_window, Mode mode, Options options, const
|
|||
m_location_textbox->set_text(path);
|
||||
|
||||
m_view = vertical_container.add<MultiView>();
|
||||
m_view->set_multi_select(m_mode == Mode::OpenMultiple);
|
||||
m_view->set_selection_mode(m_mode == Mode::OpenMultiple ? GUI::AbstractView::SelectionMode::MultiSelection : GUI::AbstractView::SelectionMode::SingleSelection);
|
||||
m_view->set_model(SortingProxyModel::create(*m_model));
|
||||
m_view->set_model_column(FileSystemModel::Column::Name);
|
||||
m_view->set_key_column_and_sort_order(GUI::FileSystemModel::Column::Name, GUI::SortOrder::Ascending);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue