]> git.saurik.com Git - wxWidgets.git/blame - src/os2/stdpaths.cpp
Don't assert if the path is not absolute in wxFileDialog::SetPath().
[wxWidgets.git] / src / os2 / stdpaths.cpp
CommitLineData
175bb578
SN
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
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
46wxString wxStandardPaths::m_prefix;
47
48void wxStandardPaths::SetInstallPrefix(const wxString& prefix)
49{
50 m_prefix = prefix;
51}
52
53wxString 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
68wxString wxStandardPaths::GetConfigDir() const
69{
70 return m_prefix;
71}
72
73wxString wxStandardPaths::GetUserConfigDir() const
74{
75 return wxFileName::GetHomeDir();
76}
77
78wxString wxStandardPaths::GetDataDir() const
79{
9a83f860 80 return GetInstallPrefix() + wxT("\\data");
175bb578
SN
81}
82
83wxString wxStandardPaths::GetUserDataDir() const
84{
9a83f860 85 return AppendAppInfo(wxFileName::GetHomeDir() + wxT("\\."));
175bb578
SN
86}
87
88wxString wxStandardPaths::GetPluginsDir() const
89{
90 return wxString();
91}
07158944
VZ
92
93#endif // wxUSE_STDPATHS