OSDN Git Service

パスワード指定に対する処理の改善。
authorsirakaba <sirakaba@9df91469-1e22-0410-86e7-ea8537beb833>
Thu, 23 Sep 2010 02:07:10 +0000 (02:07 +0000)
committersirakaba <sirakaba@9df91469-1e22-0410-86e7-ea8537beb833>
Thu, 23 Sep 2010 02:07:10 +0000 (02:07 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/tpi/tpi@327 9df91469-1e22-0410-86e7-ea8537beb833

src/lychee/dlg_process.cpp

index e27b3f4..5f952bc 100644 (file)
@@ -150,12 +150,25 @@ int ProcessDialog::CallbackProc(unsigned int _uMsg, void * _pStructure)
                switch (piInfo->eStatus)\r
                {\r
                case TPI_PARAM_PASSWORD:\r
-                       piInfo->szParam = ::wxGetPasswordFromUser(_("Password for:\n") + piInfo->fiInfo.fnFileName.GetFullPath(), wxT("Lychee"), wxEmptyString, this);\r
-                       if (piInfo->szParam.IsEmpty())\r
+               {\r
+                       static wxFileName fnFormer;\r
+                       static wxString szFormer;\r
+                       if (piInfo->fiInfo.fnFileName == fnFormer)\r
                        {\r
-                               this->fCancel = true;\r
+                               piInfo->szParam = ::wxGetPasswordFromUser(_("Password for:\n") + piInfo->fiInfo.fnFileName.GetFullPath(), wxT("Lychee"), wxEmptyString, this);\r
+                               if (piInfo->szParam.IsEmpty())\r
+                               {\r
+                                       this->fCancel = true;\r
+                               }\r
+                               szFormer = piInfo->szParam;\r
+                       }\r
+                       else\r
+                       {\r
+                               piInfo->szParam = szFormer;\r
+                               fnFormer = piInfo->fiInfo.fnFileName;\r
                        }\r
                        break;\r
+               }\r
                case TPI_PARAM_NEXTVOLUME:\r
                {\r
                        wxFileDialog fd(this, _("Select next volume of: ") + piInfo->fiInfo.fnFileName.GetFullName());\r