From 65e61cdca4cce6bcc491608fb4971cb55ea37aa8 Mon Sep 17 00:00:00 2001 From: stippi Date: Mon, 5 Apr 2010 17:05:17 +0000 Subject: [PATCH] * 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 "*". git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@387 94f232f2-1747-11df-bad5-a5bfde151594 --- src/apps/webpositive/BrowserApp.cpp | 9 ++++++--- src/apps/webpositive/BrowserWindow.cpp | 7 +++++-- src/apps/webpositive/svn_revision.cpp | 10 ++++++++++ src/apps/webpositive/svn_revision.h | 15 +++++++++++++++ 4 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 src/apps/webpositive/svn_revision.cpp create mode 100644 src/apps/webpositive/svn_revision.h diff --git a/src/apps/webpositive/BrowserApp.cpp b/src/apps/webpositive/BrowserApp.cpp index 756970e686..29439d2fde 100644 --- a/src/apps/webpositive/BrowserApp.cpp +++ b/src/apps/webpositive/BrowserApp.cpp @@ -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 @@ BrowserApp::~BrowserApp() 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(); } diff --git a/src/apps/webpositive/BrowserWindow.cpp b/src/apps/webpositive/BrowserWindow.cpp index 399c258611..4b7cdc8c4e 100644 --- a/src/apps/webpositive/BrowserWindow.cpp +++ b/src/apps/webpositive/BrowserWindow.cpp @@ -273,8 +273,11 @@ BrowserWindow::BrowserWindow(BRect frame, ToolbarPolicy toolbarPolicy, 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); diff --git a/src/apps/webpositive/svn_revision.cpp b/src/apps/webpositive/svn_revision.cpp new file mode 100644 index 0000000000..489c64cdd4 --- /dev/null +++ b/src/apps/webpositive/svn_revision.cpp @@ -0,0 +1,10 @@ +/* + * Copyright 2006-2009, Ingo Weinhold + * All rights reserved. Distributed under the terms of the MIT License. + */ + +#include "svn_revision.h" + +const int32 kSVNRevision = + #include "svn_revision" +; diff --git a/src/apps/webpositive/svn_revision.h b/src/apps/webpositive/svn_revision.h new file mode 100644 index 0000000000..fff9e9b122 --- /dev/null +++ b/src/apps/webpositive/svn_revision.h @@ -0,0 +1,15 @@ +/* + * Copyright 2006-2009, Ingo Weinhold + * All rights reserved. Distributed under the terms of the MIT License. + */ + +#ifndef SVN_REVISION_H +#define SVN_REVISION_H + +#include + + +extern const int32 kSVNRevision; + + +#endif // SVN_REVISION_H