OSDN Git Service

wxStandardPathsを自前で確保するのではなく、wx側で用意されたものを用いるよう変更。
authorsirakaba <sirakaba@9df91469-1e22-0410-86e7-ea8537beb833>
Sun, 31 Jul 2011 13:45:50 +0000 (13:45 +0000)
committersirakaba <sirakaba@9df91469-1e22-0410-86e7-ea8537beb833>
Sun, 31 Jul 2011 13:45:50 +0000 (13:45 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/tpi/tpi@551 9df91469-1e22-0410-86e7-ea8537beb833

src/common/library/xmldoc.h
src/lychee/frm_main.cpp
src/lychee/lychee.cpp
src/plugin/spiLibrary/spiLibrary.cpp
src/plugin/xpiLibrary/xpiLibrary.cpp

index 95f4d67..f6ed5a4 100644 (file)
@@ -45,6 +45,5 @@ void MakeFormatInfo(wxXmlNode * n, const wxString & szTPIName, TPI_FORMATINFO *
 \r
 wxString inline myMakeXMLName(const wxString & szFile)\r
 {\r
-       wxStandardPaths p;\r
-       return wxPathOnly(p.GetExecutablePath()) + wxT("/lib/") + szFile + wxT(".xml");\r
+       return wxPathOnly(wxStandardPaths::Get().GetExecutablePath()) + wxT("/lib/") + szFile + wxT(".xml");\r
 }\r
index 1bbe967..6cb4230 100644 (file)
@@ -748,13 +748,12 @@ void MainFrame::OnArcExtract(wxCommandEvent& e)
                // 作業ディレクトリ作成。\r
                swInfo.fStoreDirectoryPathes = false;\r
                wxString szDestDirBase = nMode == 3 ? this->tree_ctrl->GetItemText(this->tree_ctrl->GetSelection()) : wxT("tpi_tmp");\r
-               wxStandardPaths p;\r
                if (szDestDirBase == wxT("-----"))\r
                {\r
                        // 書庫ルートのときは書庫名にしておく。\r
                        szDestDirBase = this->fnArchive.GetName();\r
                }\r
-               swInfo.fnDestinationDirectory = MakeDirPath(wxFileName::DirName(p.GetTempDir()), szDestDirBase, true);\r
+               swInfo.fnDestinationDirectory = MakeDirPath(wxFileName::DirName(wxStandardPaths::Get().GetTempDir()), szDestDirBase, true);\r
                if (! swInfo.fnDestinationDirectory.IsOk())\r
                {\r
                        wxLogError(_("Unable to make the temporary directory!"));\r
index 32f90ef..4c7d416 100644 (file)
@@ -39,8 +39,7 @@ bool Lychee::OnInit()
        {\r
                wxChar cSep = wxFileName::GetPathSeparator();\r
                szCwd = ::wxGetCwd() + cSep;\r
-               wxStandardPaths p;\r
-               ::wxSetWorkingDirectory(::wxPathOnly(p.GetExecutablePath()) + cSep);\r
+               ::wxSetWorkingDirectory(::wxPathOnly(wxStandardPaths::Get().GetExecutablePath()) + cSep);\r
        }\r
 \r
        // 言語ファイルのパスを指定。\r
index 7171ded..0bc6f5a 100644 (file)
@@ -137,8 +137,7 @@ int __stdcall LoadPlugin
        }\r
        hFile.Close();\r
 \r
-       wxStandardPaths p;\r
-       wxString szSPIPath = wxPathOnly(p.GetExecutablePath()) + wxT("/lib/"), szSPIName;\r
+       wxString szSPIPath = wxPathOnly(wxStandardPaths::Get().GetExecutablePath()) + wxT("/lib/"), szSPIName;\r
        wxDir fs(szSPIPath);\r
        if (fs.GetFirst(& szSPIName, wxT("*.spi")))\r
        {\r
index 80e2566..8d5846f 100644 (file)
@@ -142,8 +142,7 @@ int __stdcall LoadPlugin
        }\r
        hFile.Close();\r
 \r
-       wxStandardPaths p;\r
-       wxString szSPIPath = wxPathOnly(p.GetExecutablePath()) + wxT("/lib/"), szSPIName;\r
+       wxString szSPIPath = wxPathOnly(wxStandardPaths::Get().GetExecutablePath()) + wxT("/lib/"), szSPIName;\r
        wxDir fs(szSPIPath);\r
        if (fs.GetFirst(& szSPIName, wxT("*.spi")))\r
        {\r
@@ -231,8 +230,7 @@ int __stdcall GetFileInformation
        static wxDir fs;\r
        if (_bFirst)\r
        {\r
-               wxStandardPaths p;\r
-               szXPIPath = wxPathOnly(p.GetExecutablePath()) + wxT("/lib/");\r
+               szXPIPath = wxPathOnly(wxStandardPaths::Get().GetExecutablePath()) + wxT("/lib/");\r
                fs.Open(szXPIPath);\r
 \r
                // 画像の情報を取得。\r
@@ -404,12 +402,7 @@ int __stdcall Command
                return nErrorCode;\r
        }\r
 \r
-       wxString szXPIPath;\r
-       {\r
-               wxStandardPaths p;\r
-               szXPIPath = wxPathOnly(p.GetExecutablePath()) + wxT("/lib/");\r
-       }\r
-\r
+       wxString szXPIPath = wxPathOnly(wxStandardPaths::Get().GetExecutablePath()) + wxT("/lib/");\r
        for (size_t i = 0; i < _asFiles.GetCount(); i++)\r
        {\r
                // 処理を行うか確認。\r