LCL: removed TApplication.FFormList, bug #17570

git-svn-id: trunk@27602 -
This commit is contained in:
mattias 2010-10-07 11:14:01 +00:00
parent e4623dcc4c
commit 081cb87fe6
3 changed files with 18 additions and 16 deletions

View File

@ -112,7 +112,10 @@
- a project can save the set of build macros and compiler options - a project can save the set of build macros and compiler options
- add changestamp, assign, equals to compiler options - add changestamp, assign, equals to compiler options
- store sets in lpi - store sets in lpi
- the default build mode should be stored in the old xml path, so that
old IDEs can open newer projects.
- store sets in lps - store sets in lps
- store active build mdoe in session
- make lazbuild lcl independent, independent of packages except one - make lazbuild lcl independent, independent of packages except one
- license gpl2 - license gpl2
- create package lazbuildsystem with some units - create package lazbuildsystem with some units

View File

@ -1200,7 +1200,6 @@ type
FShowMenuGlyphs: TApplicationShowGlyphs; FShowMenuGlyphs: TApplicationShowGlyphs;
FSmallIconHandle: HICON; FSmallIconHandle: HICON;
FIdleLockCount: Integer; FIdleLockCount: Integer;
FFormList: TList;
FLastKeyDownSender: TWinControl; FLastKeyDownSender: TWinControl;
FLastKeyDownKey: Word; FLastKeyDownKey: Word;
FLastKeyDownShift: TShiftState; FLastKeyDownShift: TShiftState;

View File

@ -94,7 +94,6 @@ begin
FHintHidePausePerChar := DefHintHidePausePerChar; FHintHidePausePerChar := DefHintHidePausePerChar;
FShowHint := true; FShowHint := true;
FShowMainForm := true; FShowMainForm := true;
FFormList := nil;
FRestoreStayOnTop := nil; FRestoreStayOnTop := nil;
FOnIdle := nil; FOnIdle := nil;
FIcon := TIcon.Create; FIcon := TIcon.Create;
@ -153,7 +152,6 @@ begin
ApplicationActionComponent:=nil; ApplicationActionComponent:=nil;
FreeThenNil(FIcon); FreeThenNil(FIcon);
FreeIconHandles; FreeIconHandles;
FreeThenNil(FFormList);
FreeThenNil(FRestoreStayOnTop); FreeThenNil(FRestoreStayOnTop);
for HandlerType:=Low(TApplicationHandlerType) to High(TApplicationHandlerType) do for HandlerType:=Low(TApplicationHandlerType) to High(TApplicationHandlerType) do
@ -965,7 +963,6 @@ procedure TApplication.DoIdleActions;
var var
i: Integer; i: Integer;
CurForm: TCustomForm; CurForm: TCustomForm;
AForm: TForm;
begin begin
i := 0; i := 0;
while i < Screen.CustomFormCount do begin { While loop to allow number of forms to change during loop } while i < Screen.CustomFormCount do begin { While loop to allow number of forms to change during loop }
@ -974,12 +971,13 @@ begin
CurForm.UpdateActions; CurForm.UpdateActions;
Inc(i); Inc(i);
end; end;
if FFormList<>nil then begin // hide splashscreen(s)
for i:=0 to FFormList.Count-1 do begin i := Screen.CustomFormCount-1;
AForm:=TForm(FFormList[i]); while i >=0 do begin { While loop to allow number of forms to change during loop }
if AForm.FormStyle=fsSplash then CurForm:=Screen.CustomForms[i];
AForm.Hide; if CurForm.FormStyle=fsSplash then
end; CurForm.Hide;
i:=Min(i,Screen.CustomFormCount)-1;
end; end;
end; end;
@ -1064,12 +1062,17 @@ end;
procedure TApplication.IconChanged(Sender: TObject); procedure TApplication.IconChanged(Sender: TObject);
var var
i: integer; i: integer;
CurForm: TCustomForm;
begin begin
FreeIconHandles; FreeIconHandles;
Widgetset.AppSetIcon(SmallIconHandle, BigIconHandle); Widgetset.AppSetIcon(SmallIconHandle, BigIconHandle);
if FFormList <> nil then
for i := 0 to FFormList.Count - 1 do i := Screen.CustomFormCount-1;
TForm(FFormList[i]).Perform(CM_ICONCHANGED, 0, 0); while i >=0 do begin { While loop to allow number of forms to change during loop }
CurForm:=Screen.CustomForms[i];
CurForm.Perform(CM_ICONCHANGED, 0, 0);
i:=Min(i,Screen.CustomFormCount)-1;
end;
end; end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
@ -2097,9 +2100,6 @@ begin
UpdateMainForm(AForm); UpdateMainForm(AForm);
if FMainForm = AForm then if FMainForm = AForm then
AForm.HandleNeeded; AForm.HandleNeeded;
if not Assigned(FFormList) then
FFormList := TList.Create;
FFormList.Add(AForm);
if AForm.FormStyle = fsSplash then if AForm.FormStyle = fsSplash then
begin begin
// show the splash form and handle the paint message // show the splash form and handle the paint message