1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:08:13 +00:00

LibGUI+FileManager: Merge GDirectoryModel into GFileSystemModel

We used to have two different models for displaying file system contents:
the FileManager-grade table-like directory model, which exposed rich data
(such as file icons with integrated image previews) about contents of a
single directory, and the tree-like GFileSystemModel, which only exposed
a tree of file names with very basic info about them.

This commit unifies the two. The new GFileSystemModel can be used both as a
tree-like and as a table-like model, or in fact in both ways simultaneously.
It exposes rich data about a file system subtree rooted at the given root.

The users of the two previous models are all ported to use this new model.
This commit is contained in:
Sergey Bugaev 2020-01-10 18:58:00 +03:00 committed by Andreas Kling
parent 0f18a16e2c
commit fdeb91e000
12 changed files with 597 additions and 700 deletions

View file

@ -4,7 +4,7 @@
#include <LibGUI/GDialog.h>
#include <LibGUI/GTableView.h>
class GDirectoryModel;
class GFileSystemModel;
class GLabel;
class GTextBox;
@ -44,7 +44,7 @@ private:
}
RefPtr<GTableView> m_view;
NonnullRefPtr<GDirectoryModel> m_model;
NonnullRefPtr<GFileSystemModel> m_model;
FileSystemPath m_selected_file;
RefPtr<GTextBox> m_filename_textbox;