Fix up naming of the kiplatform helpers
This commit is contained in:
parent
6d4bae1136
commit
a47e8af0d0
|
@ -38,7 +38,7 @@ wxString PATHS::GetUserPluginsPath()
|
||||||
{
|
{
|
||||||
wxFileName tmp;
|
wxFileName tmp;
|
||||||
|
|
||||||
tmp.AssignDir( KIPLATFORM::ENV::GetDocumentsDir() );
|
tmp.AssignDir( KIPLATFORM::ENV::GetDocumentsPath() );
|
||||||
tmp.AppendDir( KICAD_PATH_STR );
|
tmp.AppendDir( KICAD_PATH_STR );
|
||||||
tmp.AppendDir( SETTINGS_MANAGER::GetSettingsVersion() );
|
tmp.AppendDir( SETTINGS_MANAGER::GetSettingsVersion() );
|
||||||
tmp.AppendDir( "plugins" );
|
tmp.AppendDir( "plugins" );
|
||||||
|
@ -62,7 +62,7 @@ wxString PATHS::GetUserScriptingPath()
|
||||||
{
|
{
|
||||||
wxFileName tmp;
|
wxFileName tmp;
|
||||||
|
|
||||||
tmp.AssignDir( KIPLATFORM::ENV::GetDocumentsDir() );
|
tmp.AssignDir( KIPLATFORM::ENV::GetDocumentsPath() );
|
||||||
tmp.AppendDir( KICAD_PATH_STR );
|
tmp.AppendDir( KICAD_PATH_STR );
|
||||||
tmp.AppendDir( SETTINGS_MANAGER::GetSettingsVersion() );
|
tmp.AppendDir( SETTINGS_MANAGER::GetSettingsVersion() );
|
||||||
tmp.AppendDir( "scripting" );
|
tmp.AppendDir( "scripting" );
|
||||||
|
@ -75,7 +75,7 @@ wxString PATHS::GetUserTemplatesPath()
|
||||||
{
|
{
|
||||||
wxFileName tmp;
|
wxFileName tmp;
|
||||||
|
|
||||||
tmp.AssignDir( KIPLATFORM::ENV::GetDocumentsDir() );
|
tmp.AssignDir( KIPLATFORM::ENV::GetDocumentsPath() );
|
||||||
tmp.AppendDir( KICAD_PATH_STR );
|
tmp.AppendDir( KICAD_PATH_STR );
|
||||||
tmp.AppendDir( SETTINGS_MANAGER::GetSettingsVersion() );
|
tmp.AppendDir( SETTINGS_MANAGER::GetSettingsVersion() );
|
||||||
tmp.AppendDir( "template" );
|
tmp.AppendDir( "template" );
|
||||||
|
@ -88,7 +88,7 @@ wxString PATHS::GetDefaultUserProjectsPath()
|
||||||
{
|
{
|
||||||
wxFileName tmp;
|
wxFileName tmp;
|
||||||
|
|
||||||
tmp.AssignDir( KIPLATFORM::ENV::GetDocumentsDir() );
|
tmp.AssignDir( KIPLATFORM::ENV::GetDocumentsPath() );
|
||||||
tmp.AppendDir( KICAD_PATH_STR );
|
tmp.AppendDir( KICAD_PATH_STR );
|
||||||
tmp.AppendDir( SETTINGS_MANAGER::GetSettingsVersion() );
|
tmp.AppendDir( SETTINGS_MANAGER::GetSettingsVersion() );
|
||||||
tmp.AppendDir( "projects" );
|
tmp.AppendDir( "projects" );
|
||||||
|
@ -160,7 +160,7 @@ wxString PATHS::GetUserCachePath()
|
||||||
{
|
{
|
||||||
wxFileName tmp;
|
wxFileName tmp;
|
||||||
|
|
||||||
tmp.AssignDir( KIPLATFORM::ENV::GetUserCacheDir() );
|
tmp.AssignDir( KIPLATFORM::ENV::GetUserCachePath() );
|
||||||
tmp.AppendDir( KICAD_PATH_STR );
|
tmp.AppendDir( KICAD_PATH_STR );
|
||||||
tmp.AppendDir( SETTINGS_MANAGER::GetSettingsVersion() );
|
tmp.AppendDir( SETTINGS_MANAGER::GetSettingsVersion() );
|
||||||
|
|
||||||
|
|
|
@ -613,7 +613,7 @@ wxString SETTINGS_MANAGER::calculateUserSettingsPath( bool aIncludeVer, bool aUs
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cfgpath.AssignDir( KIPLATFORM::ENV::GetUserConfigDir() );
|
cfgpath.AssignDir( KIPLATFORM::ENV::GetUserConfigPath() );
|
||||||
|
|
||||||
cfgpath.AppendDir( TO_STR( KICAD_CONFIG_DIR ) );
|
cfgpath.AppendDir( TO_STR( KICAD_CONFIG_DIR ) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,19 +48,19 @@ bool KIPLATFORM::ENV::IsNetworkPath( const wxString& aPath )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wxString KIPLATFORM::ENV::GetDocumentsDir()
|
wxString KIPLATFORM::ENV::GetDocumentsPath()
|
||||||
{
|
{
|
||||||
return g_get_user_special_dir( G_USER_DIRECTORY_DOCUMENTS );
|
return g_get_user_special_dir( G_USER_DIRECTORY_DOCUMENTS );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wxString KIPLATFORM::ENV::GetUserConfigDir()
|
wxString KIPLATFORM::ENV::GetUserConfigPath()
|
||||||
{
|
{
|
||||||
return g_get_user_config_dir();
|
return g_get_user_config_dir();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wxString KIPLATFORM::ENV::GetUserCacheDir()
|
wxString KIPLATFORM::ENV::GetUserCachePath()
|
||||||
{
|
{
|
||||||
return g_get_user_cache_dir();
|
return g_get_user_cache_dir();
|
||||||
}
|
}
|
|
@ -46,16 +46,24 @@ namespace KIPLATFORM
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the operating system specific path for a given path type
|
* Retrieves the operating system specific path for a user's documents
|
||||||
*
|
*
|
||||||
* @param aType is the type of path
|
* @return User documents path
|
||||||
*
|
|
||||||
* @return Path for the given aPath
|
|
||||||
*/
|
*/
|
||||||
wxString GetDocumentsDir();
|
wxString GetDocumentsPath();
|
||||||
|
|
||||||
wxString GetUserConfigDir();
|
/**
|
||||||
|
* Retrieves the operating system specific path for a user's configuration store
|
||||||
|
*
|
||||||
|
* @return User config path
|
||||||
|
*/
|
||||||
|
wxString GetUserConfigPath();
|
||||||
|
|
||||||
wxString GetUserCacheDir();
|
/**
|
||||||
|
* Retrieves the operating system specific path for user's application cache
|
||||||
|
*
|
||||||
|
* @return User cache path
|
||||||
|
*/
|
||||||
|
wxString GetUserCachePath();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,19 +60,19 @@ bool KIPLATFORM::ENV::IsNetworkPath( const wxString& aPath )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wxString KIPLATFORM::ENV::GetDocumentsDir()
|
wxString KIPLATFORM::ENV::GetDocumentsPath()
|
||||||
{
|
{
|
||||||
return wxStandardPaths::Get().GetDocumentsDir();
|
return wxStandardPaths::Get().GetDocumentsDir();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wxString KIPLATFORM::ENV::GetUserConfigDir()
|
wxString KIPLATFORM::ENV::GetUserConfigPath()
|
||||||
{
|
{
|
||||||
return wxStandardPaths::Get().GetUserConfigDir();
|
return wxStandardPaths::Get().GetUserConfigDir();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wxString KIPLATFORM::ENV::GetUserCacheDir()
|
wxString KIPLATFORM::ENV::GetUserCachePath()
|
||||||
{
|
{
|
||||||
// Unforunately AppData/Local is the closest analog to "Cache" directories of other platforms
|
// Unforunately AppData/Local is the closest analog to "Cache" directories of other platforms
|
||||||
|
|
||||||
|
|
|
@ -53,19 +53,19 @@ bool KIPLATFORM::ENV::IsNetworkPath( const wxString& aPath )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wxString KIPLATFORM::ENV::GetDocumentsDir()
|
wxString KIPLATFORM::ENV::GetDocumentsPath()
|
||||||
{
|
{
|
||||||
return wxStandardPaths::Get().GetDocumentsDir();
|
return wxStandardPaths::Get().GetDocumentsDir();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wxString KIPLATFORM::ENV::GetUserConfigDir()
|
wxString KIPLATFORM::ENV::GetUserConfigPath()
|
||||||
{
|
{
|
||||||
return wxStandardPaths::Get().GetUserConfigDir();
|
return wxStandardPaths::Get().GetUserConfigDir();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wxString KIPLATFORM::ENV::GetUserCacheDir()
|
wxString KIPLATFORM::ENV::GetUserCachePath()
|
||||||
{
|
{
|
||||||
NSURL* url = [[NSFileManager defaultManager] URLForDirectory:NSCachesDirectory
|
NSURL* url = [[NSFileManager defaultManager] URLForDirectory:NSCachesDirectory
|
||||||
inDomain:NSUserDomainMask
|
inDomain:NSUserDomainMask
|
||||||
|
|
Loading…
Reference in New Issue