OSDN Git Service

ClearHistoryメソッドを復活させてみた。
authorh677 <h677>
Tue, 30 Mar 2004 14:13:58 +0000 (14:13 +0000)
committerh677 <h677>
Tue, 30 Mar 2004 14:13:58 +0000 (14:13 +0000)
Giko.pas

index 1e670ab..eaa698b 100644 (file)
--- a/Giko.pas
+++ b/Giko.pas
@@ -1733,7 +1733,7 @@ begin
        //\83q\83X\83g\83\8a\83\8a\83X\83g\95Û\91
        try
                SaveHistory;
-        //ClearHistory;
+        ClearHistory;
        except
        end;
 
@@ -3624,13 +3624,19 @@ var
        i : Integer;
 begin
        //FHistoryList.Clear;
+
        try
                for i := FHistoryList.Count - 1 downto 0 do begin
-                       TFavoriteThreadItem( FHistoryList[ i ] ).Free;
-               //FHistoryList.Delete(i);
+                       if TObject(FHistoryList[ i ]) is TFavoriteThreadItem then
+               TFavoriteThreadItem(FHistoryList[ i ]).Free
+            else if TObject(FHistoryList[ i ]) is TFavoriteBoardItem then
+                TFavoriteBoardItem(FHistoryList[ i ]).Free;
+
+            //FHistoryList.Delete(i);
         end;
        except
        end;
+
        FHistoryList.Clear;
     FHistoryList.Capacity := FHistoryList.Count;
 
@@ -6261,8 +6267,6 @@ var
        Items           : ^TTreeNodes;
        ItemURL : string;
        Data            : Pointer;
-    sT : Cardinal;
-    eT : Cardinal;
 begin
 
        Items := @(FavoriteTreeView.Items);
@@ -6270,7 +6274,6 @@ begin
                Item := TFavoriteBoardItem( Item ).Item
        else if Item is TFavoriteThreadItem then
                Item := TFavoriteThreadItem( Item ).Item;
-    sT := GetTickCount;
        if Item is TBoard then begin
                ItemURL := TBoard( Item ).URL;
                for i := Items^.Count - 1 downto 0 do begin
@@ -6283,7 +6286,6 @@ begin
                                end;
                        end;
                end;
-        eT := GetTickCount;
                Dlg := TFavoriteAddDialog.Create(Self);
                try
                        Dlg.SetBoard( TBoard( Item ) );
@@ -6303,7 +6305,6 @@ begin
                                end;
                        end;
                end;
-        eT := GetTickCount;
                Dlg := TFavoriteAddDialog.Create(Self);
                try
                        Dlg.SetThreadItem( TThreadItem( Item ) );
@@ -6314,7 +6315,6 @@ begin
        end;
 
        SetLinkBar;
-    ShowMessage(IntToStr(eT-sT));
 end;
 
 procedure TGikoForm.FavoriteAddActionExecute(Sender: TObject);