change to /usr/share/wx/version
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12573 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -87,6 +87,8 @@ WXDLLEXPORT wxString wxNow();
|
||||
|
||||
// Return path where wxWindows is installed (mostly useful in Unices)
|
||||
WXDLLEXPORT const wxChar *wxGetInstallPrefix();
|
||||
// Return path to wxWin data (/usr/share/wx/%{version}) (Unices)
|
||||
WXDLLEXPORT wxString wxGetDataDir();
|
||||
|
||||
|
||||
#if wxUSE_GUI
|
||||
|
@@ -1087,6 +1087,18 @@ const wxChar *wxGetInstallPrefix()
|
||||
#endif
|
||||
}
|
||||
|
||||
wxString wxGetDataDir()
|
||||
{
|
||||
wxString format = wxGetInstallPrefix();
|
||||
format << wxFILE_SEP_PATH
|
||||
<< wxT("share") << wxFILE_SEP_PATH
|
||||
<< wxT("wx") << wxFILE_SEP_PATH
|
||||
<< wxT("%i.%i");
|
||||
wxString dir;
|
||||
dir.Printf(format.c_str(), wxMAJOR_VERSION, wxMINOR_VERSION);
|
||||
return dir;
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// network and user id functions
|
||||
|
@@ -2034,10 +2034,8 @@ void wxPostScriptDC::DoGetTextExtent(const wxString& string,
|
||||
- afmFile = fopen() may fail and in that case the next if branch
|
||||
MUST be executed - and it would not if there was "else" */
|
||||
{
|
||||
afmName = wxGetInstallPrefix();
|
||||
afmName = wxGetDataDir();
|
||||
afmName << wxFILE_SEP_PATH
|
||||
<< wxT("share") << wxFILE_SEP_PATH
|
||||
<< wxT("wx") << wxFILE_SEP_PATH
|
||||
#if defined(__LINUX__) || defined(__FREEBSD__)
|
||||
<< wxT("gs_afm") << wxFILE_SEP_PATH
|
||||
#else
|
||||
|
Reference in New Issue
Block a user