From 56fbe232bcb7a398348c3d0ec726c9fecd0b2ae5 Mon Sep 17 00:00:00 2001 From: h677 Date: Mon, 24 Apr 2006 16:12:53 +0000 Subject: [PATCH] =?utf8?q?=E6=A4=9C=E7=B4=A2=E4=B8=AD=E3=81=AE=E3=83=95?= =?utf8?q?=E3=82=A9=E3=83=BC=E3=83=A0=E3=81=AE=E3=82=AF=E3=83=AD=E3=83=BC?= =?utf8?q?=E3=82=BA=E3=81=A7=E3=81=AE=E3=82=AD=E3=83=A3=E3=83=B3=E3=82=BB?= =?utf8?q?=E3=83=AB=E5=87=A6=E7=90=86=E8=BF=BD=E5=8A=A0=E3=80=82=20?= =?utf8?q?=E3=83=AD=E3=82=B0=E6=A4=9C=E7=B4=A2=E3=83=95=E3=82=A9=E3=83=BC?= =?utf8?q?=E3=83=A0=E3=82=92=E6=B6=88=E3=81=95=E3=81=9A=E3=81=AB=E3=80=81?= =?utf8?q?=E7=B5=82=E4=BA=86=E3=81=97=E3=81=9F=E3=81=A8=E3=81=8D=E3=81=AEA?= =?utf8?q?ccesViolation=E5=AF=BE=E7=AD=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Giko.pas | 27 +++++++++++++++++++-------- Search.dfm | 1 + Search.pas | 11 +++++++++++ 3 files changed, 31 insertions(+), 8 deletions(-) diff --git a/Giko.pas b/Giko.pas index a21fcd2..e02f57e 100644 --- a/Giko.pas +++ b/Giko.pas @@ -1465,21 +1465,32 @@ procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean); begin // if GikoForm.WindowState <> wsMinimized then // SaveCoolBarSettings; + CanClose := True; if ( GikoSys.Setting.ShowDialogForEnd ) and (MessageDlg('ƒMƒRƒiƒr‚ðI—¹‚µ‚Ä‚æ‚낵‚¢‚Å‚·‚©H', mtConfirmation,[mbOk, mbCancel], 0) = mrCancel ) then begin CanClose := false; Exit; - end else begin - CanClose := True; - if GikoSys.Setting.TabAutoLoadSave then begin - GikoDM.TabAutoSaveAction.Execute; + end; + + if GikoSys.Setting.TabAutoLoadSave then begin + GikoDM.TabAutoSaveAction.Execute; + end; + + if (SearchDialog <> nil) then begin + if (SearchDialog.Visible) then begin + SearchDialog.Close; + try + SearchDialog.Release; + except + end; + SearchDialog := nil; end; end; - { //2chŒ¾Œȩ̂²ÙFree + { //2chŒ¾Œȩ̂²ÙFree if GikoSys.Setting.Gengo <> nil then begin GikoSys.Setting.Gengo.Free; end; - } + } Application.UnhookMainWindow(Hook); Application.Terminate; end; @@ -4769,8 +4780,8 @@ begin ListView.Items.Count := ListView.Items.Count + 1; end; end; - // ƒƒO‚È‚µƒXƒŒƒbƒh‚Ì‚Æ‚«‚́AƒzƒXƒg–¼‚̃`ƒFƒbƒN‚ð‚·‚é - if not ThreadItem.IsLogFile then begin + // 2‚¿‚á‚ñ‚Ë‚é‚Å‚È‚­ƒƒO‚È‚µƒXƒŒƒbƒh‚Ì‚Æ‚«‚́AƒzƒXƒg–¼‚̃`ƒFƒbƒN‚ð‚·‚é + if (not Board.Is2ch) and (not ThreadItem.IsLogFile) then begin if AnsiPos(Host, Board.URL) = 0 then ThreadItem.DownloadHost := Host else diff --git a/Search.dfm b/Search.dfm index 7123ed4..978b0ea 100644 --- a/Search.dfm +++ b/Search.dfm @@ -16,6 +16,7 @@ object SearchDialog: TSearchDialog Font.Style = [] OldCreateOrder = False Position = poOwnerFormCenter + OnCloseQuery = FormCloseQuery OnCreate = FormCreate OnDestroy = FormDestroy DesignSize = ( diff --git a/Search.pas b/Search.pas index 50beca9..c476e4c 100644 --- a/Search.pas +++ b/Search.pas @@ -39,6 +39,7 @@ type procedure CancelBottonClick(Sender: TObject); procedure BoardListViewResize(Sender: TObject); procedure FormDestroy(Sender: TObject); + procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); private { Private éŒ¾ } FChkItem: TObject; @@ -443,4 +444,14 @@ begin end; end; +procedure TSearchDialog.FormCloseQuery(Sender: TObject; + var CanClose: Boolean); +begin + if (BoardsProgressBar.Visible) then begin + TGrep(Sender).Cancel := true; + FCancel := true; + Application.ProcessMessages; + end; +end; + end. -- 2.11.0