mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-08-20 22:06:25 +08:00
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:
@@ -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);
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user