OSDN Git Service

LycheeからのDnDができなくなっていたバグを修正。
authorsirakaba <sirakaba@9df91469-1e22-0410-86e7-ea8537beb833>
Sun, 10 Feb 2013 01:35:34 +0000 (01:35 +0000)
committersirakaba <sirakaba@9df91469-1e22-0410-86e7-ea8537beb833>
Sun, 10 Feb 2013 01:35:34 +0000 (01:35 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/tpi/tpi@635 9df91469-1e22-0410-86e7-ea8537beb833

src/lychee/dlg_process.cpp

index a0aecfe..bc81267 100644 (file)
@@ -89,6 +89,7 @@ void ProcessDialog::OnInit(wxInitDialogEvent &)
                // 2回目以降は何もせず終了。\r
                return;\r
        }\r
+       MainFrame * frm_main = (MainFrame *) this->hParent;\r
 \r
        // XRCと結びつけ。\r
        this->ebTarget          = XRCCTRL(* this, "ebTarget",     wxTextCtrl);\r
@@ -103,11 +104,11 @@ void ProcessDialog::OnInit(wxInitDialogEvent &)
        TPI_PROCESSINFO piInfo;\r
        piInfo.eMessage = TPI_MESSAGE_STATUS;\r
        piInfo.eStatus = 0x1000;\r
-       piInfo.fiInfo.fnFileName = ((MainFrame *) this->hParent)->fnArchive;\r
+       piInfo.fiInfo.fnFileName = frm_main->fnArchive;\r
        piInfo.fiInfo.nUnpackedSize = this->nFileCount;\r
        this->CallbackProc(TPI_NOTIFY_COMMON, & piInfo);\r
 \r
-       if (((MainFrame *) this->hParent)->conf.ReadId(CONF_PROCESS_DLG, false))\r
+       if (frm_main->conf.ReadId(CONF_PROCESS_DLG, false))\r
        {\r
                // 旧来の進捗ダイアログを表示。\r
                // ここでOnInitが呼ばれるので、OnInitの最初で無効化している。\r
@@ -115,7 +116,6 @@ void ProcessDialog::OnInit(wxInitDialogEvent &)
        }\r
 \r
        // ウインドウの機能を無効化。\r
-       MainFrame * frm_main = (MainFrame *) this->hParent;\r
        frm_main->tree_ctrl->Freeze();\r
        frm_main->list_ctrl->Freeze();\r
        frm_main->menubar->EnableTop(0, false);\r
@@ -124,7 +124,7 @@ void ProcessDialog::OnInit(wxInitDialogEvent &)
        frm_main->toolbar->Enable(false);\r
 #ifdef __WINDOWS__\r
        // タスクバー。\r
-       this->hTBWnd = this->hParent->GetHandle();\r
+       this->hTBWnd = frm_main->GetHandle();\r
 \r
        ::CoCreateInstance(CLSID_TaskbarList, NULL, CLSCTX_INPROC_SERVER, IID_ITaskbarList3, (void **) & this->tlTaskbar);\r
        if (this->tlTaskbar != NULL)\r
@@ -213,7 +213,7 @@ int ProcessDialog::CallbackProc(unsigned int _uMsg, void * _pStructure)
                        this->ebSource->ChangeValue(piInfo->fiInfo.fnFileName.GetFullPath());\r
                        this->Update();\r
                        ((MainFrame *) this->hParent)->gFrame->Show();\r
-                       ::wxSafeYield(this->hParent, true);\r
+//                     ::wxSafeYield(this->hParent, true);\r
                case 0x1001: // 閲覧時は最初にファイル数が分からないので、ここで設定。\r
                        this->gArchive->SetRange(piInfo->fiInfo.nUnpackedSize);\r
                        ((MainFrame *) this->hParent)->gFrame->SetRange(piInfo->fiInfo.nUnpackedSize);\r
@@ -221,24 +221,24 @@ int ProcessDialog::CallbackProc(unsigned int _uMsg, void * _pStructure)
 #ifdef __WINDOWS__\r
                        s_nFileCount = piInfo->fiInfo.nUnpackedSize;\r
 #endif\r
-//                     sw.Start();\r
+                       sw.Start();\r
                        if (piInfo->eStatus == 0x1001)\r
                        {\r
                                this->fOpen = true;\r
                        }\r
                        break;\r
                case 0x1002: // 各ファイルの処理を開始。\r
-//                     if (sw.Time() > 500)\r
+                       if (sw.Time() > 500)\r
                        {\r
                                if (this->IsShownOnScreen())\r
                                {\r
-//                                     sw.Start();\r
+                                       sw.Start();\r
                                        this->ebTarget->ChangeValue(piInfo->fiInfo.fnFileName.GetFullPath());\r
                                        this->gArchive->SetValue(piInfo->nProcessedSize);\r
                                        this->Update();\r
 //                                     ::wxSafeYield(this, true);\r
                                }\r
-//                             ::wxSafeYield(this->hParent, true);\r
+                               ::wxSafeYield(this->hParent, true);\r
                        }\r
                        ((MainFrame *) this->hParent)->gFrame->SetValue(piInfo->nProcessedSize);\r
 #ifdef __WINDOWS__\r