From 45479713698d8629fb8e4dffe8c6bb5c6375b28f Mon Sep 17 00:00:00 2001 From: sirakaba Date: Tue, 2 Mar 2010 05:07:17 +0000 Subject: [PATCH] =?utf8?q?=E4=B8=8A=E6=9B=B8=E3=81=8D=E7=A2=BA=E8=AA=8D?= =?utf8?q?=E7=94=BB=E9=9D=A2=E3=81=AE=E5=AE=9F=E8=A3=85=E6=BA=96=E5=82=99?= =?utf8?q?=E3=80=82=E9=80=B2=E6=8D=97=E7=8A=B6=E6=B3=81=E3=82=92=E3=83=95?= =?utf8?q?=E3=82=A1=E3=82=A4=E3=83=AB=E3=81=94=E3=81=A8=E3=81=A8=E6=9B=B8?= =?utf8?q?=E5=BA=AB=E5=85=A8=E4=BD=93=E3=81=AE=E4=BA=8C=E3=81=A4=E3=81=AB?= =?utf8?q?=E5=88=86=E9=9B=A2=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/tpi/tpi@276 9df91469-1e22-0410-86e7-ea8537beb833 --- src/lychee/dlg_process.cpp | 20 +-- src/lychee/dlg_process.h | 12 +- src/lychee/ui/dlg_process.fbp | 342 +++++++++++++++++++++++++++++++++++++++++- 3 files changed, 353 insertions(+), 21 deletions(-) diff --git a/src/lychee/dlg_process.cpp b/src/lychee/dlg_process.cpp index d0f29a7..6acff50 100644 --- a/src/lychee/dlg_process.cpp +++ b/src/lychee/dlg_process.cpp @@ -57,7 +57,8 @@ void ProcessDialog::OnInit(wxInitDialogEvent &) // XRCと結びつけ。 this->ebSource = XRCCTRL(* this, "ebSource", wxTextCtrl); this->ebTarget = XRCCTRL(* this, "ebTarget", wxTextCtrl); - this->gauge = XRCCTRL(* this, "gauge", wxGauge); + this->gFile = XRCCTRL(* this, "gFile", wxGauge); + this->gArchive = XRCCTRL(* this, "gArchive", wxGauge); this->fCancel = false; g_procDlg = this; @@ -101,8 +102,8 @@ int ProcessDialog::CallbackProc(unsigned int _uMsg, void * _pStructure) this->ebTarget->ChangeValue(piInfo->fnDestination.GetFullPath()); if (piInfo->fiInfo.nUnpackedSize > 10000) { - this->gauge->SetRange(piInfo->fiInfo.nUnpackedSize); - this->gauge->SetValue(0); + this->gFile->SetRange(piInfo->fiInfo.nUnpackedSize); + this->gFile->SetValue(0); } ::wxSafeYield(this, true); break; @@ -111,27 +112,28 @@ int ProcessDialog::CallbackProc(unsigned int _uMsg, void * _pStructure) { if (piInfo->fiInfo.nUnpackedSize > 10000) { - this->gauge->SetValue(piInfo->nProcessedSize); + this->gFile->SetValue(piInfo->nProcessedSize); } ::wxSafeYield(this, true); s_nGaugeCounter = 0; } break; case TPI_STATUS_ENDPROCESS: -// this->gauge->SetValue(piInfo->fiInfo.nUnpackedSize.ToULong()); +// this->gFile->SetValue(piInfo->fiInfo.nUnpackedSize.ToULong()); + this->gArchive->SetValue(this->gArchive->GetValue() + 1); break; // 書庫ロード時用の独自仕様。 case 0x1000: this->ebSource->ChangeValue(piInfo->fiInfo.fnFileName.GetFullPath()); - this->gauge->SetRange(piInfo->fiInfo.nUnpackedSize); - this->gauge->SetValue(0); + this->gArchive->SetRange(piInfo->fiInfo.nUnpackedSize); + this->gArchive->SetValue(0); break; case 0x1001: // 更新しすぎると低速なので100ファイル毎に更新する。 - if (piInfo->nProcessedSize > this->gauge->GetValue() + 100) + if (piInfo->nProcessedSize > this->gArchive->GetValue() + 100) { this->ebTarget->ChangeValue(piInfo->fiInfo.fnFileName.GetFullPath()); - this->gauge->SetValue(piInfo->nProcessedSize); + this->gArchive->SetValue(piInfo->nProcessedSize); ::wxSafeYield(this, true); } break; diff --git a/src/lychee/dlg_process.h b/src/lychee/dlg_process.h index 8412858..9d31833 100644 --- a/src/lychee/dlg_process.h +++ b/src/lychee/dlg_process.h @@ -24,11 +24,6 @@ class ProcessDialog: public wxDialog { public: - wxTextCtrl* ebSource; - wxTextCtrl* ebTarget; - wxGauge* gauge; - bool fCancel; - void OnInit(wxInitDialogEvent &); void OnClose(wxCloseEvent &); int CallbackProc(unsigned int, void *); @@ -37,6 +32,13 @@ public: ~ProcessDialog(); DECLARE_EVENT_TABLE() + +private: + bool fCancel; + wxTextCtrl* ebSource; + wxTextCtrl* ebTarget; + wxGauge* gFile; + wxGauge* gArchive; }; //****************************************************************************** diff --git a/src/lychee/ui/dlg_process.fbp b/src/lychee/ui/dlg_process.fbp index def201c..0934670 100644 --- a/src/lychee/ui/dlg_process.fbp +++ b/src/lychee/ui/dlg_process.fbp @@ -99,7 +99,7 @@ Source: - label_3 + protected 50, 14 @@ -216,7 +216,7 @@ Target: - label_4 + protected 50, 14 @@ -311,7 +311,7 @@ 5 - wxALL|wxEXPAND + wxEXPAND|wxLEFT|wxRIGHT 0 @@ -319,15 +319,15 @@ 1 - + 0 wxID_ANY - gauge + gFile protected - 10 - 246, 20 + 100 + -1,20 wxGA_HORIZONTAL @@ -360,6 +360,334 @@ + + 5 + wxALL|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + + + gArchive + protected + + 100 + -1,20 + wxGA_HORIZONTAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + 3 + wxBOTH + + + 0 + + fgSizer1 + wxFLEX_GROWMODE_SPECIFIED + none + 2 + 0 + + 5 + wxALL + 0 + + + + 1 + + + 1 + wxID_ANY + Do you want to continue? + + + + protected + + 200,-1 + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + + 0 + + + + 1 + 1 + + + 1 + wxID_ANY + Continue + + + btnContinue + protected + + 70,25 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxLEFT|wxRIGHT + 0 + + + + 1 + 1 + + + 1 + wxID_ANY + Skip + + + btnSkip + protected + + 70,25 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT + 0 + + + 0 + + 1 + + + 1 + wxID_ANY + Always apply this choice + + + cbAlways + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + + 0 + + + + 1 + 1 + + + 1 + wxID_ANY + Rename + + + btnRename + protected + + 70,25 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- 2.11.0