1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:27: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

@ -16,10 +16,10 @@ public:
};
static Optional<String> get_open_filepath();
static Optional<String> get_save_filepath();
static Optional<String> get_save_filepath(const String& title, const String& extension);
static bool file_exists(const StringView& path);
GFilePicker(Mode type = Mode::Open, const StringView& path = String(get_current_user_home_path()), CObject* parent = nullptr);
GFilePicker(Mode type = Mode::Open, const StringView& file_name = "Untitled", const StringView& path = String(get_current_user_home_path()), CObject* parent = nullptr);
virtual ~GFilePicker() override;
FileSystemPath selected_file() const { return m_selected_file; }