substitute (c) and (C) for copyright strings as documented
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57245 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -128,6 +128,10 @@ public:
|
||||
// artists and translators) as a one long multiline string
|
||||
wxString GetDescriptionAndCredits() const;
|
||||
|
||||
// returns the copyright with the (C) string substituted by the Unicode
|
||||
// character U+00A9
|
||||
wxString GetCopyrightToDisplay() const;
|
||||
|
||||
private:
|
||||
wxString m_name,
|
||||
m_version,
|
||||
|
@@ -96,6 +96,16 @@ wxIcon wxAboutDialogInfo::GetIcon() const
|
||||
return icon;
|
||||
}
|
||||
|
||||
wxString wxAboutDialogInfo::GetCopyrightToDisplay() const
|
||||
{
|
||||
wxString ret = m_copyright;
|
||||
|
||||
ret.Replace("(c)", "\u00A9");
|
||||
ret.Replace("(C)", "\u00A9");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxGenericAboutDialog
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -120,7 +130,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() )
|
||||
|
@@ -124,7 +124,7 @@ void wxAboutBox(const wxAboutDialogInfo& info)
|
||||
else
|
||||
gtk_about_dialog_set_version(dlg, NULL);
|
||||
if ( info.HasCopyright() )
|
||||
gtk_about_dialog_set_copyright(dlg, wxGTK_CONV_SYS(info.GetCopyright()));
|
||||
gtk_about_dialog_set_copyright(dlg, wxGTK_CONV_SYS(info.GetCopyrightToDisplay()));
|
||||
else
|
||||
gtk_about_dialog_set_copyright(dlg, NULL);
|
||||
if ( info.HasDescription() )
|
||||
|
@@ -75,7 +75,7 @@ void wxAboutBox(const wxAboutDialogInfo& info)
|
||||
}
|
||||
|
||||
if ( info.HasCopyright() )
|
||||
opts.Set(kHIAboutBoxCopyrightKey, info.GetCopyright());
|
||||
opts.Set(kHIAboutBoxCopyrightKey, info.GetCopyrightToDisplay());
|
||||
|
||||
opts.Set(kHIAboutBoxDescriptionKey, info.GetDescriptionAndCredits());
|
||||
|
||||
|
@@ -92,7 +92,7 @@ void wxAboutBox(const wxAboutDialogInfo& info)
|
||||
}
|
||||
|
||||
if ( info.HasCopyright() )
|
||||
opts.Set(CFSTR("Copyright"), info.GetCopyright());
|
||||
opts.Set(CFSTR("Copyright"), info.GetCopyrightToDisplay());
|
||||
|
||||
opts.SetAttributedString(CFSTR("Credits"), info.GetDescriptionAndCredits());
|
||||
|
||||
|
Reference in New Issue
Block a user