]>
Commit | Line | Data |
---|---|---|
175bb578 | 1 | /////////////////////////////////////////////////////////////////////////////// |
80fdcdb9 | 2 | // Name: src/os2/stdpaths.cpp |
175bb578 SN |
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> | |
526954c5 | 9 | // Licence: wxWindows licence |
175bb578 SN |
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 | ||
07158944 VZ |
23 | #if wxUSE_STDPATHS |
24 | ||
175bb578 SN |
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 | { | |
5c33522f | 57 | wxStandardPaths *self = const_cast<wxStandardPaths *>(this); |
175bb578 | 58 | |
9a83f860 | 59 | self->m_prefix = wxT("/usr/local"); |
175bb578 SN |
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 | { | |
9a83f860 | 80 | return GetInstallPrefix() + wxT("\\data"); |
175bb578 SN |
81 | } |
82 | ||
83 | wxString wxStandardPaths::GetUserDataDir() const | |
84 | { | |
9a83f860 | 85 | return AppendAppInfo(wxFileName::GetHomeDir() + wxT("\\.")); |
175bb578 SN |
86 | } |
87 | ||
88 | wxString wxStandardPaths::GetPluginsDir() const | |
89 | { | |
90 | return wxString(); | |
91 | } | |
07158944 VZ |
92 | |
93 | #endif // wxUSE_STDPATHS |