]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/aboutdlgg.cpp
Rename wxWebNavigationError to wxWebViewNavigationError and wxWebNavigationEvent...
[wxWidgets.git] / src / generic / aboutdlgg.cpp
index 60f799b428f1a95aa68f2ede3c52d3e06b78551b..fc38c186d6725ee7742a39ea137421e5f8cab5af 100644 (file)
@@ -85,7 +85,7 @@ wxString wxAboutDialogInfo::GetDescriptionAndCredits() const
 wxIcon wxAboutDialogInfo::GetIcon() const
 {
     wxIcon icon = m_icon;
-    if ( !icon.Ok() && wxTheApp )
+    if ( !icon.IsOk() && wxTheApp )
     {
         const wxTopLevelWindow * const
             tlw = wxDynamicCast(wxTheApp->GetTopWindow(), wxTopLevelWindow);
@@ -109,6 +109,29 @@ wxString wxAboutDialogInfo::GetCopyrightToDisplay() const
     return ret;
 }
 
+void wxAboutDialogInfo::SetVersion(const wxString& version,
+                                   const wxString& longVersion)
+{
+    if ( version.empty() )
+    {
+        m_version.clear();
+
+        wxASSERT_MSG( longVersion.empty(),
+                      "long version should be empty if version is");
+
+        m_longVersion.clear();
+    }
+    else // setting valid version
+    {
+        m_version = version;
+
+        if ( longVersion.empty() )
+            m_longVersion = _("Version ") + m_version;
+        else
+            m_longVersion = longVersion;
+    }
+}
+
 // ----------------------------------------------------------------------------
 // wxGenericAboutDialog
 // ----------------------------------------------------------------------------
@@ -173,7 +196,7 @@ bool wxGenericAboutDialog::Create(const wxAboutDialogInfo& info, wxWindow* paren
     wxSizer *sizerIconAndText = new wxBoxSizer(wxHORIZONTAL);
 #if wxUSE_STATBMP
     wxIcon icon = info.GetIcon();
-    if ( icon.Ok() )
+    if ( icon.IsOk() )
     {
         sizerIconAndText->Add(new wxStaticBitmap(this, wxID_ANY, icon),
                                 wxSizerFlags().Border(wxRIGHT));