Don't use "Copyright" word in wxAboutDialog under MSW

MSW platform convention is to show just "© whatever" instead of
"Copyright © whatever" in the "About" dialogs, so make it simpler to
conform to it but still keeping using the word under the other
platforms, where it usually is included, by removing the "Copyright"
word under MSW only in wx code.
This commit is contained in:
Vadim Zeitlin
2023-02-24 00:42:13 +00:00
parent a0a49f5391
commit 020aff8a7f
3 changed files with 13 additions and 1 deletions
+4
View File
@@ -146,6 +146,10 @@ public:
any occurrences of @c "(C)" in @a copyright will be replaced by the
copyright symbol (circled C) automatically, which means that you can avoid
using this symbol in the program source code which can be problematic,
Also note that under MSW platform the word "Copyright" itself will be
removed from the string if it is followed by the copyright symbol, to
follow the platform convention.
*/
void SetCopyright(const wxString& copyright);
+1 -1
View File
@@ -3407,7 +3407,7 @@ static void InitAboutInfoMinimal(wxAboutDialogInfo& info)
wxVERSION_NUM_DOT_STRING
));
info.SetDescription("This sample shows different wxWidgets dialogs.");
info.SetCopyright("(C) 1998-2023 wxWidgets dev team.");
info.SetCopyright("Copyright (C) 1998-2023 wxWidgets dev team.");
}
static void InitAboutInfoWebsite(wxAboutDialogInfo& info)
+8
View File
@@ -102,6 +102,14 @@ wxString wxAboutDialogInfo::GetCopyrightToDisplay() const
ret.Replace("(c)", copyrightSign);
ret.Replace("(C)", copyrightSign);
#ifdef __WXMSW__
// Under MSW the dialogs typically show only "(C)" and "Copyright (C)", but
// under other platforms dialogs do use the word "Copyright" too, so to
// make it simpler to do the right thing under all platforms, remove the
// extra word here.
ret.Replace("Copyright " + copyrightSign, copyrightSign);
#endif // __WXMSW__
return ret;
}