summaryrefslogtreecommitdiff
path: root/plugingui/filebrowser.cc
diff options
context:
space:
mode:
authorJonas Suhr Christensen <jsc@umbraculum.org>2013-05-04 19:55:04 +0200
committerJonas Suhr Christensen <jsc@umbraculum.org>2013-05-04 19:55:04 +0200
commit310b14903960fdf95ec85b09250b929588e7f006 (patch)
treea23dec37f1f8848141dabfe0ddf18522503acc66 /plugingui/filebrowser.cc
parenta93d2e811f26d291d2c1983318f585906c9b6d46 (diff)
testing windows drive selection
Diffstat (limited to 'plugingui/filebrowser.cc')
-rw-r--r--plugingui/filebrowser.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/plugingui/filebrowser.cc b/plugingui/filebrowser.cc
index bb6f5de..ca4e0f5 100644
--- a/plugingui/filebrowser.cc
+++ b/plugingui/filebrowser.cc
@@ -76,7 +76,14 @@ static void changeDir(void *ptr) {
lb->clear();
INFO(filebrowser, "Changing path to '%s'\n", (dir->path() + "/" + value).c_str());
-
+
+#ifdef WIN32
+ if(!value.empty() && dir->isRoot()) {
+ dir->chdir(value);
+ return;
+ }
+#endif
+
if(!value.empty() && dir->fileExists(value)) {
std::string file = dir->path() + "/" + value;
DEBUG(filebrowser, "Selecting file '%s'\n", file.c_str());
@@ -90,8 +97,6 @@ static void changeDir(void *ptr) {
return;
}
- //TODO: If root and windows show drives instead of files
-
DEBUG(filebrowser, "Setting path of lineedit to %s\n", dir->path().c_str());
le->setText(dir->path());