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

GFilePicker: Quality of life improvements (#370)

Added:
- Default to home directory on open.
- Save button focus.
- Correct title for the mode were in.
- Home directory shortcut.
This commit is contained in:
Rhin 2019-07-28 13:04:57 -05:00 committed by Andreas Kling
parent 608fee9bff
commit 731f91f1ab
2 changed files with 12 additions and 3 deletions

View file

@ -1,5 +1,6 @@
#include <AK/FileSystemPath.h>
#include <AK/Optional.h>
#include <LibCore/CUserInfo.h>
#include <LibGUI/GDialog.h>
#include <LibGUI/GTableView.h>
@ -18,7 +19,7 @@ public:
static Optional<String> get_save_filepath();
static bool file_exists(const StringView& path);
GFilePicker(Mode type = Mode::Open, const StringView& path = "/", CObject* parent = nullptr);
GFilePicker(Mode type = Mode::Open, const StringView& path = String(get_current_user_home_path()), CObject* parent = nullptr);
virtual ~GFilePicker() override;
FileSystemPath selected_file() const { return m_selected_file; }