]> git.saurik.com Git - wxWidgets.git/blob - src/os2/stdpaths.cpp
fix for disabling the control (bug 1150830)
[wxWidgets.git] / src / os2 / stdpaths.cpp
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: unix/stdpaths.cpp
3 // Purpose: wxStandardPaths implementation for OS/2 systems
4 // Author: Stefan Neis
5 // Modified by:
6 // Created: 2004-11-06
7 // RCS-ID: $Id$
8 // Copyright: (c) 2004 Stefan Neis <Stefan.Neis@t-online.de>
9 // License: wxWindows license
10 ///////////////////////////////////////////////////////////////////////////////
11
12 // ============================================================================
13 // declarations
14 // ============================================================================
15
16 // ----------------------------------------------------------------------------
17 // headers
18 // ----------------------------------------------------------------------------
19
20 // for compilers that support precompilation, includes "wx.h".
21 #include "wx/wxprec.h"
22
23 #ifdef __BORLANDC__
24 #pragma hdrstop
25 #endif
26
27 #ifndef WX_PRECOMP
28 #include "wx/app.h"
29 #endif //WX_PRECOMP
30
31 #include "wx/filename.h"
32
33 #include "wx/stdpaths.h"
34
35
36 // ============================================================================
37 // wxStandardPaths implementation
38 // ============================================================================
39
40 // ----------------------------------------------------------------------------
41 // prefix management
42 // ----------------------------------------------------------------------------
43
44 wxString wxStandardPaths::m_prefix;
45
46 void wxStandardPaths::SetInstallPrefix(const wxString& prefix)
47 {
48 m_prefix = prefix;
49 }
50
51 wxString wxStandardPaths::GetInstallPrefix() const
52 {
53 if ( m_prefix.empty() )
54 {
55 wxStandardPaths *self = wx_const_cast(wxStandardPaths *, this);
56
57 self->m_prefix = _T("/usr/local");
58 }
59 return m_prefix;
60 }
61
62 // ----------------------------------------------------------------------------
63 // public functions
64 // ----------------------------------------------------------------------------
65
66 wxString wxStandardPaths::GetConfigDir() const
67 {
68 return m_prefix;
69 }
70
71 wxString wxStandardPaths::GetUserConfigDir() const
72 {
73 return wxFileName::GetHomeDir();
74 }
75
76 wxString wxStandardPaths::GetDataDir() const
77 {
78 return GetInstallPrefix() + _T("\\data");
79 }
80
81 wxString wxStandardPaths::GetUserDataDir() const
82 {
83 return AppendAppName(wxFileName::GetHomeDir() + _T("\\."));
84 }
85
86 wxString wxStandardPaths::GetPluginsDir() const
87 {
88 return wxString();
89 }