diff options
author | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2020-02-10 09:19:29 +0100 |
---|---|---|
committer | Pedro J. Estébanez <pestebanez@imvu.com> | 2020-03-03 10:38:34 +0100 |
commit | aee586553a4be72b72b669fb489fae72337ab7ad (patch) | |
tree | ef448436ccff0922cb2dfbc6c589af6acd77cf41 /drivers/unix | |
parent | 3c7d92c590f48ea9a265ec20d7af43a3aa44632f (diff) |
Improve UX of drive letters
Namely, move the drive dropdown to just the left of the path text box and don't include the former
in the latter.
This improves the UX on Windows.
In the UNIX case, since its concept of drives is (ab)used to provide shortcuts to useful paths, its
dropdown is kept at the original location.
Diffstat (limited to 'drivers/unix')
-rw-r--r-- | drivers/unix/dir_access_unix.cpp | 7 | ||||
-rw-r--r-- | drivers/unix/dir_access_unix.h | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/drivers/unix/dir_access_unix.cpp b/drivers/unix/dir_access_unix.cpp index 02cb4fa956..715bc56003 100644 --- a/drivers/unix/dir_access_unix.cpp +++ b/drivers/unix/dir_access_unix.cpp @@ -269,6 +269,11 @@ String DirAccessUnix::get_drive(int p_drive) { return list[p_drive]; } +bool DirAccessUnix::drives_are_shortcuts() { + + return true; +} + Error DirAccessUnix::make_dir(String p_dir) { GLOBAL_LOCK_FUNCTION @@ -337,7 +342,7 @@ Error DirAccessUnix::change_dir(String p_dir) { return OK; } -String DirAccessUnix::get_current_dir() { +String DirAccessUnix::get_current_dir(bool p_include_drive) { String base = _get_root_path(); if (base != "") { diff --git a/drivers/unix/dir_access_unix.h b/drivers/unix/dir_access_unix.h index 32ddc76638..b403d8e356 100644 --- a/drivers/unix/dir_access_unix.h +++ b/drivers/unix/dir_access_unix.h @@ -63,9 +63,10 @@ public: virtual int get_drive_count(); virtual String get_drive(int p_drive); + virtual bool drives_are_shortcuts(); virtual Error change_dir(String p_dir); ///< can be relative or absolute, return false on success - virtual String get_current_dir(); ///< return current dir location + virtual String get_current_dir(bool p_include_drive = true); ///< return current dir location virtual Error make_dir(String p_dir); virtual bool file_exists(String p_file); |