wxIcon wxAboutDialogInfo::GetIcon() const
{
wxIcon icon = m_icon;
- if ( !icon.Ok() && wxTheApp )
+ if ( !icon.IsOk() && wxTheApp )
{
const wxTopLevelWindow * const
tlw = wxDynamicCast(wxTheApp->GetTopWindow(), wxTopLevelWindow);
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
// ----------------------------------------------------------------------------
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));