e.Veto();\r
}\r
\r
-//******************************************************************************\r
-// ダイアログプロシージャ\r
-//******************************************************************************\r
-\r
-int __stdcall TPICallbackProc(unsigned int _uMsg, void * _pStructure)\r
+int ProcessDialog::CallbackProc(unsigned int _uMsg, void * _pStructure)\r
{\r
if (_uMsg != TPI_NOTIFY_COMMON)\r
{\r
}\r
\r
TPI_PROCESSINFO * piInfo = (TPI_PROCESSINFO *) _pStructure;\r
- if (g_procDlg == NULL || piInfo == NULL || ! g_procDlg->IsShown())\r
+ if (piInfo == NULL || ! g_procDlg->IsShown())\r
{\r
return TPI_CALLBACK_CONTINUE;\r
}\r
switch (piInfo->uStatus)\r
{\r
case TPI_STATUS_OPENARCHIVE:\r
- g_procDlg->ebSource->ChangeValue(piInfo->fiInfo.fnFileName.GetFullPath());\r
+ this->ebSource->ChangeValue(piInfo->fiInfo.fnFileName.GetFullPath());\r
break;\r
case TPI_STATUS_BEGINPROCESS:\r
- g_procDlg->ebTarget->ChangeValue((piInfo->fnDestination.IsOk() ? piInfo->fnDestination : piInfo->fiInfo.fnFileName).GetFullPath());\r
+ this->ebSource->ChangeValue(piInfo->fiInfo.fnFileName.GetFullPath());\r
+ this->ebTarget->ChangeValue(piInfo->fnDestination.GetFullPath());\r
if (piInfo->fiInfo.llUnpackedSize > 10000)\r
{\r
- g_procDlg->gauge->SetRange(piInfo->fiInfo.llUnpackedSize.ToULong());\r
- g_procDlg->gauge->SetValue(0);\r
+ this->gauge->SetRange(piInfo->fiInfo.llUnpackedSize.ToULong());\r
+ this->gauge->SetValue(0);\r
}\r
- ::wxSafeYield(g_procDlg, true);\r
+ ::wxSafeYield(this, true);\r
break;\r
case TPI_STATUS_INPROCESS:\r
if (s_nGaugeCounter++ > 100)\r
{\r
if (piInfo->fiInfo.llUnpackedSize > 10000)\r
{\r
- g_procDlg->gauge->SetValue(piInfo->llProcessedSize.ToULong());\r
+ this->gauge->SetValue(piInfo->llProcessedSize.ToULong());\r
}\r
- ::wxSafeYield(g_procDlg, true);\r
+ ::wxSafeYield(this, true);\r
s_nGaugeCounter = 0;\r
}\r
break;\r
case TPI_STATUS_ENDPROCESS:\r
-// g_procDlg->gauge->SetValue(piInfo->fiInfo.llUnpackedSize.ToULong());\r
+// this->gauge->SetValue(piInfo->fiInfo.llUnpackedSize.ToULong());\r
break;\r
// 書庫ロード時用の独自仕様。\r
case 0x1000:\r
- g_procDlg->ebSource->ChangeValue(piInfo->fiInfo.fnFileName.GetFullPath());\r
- g_procDlg->gauge->SetRange(piInfo->fiInfo.llUnpackedSize.ToULong());\r
- g_procDlg->gauge->SetValue(0);\r
+ this->ebSource->ChangeValue(piInfo->fiInfo.fnFileName.GetFullPath());\r
+ this->gauge->SetRange(piInfo->fiInfo.llUnpackedSize.ToULong());\r
+ this->gauge->SetValue(0);\r
break;\r
case 0x1001:\r
// 更新しすぎると低速なので100ファイル毎に更新する。\r
- if (piInfo->llProcessedSize > g_procDlg->gauge->GetValue() + 100)\r
+ if (piInfo->llProcessedSize > this->gauge->GetValue() + 100)\r
{\r
- g_procDlg->ebTarget->ChangeValue(piInfo->fiInfo.fnFileName.GetFullPath());\r
- g_procDlg->gauge->SetValue(piInfo->llProcessedSize.ToULong());\r
- ::wxSafeYield(g_procDlg, true);\r
+ this->ebTarget->ChangeValue(piInfo->fiInfo.fnFileName.GetFullPath());\r
+ this->gauge->SetValue(piInfo->llProcessedSize.ToULong());\r
+ ::wxSafeYield(this, true);\r
}\r
break;\r
}\r
switch (piInfo->uStatus)\r
{\r
case TPI_PARAM_PASSWORD:\r
- piInfo->szParam = ::wxGetPasswordFromUser(_("Password for:\n") + piInfo->fiInfo.fnFileName.GetFullPath(), wxT("Lychee"), wxEmptyString, g_procDlg);\r
+ piInfo->szParam = ::wxGetPasswordFromUser(_("Password for:\n") + piInfo->fiInfo.fnFileName.GetFullPath(), wxT("Lychee"), wxEmptyString, this);\r
if (piInfo->szParam.IsEmpty())\r
{\r
- g_procDlg->fCancel = true;\r
+ this->fCancel = true;\r
}\r
break;\r
case TPI_PARAM_NEXTVOLUME:\r
{\r
- wxFileDialog fd(g_procDlg, _("Select next volume of: ") + piInfo->fiInfo.fnFileName.GetFullName());\r
+ wxFileDialog fd(this, _("Select next volume of: ") + piInfo->fiInfo.fnFileName.GetFullName());\r
fd.SetWindowStyleFlag(wxFD_FILE_MUST_EXIST);\r
if (fd.ShowModal() == wxID_CANCEL)\r
{\r
- g_procDlg->fCancel = true;\r
+ this->fCancel = true;\r
}\r
piInfo->szParam = fd.GetPath();\r
break;\r
return TPI_CALLBACK_UNSUPPORTED;\r
}\r
\r
- return g_procDlg->fCancel ? TPI_CALLBACK_CANCEL : TPI_CALLBACK_CONTINUE;\r
+ return this->fCancel ? TPI_CALLBACK_CANCEL : TPI_CALLBACK_CONTINUE;\r
+}\r
+\r
+//******************************************************************************\r
+// ダイアログプロシージャ\r
+//******************************************************************************\r
+\r
+int __stdcall TPICallbackProc(unsigned int _uMsg, void * _pStructure)\r
+{\r
+ return g_procDlg == NULL ? TPI_CALLBACK_CONTINUE : g_procDlg->CallbackProc(_uMsg, _pStructure);\r
}\r