mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:48:14 +00:00
HackStudio: Show the project name as the root in the project tree
This commit is contained in:
parent
6e27b14a4a
commit
5ff9ac1276
2 changed files with 4 additions and 0 deletions
|
@ -141,6 +141,8 @@ private:
|
|||
Project::Project(const String& path, Vector<String>&& filenames)
|
||||
: m_path(path)
|
||||
{
|
||||
m_name = FileSystemPath(m_path).basename();
|
||||
|
||||
m_file_icon = GIcon(GraphicsBitmap::load_from_file("/res/icons/16x16/filetype-unknown.png"));
|
||||
m_cplusplus_icon = GIcon(GraphicsBitmap::load_from_file("/res/icons/16x16/filetype-cplusplus.png"));
|
||||
m_header_icon = GIcon(GraphicsBitmap::load_from_file("/res/icons/16x16/filetype-header.png"));
|
||||
|
@ -210,6 +212,7 @@ ProjectFile* Project::get_file(const String& filename)
|
|||
void Project::rebuild_tree()
|
||||
{
|
||||
auto root = adopt(*new ProjectTreeNode);
|
||||
root->name = m_name;
|
||||
root->type = ProjectTreeNode::Type::Project;
|
||||
|
||||
for (auto& file : m_files) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue