OSDN Git Service

終了処理のところの細かい調整
authorh677 <h677>
Wed, 24 Mar 2004 15:20:19 +0000 (15:20 +0000)
committerh677 <h677>
Wed, 24 Mar 2004 15:20:19 +0000 (15:20 +0000)
Favorite.pas
Giko.pas
gikoNavi.dpr

index f427d5d..f59a3fa 100644 (file)
@@ -189,8 +189,9 @@ begin
        for i := TreeView.Items.Count - 1 downto 0 do begin
                TObject(TreeView.Items[i].Data).Free;
        end;
+    TreeView.Items.Clear;
     TreeView.Items.EndUpdate;
-    TreeView.Free;
+    //TreeView.Free;
 end;
 
 procedure TFavoriteDM.SetFavTreeView(TreeView: TTreeView);
index c4cd21b..423d459 100644 (file)
--- a/Giko.pas
+++ b/Giko.pas
@@ -1718,19 +1718,24 @@ begin
        except
        end;
 
-       //\83q\83X\83g\83\8a\83\8a\83X\83g\95Û\91
        try
-               SaveHistory;
+        TreeView.Items.BeginUpdate;
+        for i := TreeView.Items.Count - 1 downto 0 do begin
+               TreeView.Items[i].Free;
+        end;
+               TreeView.Items.Clear;
+        TreeView.Items.EndUpdate;
        except
-       end;
 
-       //\83q\83X\83g\83\8a\83\8a\83X\83g
+       end;
+       //\83q\83X\83g\83\8a\83\8a\83X\83g\95Û\91
        try
-    //  ClearHistory;
-               FHistoryList.Free;
+               SaveHistory;
+        ClearHistory;
        except
        end;
 
+
        //\83A\83h\83\8c\83X\97\9a\97ð\95Û\91
        try
                AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
@@ -1756,10 +1761,7 @@ begin
        //TreeView\83N\83\8a\83A\81iBBS2ch.Free\82Ì\8cã\82É\83N\83\8a\83A\82·\82é\82ÆXP\83X\83^\83C\83\8b\8e\9e\82É\83G\83\89\81[\8fo\82é\81j
        //Sleep(10);
     //Application.ProcessMessages;
-       try
-               TreeView.Items.Clear;
-       except
-       end;
+{   FavoriteDM\82Ì\92\86\82Å\82à\89ð\95ú\82µ\82Ä\82é\82©\82ç\82±\82±\82Å\82Í\82â\82ç\82È\82­\82Ä\82æ\82©\82Á\82½\81B
     try
         FavoriteTreeView.Items.BeginUpdate;
         for i := FavoriteTreeView.Items.Count - 1 downto 0 do begin
@@ -1770,9 +1772,7 @@ begin
        FavoriteTreeView.Items.Clear;
     except
     end;
-
-
-
+}
        try
                if FavoriteDM <> nil then
                        FavoriteDM.Free;
@@ -1847,7 +1847,7 @@ begin
        except
        end;
 
-
+    Application.Terminate;
 end;
 
 procedure TGikoForm.FormDestroy(Sender: TObject);
@@ -1861,8 +1861,8 @@ begin
 //    ListCoolBar.WindowProc := nil;
 //    BrowserCoolBar.WindowProc := nil;
 //    MainCoolBar.WindowProc := nil;
-       Application.Terminate;
-       Action := caFree;
+//     Application.Terminate;
+//     Action := caFree;
 //     Application.UnhookMainWindow(Hook);
 end;
 
@@ -1949,7 +1949,8 @@ begin
 
        //\82¨\8bC\82É\93ü\82è\93Ç\82Ý\8d\9e\82Ý
 //     FFavorite := TFavorite.Create(FavoriteTreeView);
-       FavoriteTreeView.Items.Clear;
+       //FavoriteTreeView.Items.Clear;
+    FavoriteDM.DataModuleDestroy(Self);
        FavoriteDM.SetFavTreeView(FavoriteTreeView);
        FavoriteDM.ReadFavorite;
        SetLinkBar;
@@ -2804,6 +2805,7 @@ end;
 
 procedure TGikoForm.AppFormDeactivate(Sender: TObject);
 begin
+    Application.ProcessMessages;
        if Application.Terminated then
                Exit;
        if PreviewTimer.Enabled then
index f14d3bb..05912be 100644 (file)
@@ -3,7 +3,7 @@ program gikoNavi;
 {%ToDo 'gikoNavi.todo'}
 
 uses
-//  MemCheck in 'MemCheck.pas',
+  //MemCheck in 'MemCheck.pas',
   Windows,
   SysUtils,
   Forms,