From 6084a1e1a4df74cf4a915fb0a14e2ca63ee80f6a Mon Sep 17 00:00:00 2001 From: John Scipione Date: Fri, 14 Dec 2012 19:28:05 -0500 Subject: [PATCH] Update the about window of WebPositive. Also update the version number to 1.1-alpha in the rdef file matching the text on the old about window. --- src/apps/webpositive/BrowserApp.cpp | 48 +++++++++++++++++++-------- src/apps/webpositive/BrowserApp.h | 4 +++ src/apps/webpositive/Jamfile | 5 +-- src/apps/webpositive/WebPositive.rdef | 8 ++--- 4 files changed, 46 insertions(+), 19 deletions(-) diff --git a/src/apps/webpositive/BrowserApp.cpp b/src/apps/webpositive/BrowserApp.cpp index 02616b8bba..e4a0627776 100644 --- a/src/apps/webpositive/BrowserApp.cpp +++ b/src/apps/webpositive/BrowserApp.cpp @@ -28,6 +28,7 @@ #include "BrowserApp.h" +#include #include #include #include @@ -75,7 +76,8 @@ BrowserApp::BrowserApp() fCookies(NULL), fCookieJar(NULL), fDownloadWindow(NULL), - fSettingsWindow(NULL) + fSettingsWindow(NULL), + fAboutWindow(NULL) { } @@ -86,25 +88,45 @@ BrowserApp::~BrowserApp() delete fSettings; delete fCookies; delete fCookieJar; + + if (fAboutWindow != NULL) + fAboutWindow->Quit(); } void BrowserApp::AboutRequested() { - BString aboutText("WebPositive\n\nby Ryan Leavengood, Andrea Anzani, " - "Maxime Simon, Michael Lotz, Rene Gollent, Stephan Aßmus and " - "Alexandre Deckner"); - aboutText << "\n\nWebPositive 1.1"; - aboutText << "\n\nHaikuWebKit " << WebKitInfo::HaikuWebKitVersion(); - aboutText << " (" << WebKitInfo::HaikuWebKitRevision() << ")"; - aboutText << "\nWebKit " << WebKitInfo::WebKitVersion(); - aboutText << " (" << WebKitInfo::WebKitRevision() << ")"; + if (fAboutWindow == NULL) { + // create the about window - BAlert* alert = new BAlert("About WebPositive", aboutText.String(), - "Sweet!"); - alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); - alert->Go(NULL); + const char* authors[] = { + "Andrea Anzani", + "Stephan Aßmus", + "Alexandre Deckner", + "Rene Gollent", + "Ryan Leavengood", + "Michael Lotz", + "Maxime Simon", + NULL + }; + + BString aboutText(""); + aboutText << "HaikuWebKit " << WebKitInfo::HaikuWebKitVersion(); + aboutText << " (" << WebKitInfo::HaikuWebKitRevision() << ")"; + aboutText << "\nWebKit " << WebKitInfo::WebKitVersion(); + aboutText << " (" << WebKitInfo::WebKitRevision() << ")"; + + fAboutWindow = new BAboutWindow(kApplicationName, + kApplicationSignature); + fAboutWindow->AddCopyright(2007, "Haiku, Inc."); + fAboutWindow->AddAuthors(authors); + fAboutWindow->AddExtraInfo(aboutText.String()); + fAboutWindow->Show(); + } else if (fAboutWindow->IsHidden()) + fAboutWindow->Show(); + else + fAboutWindow->Activate(); } diff --git a/src/apps/webpositive/BrowserApp.h b/src/apps/webpositive/BrowserApp.h index 05885583f6..19e4860969 100644 --- a/src/apps/webpositive/BrowserApp.h +++ b/src/apps/webpositive/BrowserApp.h @@ -33,6 +33,8 @@ #include #include + +class BAboutWindow; class BNetworkCookieJar; class DownloadWindow; class BrowserWindow; @@ -77,6 +79,8 @@ private: DownloadWindow* fDownloadWindow; SettingsWindow* fSettingsWindow; + + BAboutWindow* fAboutWindow; }; diff --git a/src/apps/webpositive/Jamfile b/src/apps/webpositive/Jamfile index bba0c66f86..df45942fea 100644 --- a/src/apps/webpositive/Jamfile +++ b/src/apps/webpositive/Jamfile @@ -50,7 +50,6 @@ local sources = URLInputGroup.cpp ; - Includes [ FGristFiles $(sources) ] : $(HAIKU_WEBKIT_HEADERS_DEPENDENCY) ; # Dependency needed to trigger downloading/unzipping the package before # compiling the files. @@ -60,12 +59,14 @@ Includes [ FGristFiles $(sources) ] : $(HAIKU_WEBKIT_HEADERS_DEPENDENCY) ; #MakeLocate $(svnRevisionFile) : $(LOCATE_TARGET) ; #CreateSVNRevisionFile $(svnRevisionFile) ; +UsePrivateHeaders shared ; + Application WebPositive : $(sources) : $(HAIKU_WEBKIT_LIBS) $(TARGET_LIBSTDC++) $(HAIKU_LOCALE_LIBS) - be network tracker translation + be libshared.a network tracker translation : WebPositive.rdef ; diff --git a/src/apps/webpositive/WebPositive.rdef b/src/apps/webpositive/WebPositive.rdef index 9b475b34d1..15d1b92913 100644 --- a/src/apps/webpositive/WebPositive.rdef +++ b/src/apps/webpositive/WebPositive.rdef @@ -1,13 +1,13 @@ resource app_signature "application/x-vnd.Haiku-WebPositive"; resource app_version { - major = 0, - middle = 0, - minor = 1, + major = 1, + middle = 1, + minor = 0, variety = B_APPV_ALPHA, internal = 0, short_info = "WebPositive", - long_info = "WebPositive ©2007-2010 The WebKit Haiku Project" + long_info = "WebPositive ©2007-2012 The WebKit Haiku Project" }; resource app_flags B_SINGLE_LAUNCH;