]> git.saurik.com Git - wxWidgets.git/blob - src/os2/stdpaths.cpp
Fix file paths in wxFileSystemWatcherEvent under OS X.
[wxWidgets.git] / src / os2 / stdpaths.cpp
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: src/os2/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 // Licence: wxWindows licence
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 #if wxUSE_STDPATHS
24
25 #ifdef __BORLANDC__
26 #pragma hdrstop
27 #endif
28
29 #ifndef WX_PRECOMP
30 #include "wx/app.h"
31 #endif //WX_PRECOMP
32
33 #include "wx/filename.h"
34
35 #include "wx/stdpaths.h"
36
37
38 // ============================================================================
39 // wxStandardPaths implementation
40 // ============================================================================
41
42 // ----------------------------------------------------------------------------
43 // prefix management
44 // ----------------------------------------------------------------------------
45
46 wxString wxStandardPaths::m_prefix;
47
48 void wxStandardPaths::SetInstallPrefix(const wxString& prefix)
49 {
50 m_prefix = prefix;
51 }
52
53 wxString wxStandardPaths::GetInstallPrefix() const
54 {
55 if ( m_prefix.empty() )
56 {
57 wxStandardPaths *self = const_cast<wxStandardPaths *>(this);
58
59 self->m_prefix = wxT("/usr/local");
60 }
61 return m_prefix;
62 }
63
64 // ----------------------------------------------------------------------------
65 // public functions
66 // ----------------------------------------------------------------------------
67
68 wxString wxStandardPaths::GetConfigDir() const
69 {
70 return m_prefix;
71 }
72
73 wxString wxStandardPaths::GetUserConfigDir() const
74 {
75 return wxFileName::GetHomeDir();
76 }
77
78 wxString wxStandardPaths::GetDataDir() const
79 {
80 return GetInstallPrefix() + wxT("\\data");
81 }
82
83 wxString wxStandardPaths::GetUserDataDir() const
84 {
85 return AppendAppInfo(wxFileName::GetHomeDir() + wxT("\\."));
86 }
87
88 wxString wxStandardPaths::GetPluginsDir() const
89 {
90 return wxString();
91 }
92
93 #endif // wxUSE_STDPATHS