From: Vadim Zeitlin Date: Sat, 17 Nov 2007 14:45:53 +0000 (+0000) Subject: added vendor display name (for consistency with app display name &c) (patch 1831303) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/180b5b4827d08f1ac13bbb5eca03f775ab35a0b1?ds=inline added vendor display name (for consistency with app display name &c) (patch 1831303) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50024 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/docs/latex/wx/app.tex b/docs/latex/wx/app.tex index 4707e63d7f..8f2e0ced5d 100644 --- a/docs/latex/wx/app.tex +++ b/docs/latex/wx/app.tex @@ -236,6 +236,21 @@ different visuals, false otherwise. \helpref{SetUseBestVisual}{wxappsetusebestvisual} +\membersection{wxApp::GetVendorDisplayName}\label{wxappgetvendordisplayname} + +\constfunc{wxString}{GetVendorDisplayName}{\void} + +Returns the user-readable vendor name. The difference between this string +and the one returned by \helpref{GetVendorName}{wxappgetvendorname} is that this one +is meant to be shown to the user and so should be used for the window titles, +page headers and so on while the other one should be only used internally, e.g. +for the file names or configuration file keys. + +By default, returns the same string as \helpref{GetVendorName}{wxappgetvendorname}. + +\newsince{2.9.0} + + \membersection{wxApp::GetVendorName}\label{wxappgetvendorname} \constfunc{wxString}{GetVendorName}{\void} @@ -697,6 +712,14 @@ needs to use the top window. \helpref{wxApp::GetTopWindow}{wxappgettopwindow}, \helpref{wxApp::OnInit}{wxapponinit} +\membersection{wxApp::SetVendorDisplayName}\label{wxappsetvendordisplayname} + +\func{void}{SetVendorDisplayName}{\param{const wxString\& }{name}} + +Set the vendor name to be used in the user-visible places. See +\helpref{GetVendorDisplayName}{wxappgetvendordisplayname} for more about +the differences between the display name and name. + \membersection{wxApp::SetVendorName}\label{wxappsetvendorname} diff --git a/include/wx/app.h b/include/wx/app.h index a757d7f55d..ccd8ef978c 100644 --- a/include/wx/app.h +++ b/include/wx/app.h @@ -143,6 +143,19 @@ public: const wxString& GetVendorName() const { return m_vendorName; } void SetVendorName(const wxString& name) { m_vendorName = name; } + // set/get the vendor display name: the display name is shown + // in titles/reports/dialogs to the user, while the vendor name + // is used in some areas such as wxConfig, wxStandardPaths, etc + const wxString& GetVendorDisplayName() const + { + return m_vendorDisplayName.empty() ? GetVendorName() + : m_vendorDisplayName; + } + void SetVendorDisplayName(const wxString& name) + { + m_vendorDisplayName = name; + } + // cmd line parsing stuff // ---------------------- @@ -346,7 +359,8 @@ protected: wxEventLoopBase *CreateMainLoop(); // application info (must be set from the user code) - wxString m_vendorName, // vendor name (e.g. "ACME Inc") + wxString m_vendorName, // vendor name ("acme") + m_vendorDisplayName, // vendor display name (e.g. "ACME Inc") m_appName, // app name ("myapp") m_appDisplayName, // app display name ("My Application") m_className; // class name