aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/browser.cpp7
-rw-r--r--gui/widgets/edittext.cpp5
-rw-r--r--gui/widgets/edittext.h5
3 files changed, 4 insertions, 13 deletions
diff --git a/gui/browser.cpp b/gui/browser.cpp
index 0e2d6b87bc..264f3a64f9 100644
--- a/gui/browser.cpp
+++ b/gui/browser.cpp
@@ -36,7 +36,8 @@ namespace GUI {
enum {
kChooseCmd = 'Chos',
kGoUpCmd = 'GoUp',
- kHiddenCmd = 'Hidd'
+ kHiddenCmd = 'Hidd',
+ kPathEditedCmd = 'Path'
};
/* We want to use this as a general directory selector at some point... possible uses
@@ -57,7 +58,7 @@ BrowserDialog::BrowserDialog(const char *title, bool dirBrowser)
new StaticTextWidget(this, "Browser.Headline", title);
// Current path - TODO: handle long paths ?
- _currentPath = new EditTextWidget(this, "Browser.Path", "DUMMY");
+ _currentPath = new EditTextWidget(this, "Browser.Path", "", nullptr, 0, kPathEditedCmd);
// Add file list
_fileList = new ListWidget(this, "Browser.List");
@@ -96,7 +97,7 @@ void BrowserDialog::open() {
void BrowserDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
switch (cmd) {
//Search for typed-in directory
- case kExitTxtCmd:
+ case kPathEditedCmd:
_node = Common::FSNode(_currentPath->getEditString());
updateListing();
break;
diff --git a/gui/widgets/edittext.cpp b/gui/widgets/edittext.cpp
index 540dc27932..8dabb0df61 100644
--- a/gui/widgets/edittext.cpp
+++ b/gui/widgets/edittext.cpp
@@ -132,7 +132,6 @@ void EditTextWidget::startEditMode() {
void EditTextWidget::endEditMode() {
releaseFocus();
- sendCommand(kExitTxtCmd, 0);
sendCommand(_finishCmd, 0);
}
@@ -143,8 +142,4 @@ void EditTextWidget::abortEditMode() {
releaseFocus();
}
-Common::String EditTextWidget::getEditString() {
- return _backupString;
-}
-
} // End of namespace GUI
diff --git a/gui/widgets/edittext.h b/gui/widgets/edittext.h
index d382c8f067..9a1b698606 100644
--- a/gui/widgets/edittext.h
+++ b/gui/widgets/edittext.h
@@ -29,10 +29,6 @@
namespace GUI {
-enum {
- kExitTxtCmd = 'TXTE'
-};
-
/* EditTextWidget */
class EditTextWidget : public EditableWidget {
protected:
@@ -48,7 +44,6 @@ public:
EditTextWidget(GuiObject *boss, const String &name, const String &text, const char *tooltp = 0, uint32 cmd = 0, uint32 finishCmd = 0);
void setEditString(const String &str);
- String getEditString();
virtual void handleMouseDown(int x, int y, int button, int clickCount);