X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/953aebc2d5174d8e6243645ee2cb5aef1174808d..a51e79e87db3512823258d487849bb7e7947b700:/src/osx/cocoa/aboutdlg.mm?ds=sidebyside diff --git a/src/osx/cocoa/aboutdlg.mm b/src/osx/cocoa/aboutdlg.mm index 9c702e9d55..855fc9e259 100644 --- a/src/osx/cocoa/aboutdlg.mm +++ b/src/osx/cocoa/aboutdlg.mm @@ -1,9 +1,9 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: osx/cocoa/aboutdlg.cpp +// Name: src/osx/cocoa/aboutdlg.mm // Purpose: native wxAboutBox() implementation for wxMac // Author: Vadim Zeitlin // Created: 2006-10-08 -// RCS-ID: $Id: aboutdlg.cpp 54820 2008-07-29 20:04:11Z SC $ +// RCS-ID: $Id$ // Copyright: (c) 2006 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -29,14 +29,8 @@ #include "wx/osx/private.h" -/* -@"Credits": An NSAttributedString displayed in the info area of the panel. If not specified, this method then looks for a file named “Credits.html”, “Credits.rtf”, and “Credits.rtfd”, in that order, in the bundle returned by the NSBundle class method mainBundle. The first file found is used. If none is found, the info area is left blank. -@"ApplicationName": An NSString object displayed as the application’s name. If not specified, this method then uses the value of CFBundleName (localizable). If neither is found, this method uses [[NSProcessInfo processInfo] processName]. -@"ApplicationIcon": An NSImage object displayed as the application’s icon. If not specified, this method then looks for an image named “NSApplicationIcon”, using [NSImage imageNamed:@"NSApplicationIcon"]. If neither is available, this method uses the generic application icon. -@"Version": An NSString object with the build version number of the application (“58.4”), displayed as “(v58.4)”. If not specified, obtain from the CFBundleVersion key in infoDictionary; if not specified, leave blank (the “(v)” is not displayed). -@"Copyright": An NSString object with a line of copyright information. If not specified, this method then looks for the value of NSHumanReadableCopyright in the localized version infoDictionary. If neither is available, this method leaves the space blank. -@"ApplicationVersion": An NSString object with the application version (“Mac OS X”, “3”, “WebObjects 4.5”, “AppleWorks 6”,...). If not specified, obtain from the CFBundleShortVersionString key in infoDictionary. If neither is available, the build version, if available, is printed alone, as “Version x.x”. -*/ +// see http://developer.apple.com/mac/library/technotes/tn2006/tn2179.html for +// information about the various keys used here // helper class for HIAboutBox options class AboutBoxOptions : public wxCFRef @@ -72,7 +66,7 @@ public: // implementation // ============================================================================ -void wxAboutBox(const wxAboutDialogInfo& info) +void wxAboutBox(const wxAboutDialogInfo& info, wxWindow *parent) { // Mac native about box currently can show only name, version, copyright // and description fields and we also shoehorn the credits text into the @@ -87,8 +81,8 @@ void wxAboutBox(const wxAboutDialogInfo& info) if ( info.HasVersion() ) { opts.Set(CFSTR("Version"),info.GetVersion()); - opts.Set(CFSTR("ApplicationVersion"), - wxString::Format(_("Version %s"), info.GetVersion())); + if ( info.GetLongVersion() != (_("Version ")+info.GetVersion())) + opts.Set(CFSTR("ApplicationVersion"),info.GetLongVersion()); } if ( info.HasCopyright() ) @@ -101,7 +95,7 @@ void wxAboutBox(const wxAboutDialogInfo& info) else // simple "native" version is not enough { // we need to use the full-blown generic version - wxGenericAboutBox(info); + wxGenericAboutBox(info, parent); } }