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
commit a175e76948
Notes: sideshowbarker 2024-07-19 12:59:42 +09:00
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; }