Disable some wxWebView tests that fail on the buildbot but not locally.
[wxWidgets.git] / src / generic / aboutdlgg.cpp
index 60f799b428f1a95aa68f2ede3c52d3e06b78551b..ee338f01baff8988e3fd8acbdcde218ac0dbbe80 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,13 +109,36 @@ 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
 // ----------------------------------------------------------------------------
 
 bool wxGenericAboutDialog::Create(const wxAboutDialogInfo& info, wxWindow* parent)
 {
-    if ( !wxDialog::Create(parent, wxID_ANY, _("About ") + info.GetName(),
+    if ( !wxDialog::Create(parent, wxID_ANY, wxString::Format(_("About %s"), info.GetName()),
                            wxDefaultPosition, wxDefaultSize, wxRESIZE_BORDER|wxDEFAULT_DIALOG_STYLE) )
         return false;
 
@@ -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));