diff --git a/common/dialogs/dialog_global_lib_table_config.cpp b/common/dialogs/dialog_global_lib_table_config.cpp index f41d8b63b7..a146112ded 100644 --- a/common/dialogs/dialog_global_lib_table_config.cpp +++ b/common/dialogs/dialog_global_lib_table_config.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include DIALOG_GLOBAL_LIB_TABLE_CONFIG::DIALOG_GLOBAL_LIB_TABLE_CONFIG( wxWindow* aParent, @@ -114,7 +114,7 @@ bool DIALOG_GLOBAL_LIB_TABLE_CONFIG::TransferDataToWindow() if( !templatePath.IsEmpty() ) ss.AddPaths( templatePath, 0 ); else - templatePath = wxStandardPaths::Get().GetUserConfigDir(); + templatePath = KIPLATFORM::ENV::GetUserConfigPath(); m_filePicker1->SetInitialDirectory( templatePath ); diff --git a/common/project.cpp b/common/project.cpp index e5dc39c881..302335663b 100644 --- a/common/project.cpp +++ b/common/project.cpp @@ -22,7 +22,7 @@ */ #include -#include +#include #include #include @@ -206,7 +206,7 @@ const wxString PROJECT::libTableName( const wxString& aLibTableName ) const // to be re-thought out. #ifndef __WXMAC__ - fn.AssignDir( wxStandardPaths::Get().GetUserConfigDir() ); + fn.AssignDir( KIPLATFORM::ENV::GetUserConfigPath() ); #else // don't pollute home folder, temp folder seems to be more appropriate fn.AssignDir( wxStandardPaths::Get().GetTempDir() ); diff --git a/eeschema/dialogs/dialog_plot_schematic.cpp b/eeschema/dialogs/dialog_plot_schematic.cpp index e8ecd0d320..e5608254db 100644 --- a/eeschema/dialogs/dialog_plot_schematic.cpp +++ b/eeschema/dialogs/dialog_plot_schematic.cpp @@ -47,7 +47,7 @@ #include #include -#include +#include #include @@ -165,7 +165,7 @@ void DIALOG_PLOT_SCHEMATIC::OnOutputDirectoryBrowseClicked( wxCommandEvent& even // project path is not defined so point to the users document path to save the plot files. if( Prj().IsNullProject() ) { - path = wxStandardPaths::Get().GetDocumentsDir(); + path = KIPLATFORM::ENV::GetDocumentsPath(); } else { @@ -405,8 +405,7 @@ wxString DIALOG_PLOT_SCHEMATIC::getOutputPath() wxString extMsg; wxFileName fn; - extMsg.Printf( _( "Falling back to user path '%s'." ), - wxStandardPaths::Get().GetDocumentsDir() ); + extMsg.Printf( _( "Falling back to user path '%s'." ), KIPLATFORM::ENV::GetDocumentsPath() ); // Build the absolute path of current output directory to preselect it in the file browser. std::function textResolver = @@ -454,7 +453,7 @@ wxString DIALOG_PLOT_SCHEMATIC::getOutputPath() dlg.SetExtendedMessage( extMsg ); dlg.ShowModal(); - path = wxStandardPaths::Get().GetDocumentsDir(); + path = KIPLATFORM::ENV::GetDocumentsPath(); } } else @@ -467,7 +466,7 @@ wxString DIALOG_PLOT_SCHEMATIC::getOutputPath() dlg.ShowModal(); // Always fall back to user's document path if no other absolute path can be normalized. - path = wxStandardPaths::Get().GetDocumentsDir(); + path = KIPLATFORM::ENV::GetDocumentsPath(); } } else @@ -490,7 +489,7 @@ wxString DIALOG_PLOT_SCHEMATIC::getOutputPath() dlg.SetExtendedMessage( extMsg ); dlg.ShowModal(); - path = wxStandardPaths::Get().GetDocumentsDir(); + path = KIPLATFORM::ENV::GetDocumentsPath(); } } diff --git a/eeschema/files-io.cpp b/eeschema/files-io.cpp index 7d25b7bb54..efb0590756 100644 --- a/eeschema/files-io.cpp +++ b/eeschema/files-io.cpp @@ -680,9 +680,7 @@ bool SCH_EDIT_FRAME::saveSchematicFile( SCH_SHEET* aSheet, const wxString& aSave if( !IsWritable( schematicFileName ) ) return false; - wxStandardPaths& paths = wxStandardPaths::Get(); - wxString tempFile = wxFileName::CreateTempFileName( - paths.GetTempDir() + wxFileName::GetPathSeparator() + wxT( "eeschema" ) ); + wxString tempFile = wxFileName::CreateTempFileName( "eeschema" ); // Save wxLogTrace( traceAutoSave, "Saving file " + schematicFileName.GetFullPath() ); diff --git a/pagelayout_editor/files.cpp b/pagelayout_editor/files.cpp index d28322f959..8f02afc10a 100644 --- a/pagelayout_editor/files.cpp +++ b/pagelayout_editor/files.cpp @@ -293,9 +293,7 @@ bool PL_EDITOR_FRAME::SaveDrawingSheetFile( const wxString& aFullFileName ) { if( !aFullFileName.IsEmpty() ) { - wxStandardPaths& paths = wxStandardPaths::Get(); - wxString tempFile = wxFileName::CreateTempFileName( - paths.GetTempDir() + wxFileName::GetPathSeparator() + wxT( "pledit" ) ); + wxString tempFile = wxFileName::CreateTempFileName( "pledit" ); try { diff --git a/pcbnew/files.cpp b/pcbnew/files.cpp index 17b2440d87..6d1ca32b39 100644 --- a/pcbnew/files.cpp +++ b/pcbnew/files.cpp @@ -1064,9 +1064,7 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool addToHistory, GetBoard()->SynchronizeNetsAndNetClasses(); } - wxStandardPaths& paths = wxStandardPaths::Get(); - wxString tempFile = wxFileName::CreateTempFileName( - paths.GetTempDir() + wxFileName::GetPathSeparator() + wxT( "pcbnew" ) ); + wxString tempFile = wxFileName::CreateTempFileName( "pcbnew" ); wxString upperTxt; wxString lowerTxt;