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

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Fri Aug 14 18:32:08 CEST 2009


Revision: 43373
          http://scummvm.svn.sourceforge.net/scummvm/?rev=43373&view=rev
Author:   fingolfin
Date:     2009-08-14 16:32:07 +0000 (Fri, 14 Aug 2009)

Log Message:
-----------
Set tools GUI application name in one central place and use that everywhere; changed name of the .app bundle accordingly; tweaked the OS X menu bar a bit (still wrong, but less so)

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

Modified: tools/branches/gsoc2009-gui/Makefile
===================================================================
--- tools/branches/gsoc2009-gui/Makefile	2009-08-14 16:22:30 UTC (rev 43372)
+++ tools/branches/gsoc2009-gui/Makefile	2009-08-14 16:32:07 UTC (rev 43373)
@@ -82,7 +82,7 @@
 install: $(TARGETS)
 	for i in $^ ; do install -p -m 0755 $$i $(DESTDIR) ; done
 
-bundle_name = ScummVM\ Tools\ GUI.app
+bundle_name = ScummVM\ Tools.app
 bundle: $(TARGETS)
 	mkdir -p $(bundle_name)
 	mkdir -p $(bundle_name)/Contents

Modified: tools/branches/gsoc2009-gui/gui/main.cpp
===================================================================
--- tools/branches/gsoc2009-gui/gui/main.cpp	2009-08-14 16:22:30 UTC (rev 43372)
+++ tools/branches/gsoc2009-gui/gui/main.cpp	2009-08-14 16:32:07 UTC (rev 43373)
@@ -54,9 +54,11 @@
 bool ScummVMToolsApp::OnInit() {
 	// Init tools
 	g_tools.init();
+	
+	SetAppName(wxT("ScummVM Tools"));
 
 	// Create window & display
-	ScummToolsFrame *frame = new ScummToolsFrame(wxT("ScummVM Tools"), wxDefaultPosition, wxSize(600,400));
+	ScummToolsFrame *frame = new ScummToolsFrame(GetAppName(), wxDefaultPosition, wxSize(600,400));
 #ifdef __WXMAC__ // Menu bar looks ugly when it's part of the window, on OSX it's not
 	frame->CreateMenuBar();
 #endif
@@ -84,6 +86,7 @@
 	wxAboutDialogInfo about = wxAboutDialogInfo();
 	about.SetVersion(wxT("Development Version"));
 	about.SetCopyright(wxT("ScummVM Team 2009"));
+	about.SetWebSite(wxT("http://www.scummvm.org"));
 	about.SetLicense(
 		wxT("Published under the GNU General Public License\n")
 		wxT("This program comes with ABSOLUTELY NO WARRANTY\n")
@@ -132,7 +135,7 @@
 	wxPanel *linepanel = new wxPanel(main, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE, wxT("Wizard Line Panel"));
 	wxSizer *linesizer = new wxBoxSizer(wxHORIZONTAL);
 	
-	wxStaticText *linetext = new wxStaticText(linepanel, wxID_ANY, wxT("ScummVM Tools"));
+	wxStaticText *linetext = new wxStaticText(linepanel, wxID_ANY, wxGetApp().GetAppName());
 	linesizer->Add(linetext, wxSizerFlags());
 	linetext->Disable();
 
@@ -162,17 +165,15 @@
 }
 
 void ScummToolsFrame::CreateMenuBar() {
-	wxMenuBar* menubar = new wxMenuBar();
+	wxMenuBar *menubar = new wxMenuBar();
+
 	// Name of this seems really inappropriate
-	wxMenu* testmenu = new  wxMenu(wxT("File"));
+	wxMenu *helpmenu = new wxMenu();
+	//filemenu->Append(wxID_PREFERENCES, wxT("&Preferences"));
+	helpmenu->Append(wxID_HELP, wxT("&Help"));
+	helpmenu->Append(wxID_ABOUT, wxT("&About ") + wxGetApp().GetAppName());
+	menubar->Append(helpmenu, wxT("Help"));
 
-	//testmenu->Append(wxID_PREFERENCES, wxT("&Preferences"));
-	testmenu->Append(wxID_HELP, wxT("&Help"));
-	testmenu->Append(wxID_ABOUT, wxT("&About"));
-	testmenu->Append(wxID_EXIT, wxT("&Exit"));
-	
-	menubar->Append(testmenu, wxT("File"));
-
 	SetMenuBar(menubar);
 }
 
@@ -304,7 +305,7 @@
 	showAbort(false);
 	showNavigation(true);
 
-	wxString label(wxT("ScummVM Tools"));
+	wxString label(wxGetApp().GetAppName());
 	if (_configuration.selectedTool)
 		label << wxT(" - ") << _configuration.selectedTool->getName();
 	setLineLabel(label);


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