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

Remere at users.sourceforge.net Remere at users.sourceforge.net
Mon Aug 17 03:16:42 CEST 2009


Revision: 43456
          http://scummvm.svn.sourceforge.net/scummvm/?rev=43456&view=rev
Author:   Remere
Date:     2009-08-17 01:16:42 +0000 (Mon, 17 Aug 2009)

Log Message:
-----------
*Change "PC" platform to include the OSes (Windows/Linux/Mac)
*Menu bar now has a "Manual Page" and "Visit Website" options.
*Use resource directory on all platforms but Windows.

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

Modified: tools/branches/gsoc2009-gui/gui/configuration.h
===================================================================
--- tools/branches/gsoc2009-gui/gui/configuration.h	2009-08-17 00:47:37 UTC (rev 43455)
+++ tools/branches/gsoc2009-gui/gui/configuration.h	2009-08-17 01:16:42 UTC (rev 43456)
@@ -137,7 +137,7 @@
 	wxArrayString platforms;
 	// Just add new platforms here, it's easy!
 	// You specify additional defaults in the next function
-	platforms.Add(wxT("PC"));
+	platforms.Add(wxT("PC (Windows, Linux, Mac)"));
 	platforms.Add(wxT("iPhone"));
 	platforms.Add(wxT("Nintendo DS"));
 	platforms.Add(wxT("PlayStation 2"));

Modified: tools/branches/gsoc2009-gui/gui/main.cpp
===================================================================
--- tools/branches/gsoc2009-gui/gui/main.cpp	2009-08-17 00:47:37 UTC (rev 43455)
+++ tools/branches/gsoc2009-gui/gui/main.cpp	2009-08-17 01:16:42 UTC (rev 43456)
@@ -106,6 +106,8 @@
 	//EVT_MENU(wxID_PREFERENCES, ScummToolsFrame::onMenuPreferences)
 	EVT_BUTTON(ID_HELP, ScummToolsFrame::onMenuHelp)
 	EVT_MENU(wxID_HELP, ScummToolsFrame::onMenuHelp)
+	EVT_MENU(ID_MANUAL, ScummToolsFrame::onMenuManual)
+	EVT_MENU(ID_WEBSITE, ScummToolsFrame::onMenuWebsite)
 	EVT_MENU(wxID_ABOUT, ScummToolsFrame::onMenuAbout)
 	EVT_BUTTON(ID_ABOUT, ScummToolsFrame::onMenuAbout)
 	EVT_MENU(wxID_EXIT, ScummToolsFrame::onMenuExit)
@@ -176,6 +178,8 @@
 	wxMenu *helpmenu = new wxMenu();
 	//filemenu->Append(wxID_PREFERENCES, wxT("&Preferences"));
 	helpmenu->Append(wxID_HELP, wxT("Help"));
+	helpmenu->Append(ID_MANUAL, wxT("&Manual Page"));
+	helpmenu->Append(ID_WEBSITE, wxT("Visit ScummVM &Website"));
 	helpmenu->Append(wxID_ABOUT, wxT("&About ") + wxGetApp().GetAppName());
 	menubar->Append(helpmenu, wxT("Help"));
 
@@ -225,6 +229,15 @@
 	dlg.ShowModal();
 }
 
+void ScummToolsFrame::onMenuManual(wxCommandEvent &evt) {
+	// Wiki page
+	::wxLaunchDefaultBrowser(wxT("http://wiki.scummvm.org/index.php/User_Manual/Appendix:_Tools"));
+}
+
+void ScummToolsFrame::onMenuWebsite(wxCommandEvent &evt) {
+	::wxLaunchDefaultBrowser(wxT("http://scummvm.org"));
+}
+
 void ScummToolsFrame::onMenuAbout(wxCommandEvent &evt) {
 	wxGetApp().OnAbout();
 }
@@ -297,7 +310,7 @@
 	_cancel->SetSize(80, -1);
 	sizer->Add(_cancel, wxSizerFlags().Right().ReserveSpaceEvenIfHidden());
 	
-	topsizer->Add(sizer, wxSizerFlags().Right());
+	topsizer->Add(sizer, wxSizerFlags().Right().Border());
 
 	SetSizerAndFit(topsizer);
 
@@ -406,12 +419,14 @@
 		wxImage::AddHandler(new wxGIFHandler);
 
 	// Load image files
-#ifdef __WXMAC__
+#ifdef __WXWINDOWS__
+	// Windows likes subfolders for media files
+	_logo.LoadFile(wxT("media/logo.jpg"), wxBITMAP_TYPE_JPEG);
+	_tile.LoadFile(wxT("media/tile.gif"), wxBITMAP_TYPE_GIF);
+#else
+	// On other platforms, files are more scattered, and we use the standard resource dir
 	_logo.LoadFile(wxStandardPaths::Get().GetResourcesDir() + wxT("/logo.jpg"), wxBITMAP_TYPE_JPEG);
 	_tile.LoadFile(wxStandardPaths::Get().GetResourcesDir() + wxT("/tile.gif"), wxBITMAP_TYPE_GIF);
-#else
-	_logo.LoadFile(wxT("media/logo.jpg"), wxBITMAP_TYPE_JPEG);
-	_tile.LoadFile(wxT("media/tile.gif"), wxBITMAP_TYPE_GIF);
 #endif
 
 	// Load font

Modified: tools/branches/gsoc2009-gui/gui/main.h
===================================================================
--- tools/branches/gsoc2009-gui/gui/main.h	2009-08-17 00:47:37 UTC (rev 43455)
+++ tools/branches/gsoc2009-gui/gui/main.h	2009-08-17 01:16:42 UTC (rev 43456)
@@ -42,6 +42,8 @@
 	ID_COMPRESS,
 	ID_EXTRACT,
 	ID_ADVANCED,
+	ID_WEBSITE,
+	ID_MANUAL,
 };
 
 /**
@@ -100,6 +102,8 @@
 	void onClose(wxCloseEvent &evt);
 
 	void onMenuHelp(wxCommandEvent &evt);
+	void onMenuWebsite(wxCommandEvent &evt);
+	void onMenuManual(wxCommandEvent &evt);
 	void onMenuAbout(wxCommandEvent &evt);
 	void onMenuExit(wxCommandEvent &evt);
 


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