mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 16:55:08 +00:00
FileManager: Hook up a GSortingProxyTableModel so we get sorted files. :^)
The next step here is coming up with a nice way to always put directories ahead of files.
This commit is contained in:
parent
7d2c962836
commit
e14dd06b8c
4 changed files with 25 additions and 10 deletions
|
@ -1,9 +1,13 @@
|
|||
#include "DirectoryTableView.h"
|
||||
#include <LibGUI/GSortingProxyTableModel.h>
|
||||
|
||||
DirectoryTableView::DirectoryTableView(GWidget* parent)
|
||||
: GTableView(parent)
|
||||
{
|
||||
set_model(make<DirectoryTableModel>());
|
||||
auto directory_model = make<DirectoryTableModel>();
|
||||
m_model = directory_model.ptr();
|
||||
set_model(make<GSortingProxyTableModel>(move(directory_model)));
|
||||
GTableView::model()->set_key_column_and_sort_order(DirectoryTableModel::Column::Name, GSortOrder::Ascending);
|
||||
}
|
||||
|
||||
DirectoryTableView::~DirectoryTableView()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue