OSDN Git Service

close #15974
authorh677 <h677>
Sun, 5 Apr 2009 14:24:40 +0000 (14:24 +0000)
committerh677 <h677>
Sun, 5 Apr 2009 14:24:40 +0000 (14:24 +0000)
タブの自動復元の際の処理を見直して、ブラウザの描画待ちでメッセージを処理
せずに単純スリープするようにした。

Giko.pas

index 30d545c..091fc8f 100644 (file)
--- a/Giko.pas
+++ b/Giko.pas
@@ -1472,8 +1472,8 @@ var
        item        : TThreadItem;
 begin
        if FStartUp then begin
+       FStartUp := false;
                ShowWindow(Application.Handle, SW_HIDE);
-
                //FormCreate\82Å\82â\82é\82Æ\89Â\8e\8b\90Ý\92è\82ª\94½\89f\82³\82ê\82È\82¢\8fê\8d\87\82ª\82 \82é\82Ì\82ÅFormShow\82Å\82â\82é\82±\82Æ\82É\82µ\82½
                //\83c\81[\83\8b\83o\81[\95\\8e¦
                GikoDM.StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
@@ -1498,6 +1498,9 @@ begin
 //             ResetBandInfo( ListCoolBar, ListToolBar );
                FIsIgnoreResize := rtNone;
 
+        //ActionList\82ÌGroupIndex\82ð\8c³\82É\96ß\82·
+               SetGroupIndex(GikoDM.GikoFormActionList);
+
                //FormCrete\82©\82ç\88Ú\93®\81B
                if GikoSys.Setting.TabAutoLoadSave then begin
             GikoDM.TabsOpenAction.Tag := 1;
@@ -1505,26 +1508,20 @@ begin
             GikoDM.TabsOpenAction.Tag := 0;
             if (GikoSys.Setting.LastCloseTabURL <> '') then begin
                 if ( FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
-                       PostMessage( Handle, USER_DOCUMENTCOMPLETE, Integer( FActiveContent.Browser ), 0 );
-                   end;
-                if ( FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
                        while (FActiveContent.Browser.ReadyState <> READYSTATE_COMPLETE) and
                                (FActiveContent.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
-                               Application.ProcessMessages;
+                        // \83\81\83b\83Z\81[\83W\82ð\8eó\82¯\8eæ\82ç\82È\82¢\82æ\82¤\82É\83X\83\8a\81[\83v\82É\95Ï\8dX
+                        Sleep(1);
                     end;
                        end;
                 item := BBSsFindThreadFromURL( GikoSys.Setting.LastCloseTabURL );
+                GikoSys.Setting.LastCloseTabURL := '';
                 if (item <> nil) and (item.IsLogFile) then begin
                     OpenThreadItem(item, item.URL);
                 end;
-                GikoSys.Setting.LastCloseTabURL := '';
+                //ShowWindow(Self.Handle, SW_SHOW);
             end;
                end;
-
-        //ActionList\82ÌGroupIndex\82ð\8c³\82É\96ß\82·
-               SetGroupIndex(GikoDM.GikoFormActionList);
-
-               FStartUp := false;
        end;
 end;