]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/aboutdlg.cpp
fix building with WXWIN_COMPATIBILITY_2_8 == 0
[wxWidgets.git] / src / msw / aboutdlg.cpp
index 473158c6b886c56994c4c99a391185d671b9c94d..5b100b81ae8fc849c3abd8918b47b7680dee7b68 100644 (file)
@@ -3,7 +3,6 @@
 // Purpose:     implementation of wxAboutBox() for wxMSW
 // Author:      Vadim Zeitlin
 // Created:     2006-10-07
-// RCS-ID:      $Id$
 // Copyright:   (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -26,6 +25,7 @@
 #if wxUSE_ABOUTDLG
 
 #ifndef WX_PRECOMP
+    #include "wx/msgdlg.h"
 #endif //WX_PRECOMP
 
 #include "wx/aboutdlg.h"
@@ -36,7 +36,7 @@
 // ============================================================================
 
 // our public entry point
-void wxAboutBox(const wxAboutDialogInfo& info)
+void wxAboutBox(const wxAboutDialogInfo& info, wxWindow* parent)
 {
     // we prefer to show a simple message box if we don't have any fields which
     // can't be shown in it because as much as there is a standard about box
@@ -48,21 +48,25 @@ void wxAboutBox(const wxAboutDialogInfo& info)
         wxString msg;
         msg << name;
         if ( info.HasVersion() )
-            msg << _(" Version ") << info.GetVersion();
-        msg << _T('\n');
+        {
+            msg << wxT('\n');
+            msg << info.GetLongVersion();
+        }
+
+        msg << wxT("\n\n");
 
         if ( info.HasCopyright() )
-            msg << info.GetCopyright() << _T('\n');
+            msg << info.GetCopyrightToDisplay() << wxT('\n');
 
         // add everything remaining
         msg << info.GetDescriptionAndCredits();
 
-        wxMessageBox(msg, _T("About ") + name);
+        wxMessageBox(msg, wxString::Format(_("About %s"), name), wxOK | wxCENTRE, parent);
     }
     else // simple "native" version is not enough
     {
         // we need to use the full-blown generic version
-        wxGenericAboutBox(info);
+        wxGenericAboutBox(info, parent);
     }
 }