diff options
Diffstat (limited to 'gui/browser.cpp')
-rw-r--r-- | gui/browser.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gui/browser.cpp b/gui/browser.cpp index 67b0dd9174..0e2d6b87bc 100644 --- a/gui/browser.cpp +++ b/gui/browser.cpp @@ -22,6 +22,7 @@ #include "gui/browser.h" #include "gui/gui-manager.h" +#include "gui/widgets/edittext.h" #include "gui/widgets/list.h" #include "common/config-manager.h" @@ -56,7 +57,7 @@ BrowserDialog::BrowserDialog(const char *title, bool dirBrowser) new StaticTextWidget(this, "Browser.Headline", title); // Current path - TODO: handle long paths ? - _currentPath = new StaticTextWidget(this, "Browser.Path", "DUMMY"); + _currentPath = new EditTextWidget(this, "Browser.Path", "DUMMY"); // Add file list _fileList = new ListWidget(this, "Browser.List"); @@ -94,6 +95,12 @@ void BrowserDialog::open() { void BrowserDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { switch (cmd) { + //Search for typed-in directory + case kExitTxtCmd: + _node = Common::FSNode(_currentPath->getEditString()); + updateListing(); + break; + //Search by text input case kChooseCmd: if (_isDirBrowser) { // If nothing is selected in the list widget, choose the current dir. @@ -157,7 +164,7 @@ void BrowserDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data void BrowserDialog::updateListing() { // Update the path display - _currentPath->setLabel(_node.getPath()); + _currentPath->setEditString(_node.getPath()); // We memorize the last visited path. ConfMan.set("browser_lastpath", _node.getPath()); |