summaryrefslogtreecommitdiff
path: root/plugingui/filebrowser.cc
diff options
context:
space:
mode:
authorjsc@umbraculum.org <jsc@umbraculum.org>2013-04-26 11:05:11 +0200
committerjsc@umbraculum.org <jsc@umbraculum.org>2013-04-26 11:05:11 +0200
commit5e2e2a6b4eed3a06a048f2ea1c609b2bb9659a5a (patch)
treec772952c039620312e14254335f52725a9bc0de6 /plugingui/filebrowser.cc
parent4cb91eb29feb454c3e7162100508a2ea64b3ab6a (diff)
Is capable of selecting a file.
Diffstat (limited to 'plugingui/filebrowser.cc')
-rw-r--r--plugingui/filebrowser.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/plugingui/filebrowser.cc b/plugingui/filebrowser.cc
index 9a0521a..d64a0ab 100644
--- a/plugingui/filebrowser.cc
+++ b/plugingui/filebrowser.cc
@@ -69,7 +69,7 @@ static void changeDir(void *ptr) {
GUI::ListBox *lb = prv->listbox;
-// GUI::LineEdit *le = prv->lineedit;
+ GUI::LineEdit *le = prv->lineedit;
std::string value = lb->selectedValue();
Directory* dir = prv->dir;
@@ -89,6 +89,9 @@ static void changeDir(void *ptr) {
}
//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(Directory::cleanPath(dir->path()));
lb->clear();
std::vector<GUI::ListBoxBasic::Item> items;
@@ -268,6 +271,9 @@ static bool isDir(std::string d)
void GUI::FileBrowser::setPath(std::string path)
{
+ // TODO: Remove this check to directoy.cc
+ if(path.empty()) return;
+
prv->dir->setPath(path);
/*
std::string dir;