[Scummvm-cvs-logs] SF.net SVN: scummvm:[43455] tools/branches/gsoc2009-gui/gui

Remere at users.sourceforge.net Remere at users.sourceforge.net
Mon Aug 17 02:47:38 CEST 2009


Revision: 43455
          http://scummvm.svn.sourceforge.net/scummvm/?rev=43455&view=rev
Author:   Remere
Date:     2009-08-17 00:47:37 +0000 (Mon, 17 Aug 2009)

Log Message:
-----------
*Fixed bug with Previous displaying on the first page sometimes.
*Changed static box to invisible box, looks better (static boxes are evil).

Modified Paths:
--------------
    tools/branches/gsoc2009-gui/gui/main.cpp
    tools/branches/gsoc2009-gui/gui/main.h
    tools/branches/gsoc2009-gui/gui/pages.cpp

Modified: tools/branches/gsoc2009-gui/gui/main.cpp
===================================================================
--- tools/branches/gsoc2009-gui/gui/main.cpp	2009-08-17 00:15:30 UTC (rev 43454)
+++ tools/branches/gsoc2009-gui/gui/main.cpp	2009-08-17 00:47:37 UTC (rev 43455)
@@ -211,6 +211,7 @@
 
 	// And reset the buttons to a standard state
 	_buttons->reset();
+	_buttons->showPrevious(_pages.size() > 1);
 	_buttons->setPage(_pages.back(), newPanel);
 }
 
@@ -363,6 +364,14 @@
 	}
 }
 
+void WizardButtons::showPrevious(bool show) {
+	if (show) {
+		_prev->Show();
+	} else {
+		_prev->Hide();
+	}
+}
+
 // wx event handlers
 
 void WizardButtons::onClickNext(wxCommandEvent &e) {

Modified: tools/branches/gsoc2009-gui/gui/main.h
===================================================================
--- tools/branches/gsoc2009-gui/gui/main.h	2009-08-17 00:15:30 UTC (rev 43454)
+++ tools/branches/gsoc2009-gui/gui/main.h	2009-08-17 00:47:37 UTC (rev 43455)
@@ -172,6 +172,12 @@
 	void showNavigation(bool show);
 
 	/**
+	 * Display the previous button.
+	 * If the showNavigation has been used, this overrides that (for the previous button).
+	 */ 
+	void showPrevious(bool show);
+
+	/**
 	 * Changes name of the 'next' button to finish
 	 */
 	void showFinish(bool show);

Modified: tools/branches/gsoc2009-gui/gui/pages.cpp
===================================================================
--- tools/branches/gsoc2009-gui/gui/pages.cpp	2009-08-17 00:15:30 UTC (rev 43454)
+++ tools/branches/gsoc2009-gui/gui/pages.cpp	2009-08-17 00:47:37 UTC (rev 43455)
@@ -133,7 +133,7 @@
 	// on specific measurements from different platforms...
 
 	buttonpanel = new wxPanel(panel, wxID_ANY);
-	buttonsizer = new wxStaticBoxSizer(wxVERTICAL, buttonpanel, wxT(""));
+	buttonsizer = new wxBoxSizer(wxVERTICAL);
 	buttonsizer->Add(new wxButton(buttonpanel, ID_COMPRESS, wxT("Compress")), wxSizerFlags().Expand());
 	buttonsizer->Add(new wxStaticText(buttonpanel, wxID_ANY, 
 		wxT("Compress game audio files into archive files for use with ScummVM."),
@@ -145,7 +145,7 @@
 	sidesizer->AddSpacer(15);
 
 	buttonpanel = new wxPanel(panel, wxID_ANY);
-	buttonsizer = new wxStaticBoxSizer(wxVERTICAL, buttonpanel, wxT(""));
+	buttonsizer = new wxBoxSizer(wxVERTICAL);
 	buttonsizer->Add(new wxButton(buttonpanel, ID_EXTRACT, wxT("Extract")), wxSizerFlags().Expand());
 	buttonsizer->Add(new wxStaticText(buttonpanel, wxID_ANY, 
 		wxT("Extract the contents of archive files used by many games."),
@@ -157,7 +157,7 @@
 	sidesizer->AddSpacer(15);
 
 	buttonpanel = new wxPanel(panel, wxID_ANY);
-	buttonsizer = new wxStaticBoxSizer(wxVERTICAL, buttonpanel, wxT(""));
+	buttonsizer = new wxBoxSizer(wxVERTICAL);
 	buttonsizer->Add(new wxButton(buttonpanel, ID_ADVANCED, wxT("Advanced")), wxSizerFlags().Expand());
 	buttonsizer->Add(new wxStaticText(buttonpanel, wxID_ANY, 
 		wxT("Choose the precise tool you want to use."),


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list