From: Erik B. <eb...@us...> - 2006-07-10 21:20:41
|
Update of /cvsroot/gexperts/gexperts/unstable/Src In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv23874/Src Modified Files: GX_IdeShortCuts.pas Log Message: Reinitialize the shortcuts after startup to make sure slower-loading IDEs like BDS 2006 get updated Index: GX_IdeShortCuts.pas =================================================================== RCS file: /cvsroot/gexperts/gexperts/unstable/Src/GX_IdeShortCuts.pas,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- GX_IdeShortCuts.pas 21 Jan 2006 21:05:58 -0000 1.40 +++ GX_IdeShortCuts.pas 10 Jul 2006 21:20:37 -0000 1.41 @@ -76,6 +76,7 @@ private FShortCutExpert: TShortCutExpert; FUpdateTimer: TTimer; + FUpdateCount: Integer; procedure OnUpdateTimer(Sender: TObject); public procedure FileNotification(NotifyCode: TOTAFileNotification; @@ -583,7 +584,7 @@ FShortCutExpert := AClient; FUpdateTimer := TTimer.Create(nil); FUpdateTimer.Enabled := False; - FUpdateTimer.Interval := 4000; + FUpdateTimer.Interval := 5000; FUpdateTimer.OnTimer := OnUpdateTimer; end; @@ -607,14 +608,17 @@ // Restart the timer delay before updating the shortcuts. // This prevents us from updating constantly during startup, etc. FUpdateTimer.Enabled := False; + FUpdateCount := 0; FUpdateTimer.Enabled := True; end; end; procedure TPackageLoadingNotifier.OnUpdateTimer(Sender: TObject); begin - {$IFOPT D+} SendDebug('IDE shortcut update timer expired, calling ReadFromRegistryIDE'); {$ENDIF} - FUpdateTimer.Enabled := False; + Inc(FUpdateCount); + {$IFOPT D+} SendDebug('IDE shortcut update timer expired, calling ReadFromRegistryIDE. Update Count: ' + IntToStr(FUpdateCount)); {$ENDIF} + if FUpdateCount >= 3 then + FUpdateTimer.Enabled := False; if Application.Terminated then Exit; FShortCutExpert.ReadFromRegistryIDE; |