diff --git a/mozilla/camino/src/application/MainController.mm b/mozilla/camino/src/application/MainController.mm index aee7bdb0464..b2863d726db 100644 --- a/mozilla/camino/src/application/MainController.mm +++ b/mozilla/camino/src/application/MainController.mm @@ -930,14 +930,19 @@ NSString* const kPreviousSessionTerminatedNormallyKey = @"PreviousSessionTermina // // -aboutWindow: // -// Show the (slightly modified) standard about window, with the build id instead of the -// typical application version. It'll display like "2003120403 (v0.7+)". +// Show the standard AppKit about window, but replace the build version in +// parentheses with the Gecko version and build ID. The build version +// normally comes from the CFBundleVersion key, but since that's not compatible +// with Mozilla build IDs, we've got to do this ourselves. // - (IBAction)aboutWindow:(id)sender { - NSString* version = [XULAppInfo appBuildID]; - NSDictionary* d = [NSDictionary dictionaryWithObject:version forKey:@"ApplicationVersion"]; - [NSApp orderFrontStandardAboutPanelWithOptions:d]; + NSString* buildVersion = [NSString stringWithFormat:@"%@ %@", + [XULAppInfo platformVersion], + [XULAppInfo appBuildID]]; + NSDictionary* options = [NSDictionary dictionaryWithObject:buildVersion + forKey:@"Version"]; + [NSApp orderFrontStandardAboutPanelWithOptions:options]; } - (IBAction)feedbackLink:(id)aSender diff --git a/mozilla/camino/src/embedding/CmXULAppData.h.in b/mozilla/camino/src/embedding/CmXULAppData.h.in deleted file mode 100644 index dc7f46d09cf..00000000000 --- a/mozilla/camino/src/embedding/CmXULAppData.h.in +++ /dev/null @@ -1,48 +0,0 @@ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is nsIXULAppInfo for Camino. - * - * The Initial Developer of the Original Code is Google Inc. - * Portions created by the Initial Developer are Copyright (C) 2007 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Mark Mentovai (Original Author) - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -#ifndef CmXULAppData_h__ -#define CmXULAppData_h__ - -#define CMXULAPPDATA_VENDOR "Mozilla" -#define CMXULAPPDATA_NAME "Camino" -#define CMXULAPPDATA_ID "{837e87d2-9e3c-4870-81be-86e6c4560dfd}" -#define CMXULAPPDATA_VERSION "%CM_APP_VERSION%" -#define CMXULAPPDATA_BUILD_ID "%PLATFORM_BUILD_ID%" -#define CMXULAPPDATA_PLATFORM_VERSION "%PLATFORM_VERSION%" -#define CMXULAPPDATA_PLATFORM_BUILD_ID "%PLATFORM_BUILD_ID%" - -#endif // CmXULAppData_h__ diff --git a/mozilla/camino/src/embedding/CmXULAppInfo.mm b/mozilla/camino/src/embedding/CmXULAppInfo.mm index 10a2b6ee186..53f0598f876 100644 --- a/mozilla/camino/src/embedding/CmXULAppInfo.mm +++ b/mozilla/camino/src/embedding/CmXULAppInfo.mm @@ -38,7 +38,6 @@ #include "CmXULAppInfo.h" -#include "CmXULAppData.h" #include "nsIGenericFactory.h" #include "nsString.h" @@ -133,33 +132,33 @@ NS_IMETHODIMP CmXULAppInfo::GetPlatformBuildID(nsACString &result) { @implementation XULAppInfo + (NSString *)vendor { - return @CMXULAPPDATA_VENDOR; + static NSString *kVendor = @"Mozilla"; + return kVendor; } + (NSString *)name { - // CMXULAPPDATA_NAME return [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"]; } + (NSString *)ID { - return @CMXULAPPDATA_ID; + static NSString *kID = @"{837e87d2-9e3c-4870-81be-86e6c4560dfd}"; + return kID; } + (NSString *)version { - // CMXULAPPDATA_VERSION return [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"]; } + (NSString *)appBuildID { - return @CMXULAPPDATA_BUILD_ID; + return [[NSBundle mainBundle] objectForInfoDictionaryKey:@"MozillaBuildID"]; } + (NSString *)platformVersion { - return @CMXULAPPDATA_PLATFORM_VERSION; + return [[NSBundle mainBundle] objectForInfoDictionaryKey:@"MozillaGeckoVersion"]; } + (NSString *)platformBuildID { - return @CMXULAPPDATA_PLATFORM_BUILD_ID; + return [[NSBundle mainBundle] objectForInfoDictionaryKey:@"MozillaBuildID"]; } @end