From d5eb896df06b32dfa1e4a84082b9836e24618fdd Mon Sep 17 00:00:00 2001 From: h677 Date: Tue, 16 Mar 2004 15:37:55 +0000 Subject: [PATCH] =?utf8?q?=E3=83=A1=E3=83=A2=E3=83=AA=E3=83=AA=E3=83=BC?= =?utf8?q?=E3=82=AF=E5=AF=BE=E7=AD=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- BoardGroup.pas | 3 +++ Favorite.pas | 1 + Giko.pas | 35 +++++++++++++++++++++++++++++------ RoundData.pas | 3 +++ 4 files changed, 36 insertions(+), 6 deletions(-) diff --git a/BoardGroup.pas b/BoardGroup.pas index b115433..47b14bc 100644 --- a/BoardGroup.pas +++ b/BoardGroup.pas @@ -503,6 +503,7 @@ var begin for i := Count - 1 downto 0 do Delete(i); + Capacity := Count; end; function TBBS.Find(key: string): TCategory; @@ -663,6 +664,7 @@ var begin for i := Count - 1 downto 0 do Delete(i); + Capacity := Count; end; function TCategory.FindName(key: string): TBoard; @@ -904,6 +906,7 @@ begin // FUnRead := 0; for i := Count - 1 downto 0 do Delete(i); + Capacity := Count; end; function TBoard.Find(ItemFileName: string): TThreadItem; diff --git a/Favorite.pas b/Favorite.pas index 80e6269..e13cf4a 100644 --- a/Favorite.pas +++ b/Favorite.pas @@ -188,6 +188,7 @@ begin for i := 0 to TreeView.Items.Count - 1 do begin TObject(TreeView.Items[i].Data).Free; end; + TreeView.Free; end; procedure TFavoriteDM.SetFavTreeView(TreeView: TTreeView); diff --git a/Giko.pas b/Giko.pas index 4329bcc..ca4f296 100644 --- a/Giko.pas +++ b/Giko.pas @@ -928,6 +928,7 @@ type // procedure SetStdToolBar; // function GetAction(ActionName: string): TContainedAction; procedure SetLinkBar; + procedure ClearLinkBar; function GetWidthAllToolButton(ToolBar: TToolBar): Integer; procedure MenuBarChevronMenu; procedure LinkBarChevronMenu; @@ -1683,7 +1684,10 @@ begin except end; - + try + ClearLinkBar; + except + end; // FDownload.Free; try @@ -1698,6 +1702,10 @@ begin TreeView.Items.Clear; except end; + try + FavoriteTreeView.Items.Clear; + except + end; try if FavoriteDM <> nil then @@ -6546,10 +6554,13 @@ end; procedure TGikoForm.WndProc(var Message: TMessage); begin - if (Message.Msg = CM_DIALOGCHAR) then - if not (ssAlt in KeyDataToShiftState(TWMChar(Message).KeyData)) then - Exit; - inherited; + try + if (Message.Msg = CM_DIALOGCHAR) then + if not (ssAlt in KeyDataToShiftState(TWMChar(Message).KeyData)) then + Exit; + inherited; + except + end; end; procedure TGikoForm.FormShortCut(var Msg: TWMKey; var Handled: Boolean); @@ -7044,7 +7055,19 @@ begin MainCoolBar.Bands.EndUpdate; end; end; - +procedure TGikoForm.ClearLinkBar; +var + i: Integer; +begin + MainCoolBar.Bands.BeginUpdate; + try + LinkBarPopupMenu.Items.Clear; + for i := LinkToolBar.ButtonCount - 1 downto 0 do + LinkToolBar.RemoveControl(LinkToolBar.Buttons[i]); + finally + MainCoolBar.Bands.EndUpdate; + end; +end; procedure TGikoForm.FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); var Node: TTreeNode; diff --git a/RoundData.pas b/RoundData.pas index 219f450..4f65064 100644 --- a/RoundData.pas +++ b/RoundData.pas @@ -180,11 +180,13 @@ begin TRoundItem(FBoardList[i]).Free; FBoardList.Delete(i); end; + FBoardList.Capacity := FBoardList.Count; for i := FItemList.Count - 1 downto 0 do begin if FItemList[i] <> nil then TRoundItem(FItemList[i]).Free; FItemList.Delete(i); end; + FItemList.Capacity := FItemList.Count; end; function TRoundList.Find(Board: TBoard): Integer; @@ -455,6 +457,7 @@ begin errorSl.SaveToFile(errorFileName); end; finally + errorSl.Free; sl.Free; // boardList.Free; end; -- 2.11.0