aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorMax Horn2002-11-15 17:54:49 +0000
committerMax Horn2002-11-15 17:54:49 +0000
commiteaa0e48741c1737a0d17277d67d5194c3a6da734 (patch)
tree727c8d9a8ef332bfee516c9c2ab086166160c290 /gui
parentfe313cea679847db4cd979f7d45cced2f732eb14 (diff)
downloadscummvm-rg350-eaa0e48741c1737a0d17277d67d5194c3a6da734.tar.gz
scummvm-rg350-eaa0e48741c1737a0d17277d67d5194c3a6da734.tar.bz2
scummvm-rg350-eaa0e48741c1737a0d17277d67d5194c3a6da734.zip
enabled 'Go Up' button
svn-id: r5572
Diffstat (limited to 'gui')
-rw-r--r--gui/browser.cpp17
-rw-r--r--gui/browser.h3
2 files changed, 16 insertions, 4 deletions
diff --git a/gui/browser.cpp b/gui/browser.cpp
index 48f30ee632..44f1f94e34 100644
--- a/gui/browser.cpp
+++ b/gui/browser.cpp
@@ -36,7 +36,8 @@ enum {
};
BrowserDialog::BrowserDialog(NewGui *gui)
- : Dialog(gui, 40, 10, 320-2*40, 200-2*10)
+ : Dialog(gui, 40, 10, 320-2*40, 200-2*10),
+ _node(0), _nodeContent(0)
{
// Headline - TODO: should be customizable during creation time
new StaticTextWidget(this, 10, 8, _w-2*10, kLineHeight,
@@ -74,6 +75,18 @@ void BrowserDialog::open()
Dialog::open();
}
+void BrowserDialog::close()
+{
+ delete _node;
+ _node = 0;
+
+ delete _nodeContent;
+ _nodeContent = 0;
+
+ // Call super implementation
+ Dialog::close();
+}
+
void BrowserDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data)
{
FilesystemNode *tmp;
@@ -86,12 +99,10 @@ void BrowserDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data
close();
break;
case kGoUpCmd:
-/*
tmp = _node->parent();
delete _node;
_node = tmp;
updateListing();
-*/
break;
case kListItemDoubleClickedCmd:
tmp = (*_nodeContent)[data].clone();
diff --git a/gui/browser.h b/gui/browser.h
index 015d0d536a..4fda0b1596 100644
--- a/gui/browser.h
+++ b/gui/browser.h
@@ -37,7 +37,8 @@ class BrowserDialog : public Dialog {
public:
BrowserDialog(NewGui *gui);
- virtual void open();
+ virtual void open();
+ virtual void close();
virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
protected: