[Scummvm-cvs-logs] SF.net SVN: scummvm:[41971] tools/branches/gsoc2009-gui/gui
Remere at users.sourceforge.net
Remere at users.sourceforge.net
Tue Jun 30 03:13:21 CEST 2009
Revision: 41971
http://scummvm.svn.sourceforge.net/scummvm/?rev=41971&view=rev
Author: Remere
Date: 2009-06-30 01:13:21 +0000 (Tue, 30 Jun 2009)
Log Message:
-----------
*Added "Finish" page, and some bugfixes to the process page to prevent wx errors from popping up when the exec did not succeed.
Modified Paths:
--------------
tools/branches/gsoc2009-gui/gui/pages.cpp
tools/branches/gsoc2009-gui/gui/pages.h
Modified: tools/branches/gsoc2009-gui/gui/pages.cpp
===================================================================
--- tools/branches/gsoc2009-gui/gui/pages.cpp 2009-06-30 00:00:06 UTC (rev 41970)
+++ tools/branches/gsoc2009-gui/gui/pages.cpp 2009-06-30 01:13:21 UTC (rev 41971)
@@ -937,7 +937,7 @@
wxASSERT_MSG(stream, wxT("Could not bind input stream!"));
- while(stream->CanRead()) {
+ while(stream && stream->CanRead()) {
wxFileOffset off = stream->GetLength();
if(off = wxInvalidOffset) {
return false;
@@ -965,14 +965,15 @@
outwin->WriteText(wxT("Subprocess exited sucessfully!"));
}
_finished = true;
+ _process = NULL;
updateButtons(panel, static_cast<WizardButtons *>(_topframe->FindWindowByName(wxT("WizardButtonPanel"))));
}
-/*
+
void ProcessPage::onNext(wxWindow *panel) {
- switchPage(new ChooseInOutPage(_topframe));
-}*/
+ switchPage(new FinishPage(_topframe));
+}
void ProcessPage::updateButtons(wxWindow *panel, WizardButtons *buttons) {
if(_success) {
@@ -987,6 +988,47 @@
}
}
+// Page to choose ANY tool to use
+FinishPage::FinishPage(ScummToolsFrame* frame)
+ : WizardPage(frame)
+{
+}
-
\ No newline at end of file
+wxWindow *FinishPage::CreatePanel(wxWindow *parent) {
+ wxWindow *panel = WizardPage::CreatePanel(parent);
+
+ wxSizer *sizer = new wxBoxSizer(wxVERTICAL);
+
+ sizer->AddSpacer(15);
+
+ wxString text = wxT("You have finished the wizard! Your files should now be extracted or compressed.");
+ sizer->Add(new wxStaticText(panel, wxID_ANY, text));
+
+ sizer->AddSpacer(10);
+
+ wxCheckBox *displayOut = new wxCheckBox(panel, wxID_ANY, wxT("Open output folder"), wxDefaultPosition, wxDefaultSize,
+ 0, wxDefaultValidator, wxT("DisplayOutput"));
+ sizer->Add(displayOut);
+
+ SetAlignedSizer(panel, sizer);
+
+ return panel;
+}
+
+void FinishPage::onNext(wxWindow *panel) {
+ wxCheckBox *display = static_cast<wxCheckBox *>(panel->FindWindowByName(wxT("DisplayOutput")));
+ if(display->GetValue())
+ // Haven't found the function to do this yet...
+ //wxOpenExplorer(_topframe->_configuration.outputPath);
+ ;
+ _topframe->Close(true);
+}
+
+void FinishPage::updateButtons(wxWindow *panel, WizardButtons *buttons) {
+ buttons->enablePrevious(false);
+ buttons->showFinish(true);
+}
+
+
+
Modified: tools/branches/gsoc2009-gui/gui/pages.h
===================================================================
--- tools/branches/gsoc2009-gui/gui/pages.h 2009-06-30 00:00:06 UTC (rev 41970)
+++ tools/branches/gsoc2009-gui/gui/pages.h 2009-06-30 01:13:21 UTC (rev 41971)
@@ -323,7 +323,7 @@
bool onIdle(wxPanel *panel);
- //void onNext(wxWindow *panel);
+ void onNext(wxWindow *panel);
void updateButtons(wxWindow *panel, WizardButtons *buttons);
@@ -331,3 +331,20 @@
DECLARE_EVENT_TABLE()
};
+
+/**
+ * Just displays that we extracted the files, and offers to open the target folder
+ *
+ */
+
+class FinishPage : public WizardPage
+{
+public:
+ FinishPage(ScummToolsFrame* frame);
+
+ wxWindow *CreatePanel(wxWindow *parent);
+
+ void onNext(wxWindow *panel);
+
+ void updateButtons(wxWindow *panel, WizardButtons *buttons);
+};
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