Author: stippi Date: Mon Apr 5 17:05:17 2010 New Revision: 387 URL: http://mmlr.dyndns.org/changeset/387 Log: * Make use of the new svn revision jam magic to embed the current svn version into the about window. * Give access to the about window from the browser windows. * Renamed the "Show *" entries in the Window menu to just "*". Added: webkit/trunk/WebKit/haiku/WebPositive/svn_revision.cpp webkit/trunk/WebKit/haiku/WebPositive/svn_revision.h Modified: webkit/trunk/WebKit/Jamfile webkit/trunk/WebKit/haiku/WebPositive/BrowserApp.cpp webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.cpp Modified: webkit/trunk/WebKit/Jamfile ============================================================================== --- webkit/trunk/WebKit/Jamfile Mon Apr 5 17:02:48 2010 (r386) +++ webkit/trunk/WebKit/Jamfile Mon Apr 5 17:05:17 2010 (r387) @@ -121,6 +121,12 @@ SEARCH_SOURCE += [ FDirName $(TOP) WebKit haiku WebPositive autocompletion ] ; SEARCH_SOURCE += [ FDirName $(TOP) WebKit haiku WebPositive support ] ; +# SVN revision +local svnRevisionFile = [ FGristFiles svn_revision ] ; +MakeLocate $(svnRevisionFile) : $(LOCATE_TARGET) ; +CreateSVNRevisionFile $(svnRevisionFile) ; + + Application WebPositive : # autocompletion AutoCompleter.cpp @@ -140,6 +146,7 @@ BrowserApp.cpp BrowserWindow.cpp SettingsWindow.cpp + svn_revision.cpp WebTabView.cpp : Modified: webkit/trunk/WebKit/haiku/WebPositive/BrowserApp.cpp ============================================================================== --- webkit/trunk/WebKit/haiku/WebPositive/BrowserApp.cpp Mon Apr 5 17:02:48 2010 (r386) +++ webkit/trunk/WebKit/haiku/WebPositive/BrowserApp.cpp Mon Apr 5 17:05:17 2010 (r387) @@ -34,6 +34,7 @@ #include "DownloadWindow.h" #include "SettingsMessage.h" #include "SettingsWindow.h" +#include "svn_revision.h" #include "NetworkCookieJar.h" #include "WebPage.h" #include "WebSettings.h" @@ -86,9 +87,11 @@ void BrowserApp::AboutRequested() { - BAlert* alert = new BAlert("About WebPositive", - "WebPositive\n\nby Ryan Leavengood, Andrea Anzani, " - "Maxime Simone, Michael Lotz, Rene Gollent and Stephan Aßmus", + BString aboutText("WebPositive\n\nby Ryan Leavengood, Andrea Anzani, " + "Maxime Simone, Michael Lotz, Rene Gollent and Stephan Aßmus"); + aboutText << "\n\nSVN revision: " << kSVNRevision; + + BAlert* alert = new BAlert("About WebPositive", aboutText.String(), "Sweet!"); alert->Go(); } Modified: webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.cpp ============================================================================== --- webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.cpp Mon Apr 5 17:02:48 2010 (r386) +++ webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.cpp Mon Apr 5 17:05:17 2010 (r387) @@ -273,8 +273,11 @@ menu->AddItem(new BMenuItem("Close window", new BMessage(B_QUIT_REQUESTED), 'W', B_SHIFT_KEY)); menu->AddItem(new BMenuItem("Close tab", new BMessage(CLOSE_TAB), 'W')); menu->AddSeparatorItem(); - menu->AddItem(new BMenuItem("Show downloads", new BMessage(SHOW_DOWNLOAD_WINDOW), 'J')); - menu->AddItem(new BMenuItem("Show settings", new BMessage(SHOW_SETTINGS_WINDOW))); + menu->AddItem(new BMenuItem("Downloads", new BMessage(SHOW_DOWNLOAD_WINDOW), 'J')); + menu->AddItem(new BMenuItem("Settings", new BMessage(SHOW_SETTINGS_WINDOW))); + BMenuItem* aboutItem = new BMenuItem("About", new BMessage(B_ABOUT_REQUESTED)); + menu->AddItem(aboutItem); + aboutItem->SetTarget(be_app); menu->AddSeparatorItem(); BMenuItem* quitItem = new BMenuItem("Quit", new BMessage(B_QUIT_REQUESTED), 'Q'); menu->AddItem(quitItem); Added: webkit/trunk/WebKit/haiku/WebPositive/svn_revision.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ webkit/trunk/WebKit/haiku/WebPositive/svn_revision.cpp Mon Apr 5 17:05:17 2010 (r387) @@ -0,0 +1,10 @@ +/* + * Copyright 2006-2009, Ingo Weinhold <ingo_weinhold@xxxxxx> + * All rights reserved. Distributed under the terms of the MIT License. + */ + +#include "svn_revision.h" + +const int32 kSVNRevision = + #include "svn_revision" +; Added: webkit/trunk/WebKit/haiku/WebPositive/svn_revision.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ webkit/trunk/WebKit/haiku/WebPositive/svn_revision.h Mon Apr 5 17:05:17 2010 (r387) @@ -0,0 +1,15 @@ +/* + * Copyright 2006-2009, Ingo Weinhold <ingo_weinhold@xxxxxx> + * All rights reserved. Distributed under the terms of the MIT License. + */ + +#ifndef SVN_REVISION_H +#define SVN_REVISION_H + +#include <SupportDefs.h> + + +extern const int32 kSVNRevision; + + +#endif // SVN_REVISION_H