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
|
// artists and translators) as a one long multiline string
|
||||||
wxString GetDescriptionAndCredits() const;
|
wxString GetDescriptionAndCredits() const;
|
||||||
|
|
||||||
|
// returns the copyright with the (C) string substituted by the Unicode
|
||||||
|
// character U+00A9
|
||||||
|
wxString GetCopyrightToDisplay() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
wxString m_name,
|
wxString m_name,
|
||||||
m_version,
|
m_version,
|
||||||
|
@@ -96,6 +96,16 @@ wxIcon wxAboutDialogInfo::GetIcon() const
|
|||||||
return icon;
|
return icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxString wxAboutDialogInfo::GetCopyrightToDisplay() const
|
||||||
|
{
|
||||||
|
wxString ret = m_copyright;
|
||||||
|
|
||||||
|
ret.Replace("(c)", "\u00A9");
|
||||||
|
ret.Replace("(C)", "\u00A9");
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxGenericAboutDialog
|
// wxGenericAboutDialog
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -120,7 +130,7 @@ bool wxGenericAboutDialog::Create(const wxAboutDialogInfo& info)
|
|||||||
m_sizerText->Add(label, wxSizerFlags().Centre().Border());
|
m_sizerText->Add(label, wxSizerFlags().Centre().Border());
|
||||||
m_sizerText->AddSpacer(5);
|
m_sizerText->AddSpacer(5);
|
||||||
|
|
||||||
AddText(info.GetCopyright());
|
AddText(info.GetCopyrightToDisplay());
|
||||||
AddText(info.GetDescription());
|
AddText(info.GetDescription());
|
||||||
|
|
||||||
if ( info.HasWebSite() )
|
if ( info.HasWebSite() )
|
||||||
|
@@ -124,7 +124,7 @@ void wxAboutBox(const wxAboutDialogInfo& info)
|
|||||||
else
|
else
|
||||||
gtk_about_dialog_set_version(dlg, NULL);
|
gtk_about_dialog_set_version(dlg, NULL);
|
||||||
if ( info.HasCopyright() )
|
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
|
else
|
||||||
gtk_about_dialog_set_copyright(dlg, NULL);
|
gtk_about_dialog_set_copyright(dlg, NULL);
|
||||||
if ( info.HasDescription() )
|
if ( info.HasDescription() )
|
||||||
|
@@ -75,7 +75,7 @@ void wxAboutBox(const wxAboutDialogInfo& info)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( info.HasCopyright() )
|
if ( info.HasCopyright() )
|
||||||
opts.Set(kHIAboutBoxCopyrightKey, info.GetCopyright());
|
opts.Set(kHIAboutBoxCopyrightKey, info.GetCopyrightToDisplay());
|
||||||
|
|
||||||
opts.Set(kHIAboutBoxDescriptionKey, info.GetDescriptionAndCredits());
|
opts.Set(kHIAboutBoxDescriptionKey, info.GetDescriptionAndCredits());
|
||||||
|
|
||||||
|
@@ -92,7 +92,7 @@ void wxAboutBox(const wxAboutDialogInfo& info)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( info.HasCopyright() )
|
if ( info.HasCopyright() )
|
||||||
opts.Set(CFSTR("Copyright"), info.GetCopyright());
|
opts.Set(CFSTR("Copyright"), info.GetCopyrightToDisplay());
|
||||||
|
|
||||||
opts.SetAttributedString(CFSTR("Credits"), info.GetDescriptionAndCredits());
|
opts.SetAttributedString(CFSTR("Credits"), info.GetDescriptionAndCredits());
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user