1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:47:44 +00:00

TextEditor: Include extension during SaveAs

When we save-as in the text editor we now auto-populate GFilePicker /w
the current name & extension.
This commit is contained in:
rhin123 2019-07-28 23:45:50 -05:00 committed by Andreas Kling
parent 80cb833594
commit a175e76948
6 changed files with 34 additions and 20 deletions

View file

@ -1,5 +1,6 @@
#pragma once
#include <AK/FileSystemPath.h>
#include <AK/Function.h>
#include <LibGUI/GApplication.h>
#include <LibGUI/GTextEditor.h>
@ -15,10 +16,12 @@ public:
void open_sesame(const String& path);
private:
void set_path(const StringView&);
void set_path(const FileSystemPath& file);
GTextEditor* m_editor { nullptr };
String m_path;
String m_name;
String m_extension;
RefPtr<GAction> m_new_action;
RefPtr<GAction> m_open_action;
RefPtr<GAction> m_save_action;