From: sirakaba Date: Tue, 2 Mar 2010 05:07:17 +0000 (+0000) Subject: 上書き確認画面の実装準備。進捗状況をファイルごとと書庫全体の二つに分離。 X-Git-Tag: 0.01beta7~12 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=45479713698d8629fb8e4dffe8c6bb5c6375b28f;p=tpi%2Flychee.git 上書き確認画面の実装準備。進捗状況をファイルごとと書庫全体の二つに分離。 git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/tpi/tpi@276 9df91469-1e22-0410-86e7-ea8537beb833 --- 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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +