mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-17 07:50:04 +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:
parent
80cb833594
commit
a175e76948
Notes:
sideshowbarker
2024-07-19 12:59:42 +09:00
Author: https://github.com/RyanGrieb
Commit: a175e76948
Pull-request: https://github.com/SerenityOS/serenity/pull/378
Reviewed-by: https://github.com/awesomekling
6 changed files with 34 additions and 20 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue