From 5e2e2a6b4eed3a06a048f2ea1c609b2bb9659a5a Mon Sep 17 00:00:00 2001 From: "jsc@umbraculum.org" Date: Fri, 26 Apr 2013 11:05:11 +0200 Subject: Is capable of selecting a file. --- plugingui/filebrowser.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'plugingui/filebrowser.cc') 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 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; -- cgit v1.2.3