X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c7753f0a99290949abe24cada1f623d3258f770b..9b49405777342458dc1666001865eef7309b6c30:/src/generic/aboutdlgg.cpp diff --git a/src/generic/aboutdlgg.cpp b/src/generic/aboutdlgg.cpp index 09122a1c16..1992228b6d 100644 --- a/src/generic/aboutdlgg.cpp +++ b/src/generic/aboutdlgg.cpp @@ -96,6 +96,19 @@ wxIcon wxAboutDialogInfo::GetIcon() const return icon; } +wxString wxAboutDialogInfo::GetCopyrightToDisplay() const +{ + wxString ret = m_copyright; + +#if wxUSE_UNICODE + const wxString copyrightSign = wxString::FromUTF8("\xc2\xa9"); + ret.Replace("(c)", copyrightSign); + ret.Replace("(C)", copyrightSign); +#endif // wxUSE_UNICODE + + return ret; +} + // ---------------------------------------------------------------------------- // wxGenericAboutDialog // ---------------------------------------------------------------------------- @@ -120,7 +133,7 @@ bool wxGenericAboutDialog::Create(const wxAboutDialogInfo& info) m_sizerText->Add(label, wxSizerFlags().Centre().Border()); m_sizerText->AddSpacer(5); - AddText(info.GetCopyright()); + AddText(info.GetCopyrightToDisplay()); AddText(info.GetDescription()); if ( info.HasWebSite() ) @@ -172,11 +185,14 @@ bool wxGenericAboutDialog::Create(const wxAboutDialogInfo& info) wxSizer *sizerTop = new wxBoxSizer(wxVERTICAL); sizerTop->Add(sizerIconAndText, wxSizerFlags(1).Expand().Border()); +// Mac typically doesn't use OK buttons just for dismissing dialogs. +#if !defined(__WXMAC__) wxSizer *sizerBtns = CreateButtonSizer(wxOK); if ( sizerBtns ) { sizerTop->Add(sizerBtns, wxSizerFlags().Expand().Border()); } +#endif SetSizerAndFit(sizerTop); @@ -226,8 +242,13 @@ void wxGenericAboutDialog::AddCollapsiblePane(const wxString& title, void wxGenericAboutBox(const wxAboutDialogInfo& info) { +#if !defined(__WXGTK__) && !defined(__WXMAC__) wxGenericAboutDialog dlg(info); dlg.ShowModal(); +#else + wxGenericAboutDialog* dlg = new wxGenericAboutDialog(info); + dlg->Show(); +#endif } // currently wxAboutBox is implemented natively only under these platforms, for