1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: common/stdpbase.cpp
3 // Purpose: wxStandardPathsBase methods common to all ports
4 // Author: Vadim Zeitlin
8 // Copyright: (c) 2004 Vadim Zeitlin <vadim@wxwindows.org>
9 // License: wxWindows license
10 ///////////////////////////////////////////////////////////////////////////////
12 // ============================================================================
14 // ============================================================================
16 // ----------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------
20 // for compilers that support precompilation, includes "wx.h".
21 #include "wx/wxprec.h"
27 // FIXME: there is no Mac implementation yet
34 #include "wx/filename.h"
35 #include "wx/stdpaths.h"
37 // ----------------------------------------------------------------------------
39 // ----------------------------------------------------------------------------
41 static wxStandardPaths gs_stdPaths
;
43 // ============================================================================
45 // ============================================================================
48 wxStandardPaths
& wxStandardPathsBase::Get()
53 wxStandardPathsBase::~wxStandardPathsBase()
58 wxString
wxStandardPathsBase::GetLocalDataDir() const
63 wxString
wxStandardPathsBase::GetUserLocalDataDir() const
65 return GetUserDataDir();
69 wxString
wxStandardPathsBase::AppendAppName(const wxString
& dir
)
73 // empty string indicates that an error has occured, don't touch it then
74 if ( !subdir
.empty() )
76 const wxString appname
= wxTheApp
->GetAppName();
77 if ( !appname
.empty() )
79 const wxChar ch
= *(subdir
.end() - 1);
80 if ( !wxFileName::IsPathSeparator(ch
) && ch
!= _T('.') )
81 subdir
+= wxFileName::GetPathSeparator();