[Scummvm-cvs-logs] CVS: scummvm/gui browser.cpp,1.2,1.3 browser.h,1.2,1.3
Max Horn
fingolfin at users.sourceforge.net
Fri Nov 15 09:55:09 CET 2002
Update of /cvsroot/scummvm/scummvm/gui
In directory usw-pr-cvs1:/tmp/cvs-serv30537
Modified Files:
browser.cpp browser.h
Log Message:
enabled 'Go Up' button
Index: browser.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/browser.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- browser.cpp 14 Nov 2002 14:42:39 -0000 1.2
+++ browser.cpp 15 Nov 2002 17:54:48 -0000 1.3
@@ -36,7 +36,8 @@
};
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 @@
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 @@
close();
break;
case kGoUpCmd:
-/*
tmp = _node->parent();
delete _node;
_node = tmp;
updateListing();
-*/
break;
case kListItemDoubleClickedCmd:
tmp = (*_nodeContent)[data].clone();
Index: browser.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/browser.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- browser.h 14 Nov 2002 14:42:39 -0000 1.2
+++ browser.h 15 Nov 2002 17:54:49 -0000 1.3
@@ -37,7 +37,8 @@
public:
BrowserDialog(NewGui *gui);
- virtual void open();
+ virtual void open();
+ virtual void close();
virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
protected:
More information about the Scummvm-git-logs
mailing list