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"
31 #include "wx/filename.h"
32 #include "wx/stdpaths.h"
34 // ----------------------------------------------------------------------------
36 // ----------------------------------------------------------------------------
38 static wxStandardPaths gs_stdPaths
;
40 // ============================================================================
42 // ============================================================================
45 wxStandardPaths
& wxStandardPathsBase::Get()
50 wxStandardPathsBase::~wxStandardPathsBase()
55 wxString
wxStandardPathsBase::GetLocalDataDir() const
60 wxString
wxStandardPathsBase::GetUserLocalDataDir() const
62 return GetUserDataDir();
66 wxString
wxStandardPathsBase::AppendAppName(const wxString
& dir
)
70 // empty string indicates that an error has occured, don't touch it then
71 if ( !subdir
.empty() )
73 const wxString appname
= wxTheApp
->GetAppName();
74 if ( !appname
.empty() )
76 const wxChar ch
= *(subdir
.end() - 1);
77 if ( !wxFileName::IsPathSeparator(ch
) && ch
!= _T('.') )
78 subdir
+= wxFileName::GetPathSeparator();