diff --git a/components/codetools/codecompletiontool.pas b/components/codetools/codecompletiontool.pas index 6cbdb5ae7c..d4d329fb19 100644 --- a/components/codetools/codecompletiontool.pas +++ b/components/codetools/codecompletiontool.pas @@ -35,7 +35,7 @@ - insert header comment for classes ToDo: - -add code for index properties (TList, array of, Pointer array) + -add code for index properties (TList, TFPList, array of, Pointer array) TList: property Items[Index: integer]: AType accesstlist; -> creates diff --git a/components/codetools/codetoolmanager.pas b/components/codetools/codetoolmanager.pas index f4f6dc7f5b..298441f00f 100644 --- a/components/codetools/codetoolmanager.pas +++ b/components/codetools/codetoolmanager.pas @@ -172,7 +172,7 @@ type function GetMainCode(Code: TCodeBuffer): TCodeBuffer; function GetIncludeCodeChain(Code: TCodeBuffer; RemoveFirstCodesWithoutTool: boolean; - var ListOfCodeBuffer: TList): boolean; + var ListOfCodeBuffer: TFPList): boolean; function FindCodeToolForSource(Code: TCodeBuffer): TCustomCodeTool; property OnSearchUsedUnit: TOnSearchUsedUnit read FOnSearchUsedUnit write FOnSearchUsedUnit; @@ -244,11 +244,11 @@ type var FPCVersion, FPCRelease, FPCPatch: integer); // data function - procedure FreeListOfPCodeXYPosition(var List: TList); + procedure FreeListOfPCodeXYPosition(var List: TFPList); procedure FreeTreeOfPCodeXYPosition(var Tree: TAVLTree); function CreateTreeOfPCodeXYPosition: TAVLTree; - procedure AddListToTreeOfPCodeXYPosition(SrcList: TList; DestTree: TAVLTree; - ClearList, CreateCopies: boolean); + procedure AddListToTreeOfPCodeXYPosition(SrcList: TFPList; + DestTree: TAVLTree; ClearList, CreateCopies: boolean); // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -297,7 +297,7 @@ type const Identifier: string; var NewCode: TCodeBuffer; var NewX, NewY, NewTopLine: integer): boolean; function FindDeclarationsAndAncestors(Code: TCodeBuffer; X,Y: integer; - var ListOfPCodeXYPosition: TList): boolean; + var ListOfPCodeXYPosition: TFPList): boolean; function FindMainDeclaration(Code: TCodeBuffer; X,Y: integer; var NewCode: TCodeBuffer; var NewX, NewY, NewTopLine: integer): boolean; @@ -311,7 +311,7 @@ type // rename identifier function FindReferences(IdentifierCode: TCodeBuffer; X, Y: integer; TargetCode: TCodeBuffer; SkipComments: boolean; - var ListOfPCodeXYPosition: TList): boolean; + var ListOfPCodeXYPosition: TFPList): boolean; function RenameIdentifier(TreeOfPCodeXYPosition: TAVLTree; const OldIdentifier, NewIdentifier: string): boolean; @@ -745,7 +745,7 @@ begin end; function TCodeToolManager.GetIncludeCodeChain(Code: TCodeBuffer; - RemoveFirstCodesWithoutTool: boolean; var ListOfCodeBuffer: TList): boolean; + RemoveFirstCodesWithoutTool: boolean; var ListOfCodeBuffer: TFPList): boolean; var OldCode: TCodeBuffer; begin @@ -755,7 +755,7 @@ begin if Code=nil then exit; Result:=true; - ListOfCodeBuffer:=TList.Create; + ListOfCodeBuffer:=TFPList.Create; ListOfCodeBuffer.Add(Code); // if this is an include file, find the top level source @@ -1023,7 +1023,7 @@ begin end; end; -procedure TCodeToolManager.FreeListOfPCodeXYPosition(var List: TList); +procedure TCodeToolManager.FreeListOfPCodeXYPosition(var List: TFPList); var i: Integer; CursorPos: PCodeXYPosition; @@ -1060,7 +1060,7 @@ begin Result:=TAVLTree.Create(TListSortCompare(@CompareCodeXYPositions)); end; -procedure TCodeToolManager.AddListToTreeOfPCodeXYPosition(SrcList: TList; +procedure TCodeToolManager.AddListToTreeOfPCodeXYPosition(SrcList: TFPList; DestTree: TAVLTree; ClearList, CreateCopies: boolean); var i: Integer; @@ -1368,7 +1368,7 @@ begin end; function TCodeToolManager.FindDeclarationsAndAncestors(Code: TCodeBuffer; X, - Y: integer; var ListOfPCodeXYPosition: TList): boolean; + Y: integer; var ListOfPCodeXYPosition: TFPList): boolean; var CursorPos: TCodeXYPosition; begin @@ -1486,7 +1486,7 @@ end; function TCodeToolManager.FindReferences(IdentifierCode: TCodeBuffer; X, Y: integer; TargetCode: TCodeBuffer; SkipComments: boolean; - var ListOfPCodeXYPosition: TList): boolean; + var ListOfPCodeXYPosition: TFPList): boolean; var CursorPos: TCodeXYPosition; NewCode: TCodeBuffer; diff --git a/components/codetools/finddeclarationtool.pas b/components/codetools/finddeclarationtool.pas index e472f56e8d..56c58c2b90 100644 --- a/components/codetools/finddeclarationtool.pas +++ b/components/codetools/finddeclarationtool.pas @@ -663,9 +663,9 @@ type function FindBaseTypeOfNode(Params: TFindDeclarationParams; Node: TCodeTreeNode): TFindContext; function FindDeclarationsAndAncestors(const CursorPos: TCodeXYPosition; - var ListOfPCodeXYPosition: TList): boolean; + var ListOfPCodeXYPosition: TFPList): boolean; function FindReferences(const CursorPos: TCodeXYPosition; - SkipComments: boolean; var ListOfPCodeXYPosition: TList): boolean; + SkipComments: boolean; var ListOfPCodeXYPosition: TFPList): boolean; function CleanPosIsDeclarationIdentifier(CleanPos: integer; Node: TCodeTreeNode): boolean; @@ -2897,13 +2897,14 @@ begin end; function TFindDeclarationTool.FindDeclarationsAndAncestors( - const CursorPos: TCodeXYPosition; var ListOfPCodeXYPosition: TList): boolean; + const CursorPos: TCodeXYPosition; var ListOfPCodeXYPosition: TFPList + ): boolean; procedure AddCodePosition(const NewCodePos: TCodeXYPosition); var AddCodePos: PCodeXYPosition; begin - if ListOfPCodeXYPosition=nil then ListOfPCodeXYPosition:=TList.Create; + if ListOfPCodeXYPosition=nil then ListOfPCodeXYPosition:=TFPList.Create; New(AddCodePos); AddCodePos^:=NewCodePos; ListOfPCodeXYPosition.Add(AddCodePos); @@ -2972,13 +2973,13 @@ end; {------------------------------------------------------------------------------- function TFindDeclarationTool.FindReferences(const CursorPos: TCodeXYPosition; - SkipComments: boolean; var ListOfPCodeXYPosition: TList): boolean; + SkipComments: boolean; var ListOfPCodeXYPosition: TFPList): boolean; Search for all identifiers in current unit, referring to the declaration at CursorPos. -------------------------------------------------------------------------------} function TFindDeclarationTool.FindReferences(const CursorPos: TCodeXYPosition; - SkipComments: boolean; var ListOfPCodeXYPosition: TList): boolean; + SkipComments: boolean; var ListOfPCodeXYPosition: TFPList): boolean; var Identifier: string; DeclarationTool: TFindDeclarationTool; @@ -3010,7 +3011,7 @@ var var AddCodePos: PCodeXYPosition; begin - if ListOfPCodeXYPosition=nil then ListOfPCodeXYPosition:=TList.Create; + if ListOfPCodeXYPosition=nil then ListOfPCodeXYPosition:=TFPList.Create; New(AddCodePos); AddCodePos^:=NewCodePos; ListOfPCodeXYPosition.Add(AddCodePos); diff --git a/components/codetools/linkscanner.pas b/components/codetools/linkscanner.pas index 1a0104359a..b9e9dc5d50 100644 --- a/components/codetools/linkscanner.pas +++ b/components/codetools/linkscanner.pas @@ -324,7 +324,7 @@ type function WholeRangeIsWritable(CleanStartPos, CleanEndPos: integer; ErrorOnFail: boolean): boolean; procedure FindCodeInRange(CleanStartPos, CleanEndPos: integer; - UniqueSortedCodeList: TList); + UniqueSortedCodeList: TFPList); procedure DeleteRange(CleanStartPos,CleanEndPos: integer); // scanning @@ -462,7 +462,7 @@ var PSourceChangeStepMemManager: TPSourceChangeStepMemManager; -procedure AddCodeToUniqueList(ACode: Pointer; UniqueSortedCodeList: TList); +procedure AddCodeToUniqueList(ACode: Pointer; UniqueSortedCodeList: TFPList); function IndexOfCodeInUniqueList(ACode: Pointer; UniqueSortedCodeList: TList): integer; function IndexOfCodeInUniqueList(ACode: Pointer; @@ -516,7 +516,7 @@ begin Result:=-1; end; -procedure AddCodeToUniqueList(ACode: Pointer; UniqueSortedCodeList: TList); +procedure AddCodeToUniqueList(ACode: Pointer; UniqueSortedCodeList: TFPList); var l,m,r: integer; begin l:=0; @@ -1742,7 +1742,7 @@ function TLinkScanner.GuessMisplacedIfdefEndif(StartCursorPos: integer; Result:=false; end; - procedure FreeIfStack(var IfStack: TList); + procedure FreeIfStack(var IfStack: TFPList); var i: integer; AnIf: PIf; @@ -1810,7 +1810,7 @@ function TLinkScanner.GuessMisplacedIfdefEndif(StartCursorPos: integer; end; end; - procedure PushIfOnStack(const ASrc: string; AToken: TToken; IfStack: TList); + procedure PushIfOnStack(const ASrc: string; AToken: TToken; IfStack: TFPList); var NewIf: PIf; begin @@ -1825,7 +1825,7 @@ function TLinkScanner.GuessMisplacedIfdefEndif(StartCursorPos: integer; IfStack.Add(NewIf); end; - procedure PopIfFromStack(IfStack: TList); + procedure PopIfFromStack(IfStack: TFPList); var Topif: PIf; begin TopIf:=PIf(IfStack[IfStack.Count-1]); @@ -1840,13 +1840,13 @@ function TLinkScanner.GuessMisplacedIfdefEndif(StartCursorPos: integer; ASrc: string; ASrcLen: integer; CurToken: TToken; - IfStack: TList; + IfStack: TFPList; DirectiveType: TDirectiveType; begin Result:=false; if not InitGuessMisplaced(CurToken,ACode,ASrc,ASrcLen) then exit; - IfStack:=TList.Create; + IfStack:=TFPList.Create; try repeat if (not FindNextToken(ASrc,CurToken)) then begin @@ -1909,7 +1909,7 @@ function TLinkScanner.GuessMisplacedIfdefEndif(StartCursorPos: integer; var LinkID, i, BestSrcPos: integer; LastCode: Pointer; - SearchedCodes: TList; + SearchedCodes: TFPList; begin Result:=false; @@ -1927,7 +1927,7 @@ begin if LinkID<0 then exit; // go through all following sources and guess misplaced ifdef/endif - SearchedCodes:=TList.Create; + SearchedCodes:=TFPList.Create; try while LinkIdnil do begin + List[i]:=HashItem^.Item; + inc(i); + HashItem:=HashItem^.Next; + end; +end; + +procedure TDynHashArray.AssignTo(List: TFPList); +var + i: integer; HashItem: PDynHashArrayItem; begin List.Count:=Count; diff --git a/lcl/interfaces/gtk/gtkcallback.inc b/lcl/interfaces/gtk/gtkcallback.inc index 8258902891..6d119639f6 100644 --- a/lcl/interfaces/gtk/gtkcallback.inc +++ b/lcl/interfaces/gtk/gtkcallback.inc @@ -2615,7 +2615,7 @@ end; function GTKKeySnooper(Widget: PGtkWidget; Event: PGdkEventKey; FuncData: gPointer): gInt; cdecl; var - KeyStateList: TList; + KeyStateList: TFPList; procedure UpdateToggleList(const AVKeyCode: Integer); begin @@ -2682,7 +2682,7 @@ begin Exit; end; - KeyStateList := TList(FuncData); + KeyStateList := TFPList(FuncData); if KeyStateList = nil then Exit; UpdateList(Vkey.VKey, Pressed); @@ -2986,6 +2986,9 @@ end; { ============================================================================= $Log$ + Revision 1.282 2005/07/23 09:27:30 mattias + replaced codetools+gtk intf TList with faster TFPList + Revision 1.281 2005/07/07 20:56:29 mattias clean up diff --git a/lcl/interfaces/gtk/gtkglobals.pp b/lcl/interfaces/gtk/gtkglobals.pp index 17e3d56f6d..9aaa0c2ea9 100644 --- a/lcl/interfaces/gtk/gtkglobals.pp +++ b/lcl/interfaces/gtk/gtkglobals.pp @@ -299,7 +299,7 @@ type var // FTimerData contains the currently running timers - FTimerData : TList; // list of PGtkITimerinfo + FTimerData : TFPList; // list of PGtkITimerinfo var gtk_handler_quark: TGQuark; @@ -343,7 +343,7 @@ var // each selection has an gtk identifier (an atom) ClipboardTypeAtoms: array[TClipboardType] of cardinal; // each active request will procduce an TClipboardEventData stored in this list - ClipboardSelectionData: TList; // list of PClipboardEventData + ClipboardSelectionData: TFPList; // list of PClipboardEventData // each selection can have an user defined handler (normally set by the lcl) ClipboardHandler: array[TClipboardType] of TClipboardRequestEvent; // boolean array, telling what gtk format is automatically supported by @@ -411,7 +411,7 @@ type // modal windows var - ModalWindows: TList; // list of PGtkWindow + ModalWindows: TFPList; // list of PGtkWindow // gtk object data names diff --git a/lcl/interfaces/gtk/gtkint.pp b/lcl/interfaces/gtk/gtkint.pp index d80d472a50..316ace0767 100644 --- a/lcl/interfaces/gtk/gtkint.pp +++ b/lcl/interfaces/gtk/gtkint.pp @@ -88,7 +88,7 @@ uses type TGTKWidgetSet = class(TWidgetSet) protected - FKeyStateList_: TList; // Keeps track of which keys are pressed + FKeyStateList_: TFPList; // Keeps track of which keys are pressed FDeviceContexts: TDynHashArray;// hasharray of HDC FGDIObjects: TDynHashArray; // hasharray of PGdiObject FMessageQueue: TGtkMessageQueue; // queue of PMsg @@ -362,7 +362,7 @@ begin LastRight:=EmptyLastMouseClick; // clipboard - ClipboardSelectionData:=TList.Create; + ClipboardSelectionData:=TFPList.Create; for c:=Low(TClipboardType) to High(TClipboardType) do begin ClipboardTypeAtoms[c]:=0; ClipboardHandler[c]:=nil; @@ -441,6 +441,9 @@ end. { ============================================================================= $Log$ + Revision 1.225 2005/07/23 09:27:30 mattias + replaced codetools+gtk intf TList with faster TFPList + Revision 1.224 2005/04/25 07:55:33 mattias backtraces for gtk gdi objects -dTraceGdiCalls from Jesus diff --git a/lcl/interfaces/gtk/gtkobject.inc b/lcl/interfaces/gtk/gtkobject.inc index 3890856723..49ff8ef232 100644 --- a/lcl/interfaces/gtk/gtkobject.inc +++ b/lcl/interfaces/gtk/gtkobject.inc @@ -162,9 +162,9 @@ begin FWidgetsResized.Options:=FWidgetsResized.Options+[dhaoCacheContains]; FFixWidgetsResized := TDynHashArray.Create(-1); - FTimerData := TList.Create; + FTimerData := TFPList.Create; {$IFDEF Use_KeyStateList} - FKeyStateList_ := TList.Create; + FKeyStateList_ := TFPList.Create; {$ENDIF} DestroyConnectedWidgetCB:=@DestroyConnectedWidget; @@ -550,7 +550,7 @@ type end; var - AllWindows: TList; + AllWindows: TFPList; List: PGList; Window: PGTKWindow; ATransientWindow: PTransientWindow; @@ -606,7 +606,7 @@ begin ATransientWindow^.SortIndex:= Screen.CustomFormIndex(TCustomForm(LCLObject)); end; - if AllWindows=nil then AllWindows:=TList.Create; + if AllWindows=nil then AllWindows:=TFPList.Create; AllWindows.Add(ATransientWindow); end; end; @@ -791,7 +791,7 @@ procedure TGtkWidgetSet.SendCachedLCLMessages; Widget, ParentFixed, ParentWidget: PGtkWidget; LCLControl: TControl; IsTopLevelWidget: boolean; - TopologicalList: TList; // list of PGtkWidget; + TopologicalList: TFPList; // list of PGtkWidget; i, LCLWidth, LCLHeight: integer; WinWidgetInfo: PWinWidgetInfo; @@ -1073,7 +1073,7 @@ procedure TGtkWidgetSet.SendCachedGtkMessages; var FixWidget, MainWidget: PGtkWidget; LCLControl: TWinControl; - List: TList; + List: TFPList; i: integer; procedure RaiseInvalidLCLControl; @@ -1085,7 +1085,7 @@ procedure TGtkWidgetSet.SendCachedGtkMessages; begin if (FFixWidgetsResized.Count=0) and (FWidgetsResized.Count=0) then exit; - List:=TList.Create; + List:=TFPList.Create; { if any fixed widget was resized then a client area of a LCL control was resized @@ -1263,7 +1263,7 @@ type ClientWidget: PGtkWidget; MainWindow: PGdkWindow; ClientWindow: PGdkWindow; - WindowList: TList; + WindowList: TFPList; end; var @@ -1289,7 +1289,7 @@ var then exit; if Context.WindowList=nil then - Context.WindowList:=TList.Create; + Context.WindowList:=TFPList.Create; Context.WindowList.Add(PaintWindow); {$IFDEF DebugGDK}BeginGDKErrorTrap;{$ENDIF} @@ -4046,7 +4046,7 @@ end; procedure CreateOpenDialogHistory(OpenDialog: TOpenDialog; SelWidget: PGtkWidget); var - HistoryList: TList; // list of THistoryListEntry + HistoryList: TFPList; // list of THistoryListEntry AHistoryEntry: PFileSelHistoryEntry; i: integer; s: string; @@ -4056,7 +4056,7 @@ begin if OpenDialog.HistoryList.Count>0 then begin // create the HistoryList where the current state of the history is stored - HistoryList:=TList.Create; + HistoryList:=TFPList.Create; for i:=0 to OpenDialog.HistoryList.Count-1 do begin s:=OpenDialog.HistoryList[i]; if s<>'' then begin @@ -4124,7 +4124,7 @@ end; Converts a Delphi file filter of the form 'description1|mask1|description2|mask2|...' - into a TList of PFileSelFilterEntry(s). + into a TFPList of PFileSelFilterEntry(s). Multi masks: - multi masks like '*.pas;*.pp' are converted into multiple entries. - if the masks are found in the description they are adjusted @@ -4136,7 +4136,7 @@ end; 'Pascal files (*.pp)' + '*.pp' 'Pascal files (*.lpr)' + '*.lpr' ------------------------------------------------------------------------------} -procedure ExtractFilterList(const Filter: string; var FilterList: TList; +procedure ExtractFilterList(const Filter: string; out FilterList: TFPList; SplitMultiMask: boolean); var Masks: TStringList; @@ -4227,7 +4227,7 @@ var CurDescStart, CurDescEnd, CurMultiMaskStart, CurMultiMaskEnd: integer; CurDesc, CurMultiMask: string; begin - FilterList:=TList.Create; + FilterList:=TFPList.Create; Masks:=nil; CurFilterIndex:=0; CurDescStart:=1; @@ -4264,7 +4264,7 @@ end; function TGtkWidgetSet.CreateOpenDialogFilter(OpenDialog: TOpenDialog; SelWidget: PGtkWidget): string; var - FilterList: TList; + FilterList: TFPList; HBox, LabelWidget, FilterPullDownWidget, MenuWidget, MenuItemWidget: PGtkWidget; i, j, CurMask: integer; @@ -6836,7 +6836,7 @@ var end; var - LinesList: TList; + LinesList: TFPList; LineStart, LineEnd, LineLen: integer; ArraySize, TotalSize: integer; i: integer; @@ -6845,7 +6845,7 @@ var begin if IsEmptyText then exit; InitFont; - LinesList:=TList.Create; + LinesList:=TFPList.Create; LineStart:=0; // find all line starts and line ends @@ -7006,6 +7006,9 @@ end; { ============================================================================= $Log$ + Revision 1.648 2005/07/23 09:27:30 mattias + replaced codetools+gtk intf TList with faster TFPList + Revision 1.647 2005/06/23 21:24:40 marc + added gdk_display function for gtk2 - replaced X11Display with gdk_display diff --git a/lcl/interfaces/gtk/gtkproc.inc b/lcl/interfaces/gtk/gtkproc.inc index 6f87302ece..03d13ab83d 100644 --- a/lcl/interfaces/gtk/gtkproc.inc +++ b/lcl/interfaces/gtk/gtkproc.inc @@ -105,16 +105,16 @@ procedure RememberKeyEventWasHandledByLCL(Event: PGdkEventKey; BeforeEvent: boolean); var HandledEvent: TLCLHandledKeyEvent; - EventList: TList; + EventList: TFPList; begin if KeyEventWasHandledByLCL(Event,BeforeEvent) then exit; if BeforeEvent then begin if LCLHandledKeyEvents=nil then - LCLHandledKeyEvents:=TList.Create; + LCLHandledKeyEvents:=TFPList.Create; EventList:=LCLHandledKeyEvents; end else begin if LCLHandledKeyAfterEvents=nil then - LCLHandledKeyAfterEvents:=TList.Create; + LCLHandledKeyAfterEvents:=TFPList.Create; EventList:=LCLHandledKeyAfterEvents; end; HandledEvent:=TLCLHandledKeyEvent.Create(Event); @@ -131,7 +131,7 @@ function KeyEventWasHandledByLCL(Event: PGdkEventKey; BeforeEvent: boolean var i: Integer; HandledEvent: TLCLHandledKeyEvent; - EventList: TList; + EventList: TFPList; begin Result:=false; if BeforeEvent then @@ -3209,8 +3209,8 @@ end; procedure DestroyCommonDialogAddOns(ADialog: TCommonDialog); var DlgWindow: PGtkWidget; - HistoryList: TList; // list of TFileSelHistoryListEntry - FilterList: TList; // list of TFileSelFilterListEntry + HistoryList: TFPList; // list of TFileSelHistoryListEntry + FilterList: TFPList; // list of TFileSelFilterListEntry AHistoryEntry: PFileSelHistoryEntry; AFilterEntry: PFileSelFilterEntry; i: integer; @@ -3237,8 +3237,8 @@ begin if LCLHistoryMenu<>nil then FreeWidgetInfo(LCLHistoryMenu); // free history - HistoryList:=TList(gtk_object_get_data(PGtkObject(DlgWindow), - 'LCLHistoryList')); + HistoryList:=TFPList(gtk_object_get_data(PGtkObject(DlgWindow), + 'LCLHistoryList')); if HistoryList<>nil then begin for i:=0 to HistoryList.Count-1 do begin AHistoryEntry:=PFileSelHistoryEntry(HistoryList[i]); @@ -3251,8 +3251,8 @@ begin end; // free filter - FilterList:=TList(gtk_object_get_data(PGtkObject(DlgWindow), - 'LCLFilterList')); + FilterList:=TFPList(gtk_object_get_data(PGtkObject(DlgWindow), + 'LCLFilterList')); if FilterList<>nil then begin for i:=0 to FilterList.Count-1 do begin AFilterEntry:=PFileSelFilterEntry(FilterList[i]); @@ -5984,9 +5984,9 @@ end; CreateTopologicalSortedWidgets Params: HashArray: TDynHashArray of PGtkWidget - Creates a topologically sorted TList of PGtkWidget. + Creates a topologically sorted TFPList of PGtkWidget. -------------------------------------------------------------------------------} -function CreateTopologicalSortedWidgets(HashArray: TDynHashArray): TList; +function CreateTopologicalSortedWidgets(HashArray: TDynHashArray): TFPList; type PTopologicalEntry = ^TTopologicalEntry; TTopologicalEntry = record @@ -6013,7 +6013,7 @@ var LevelCounts: PInteger; begin //DebugLn(' KKK0'); - Result:=TList.Create; + Result:=TFPList.Create; if HashArray.Count=0 then exit; // put all widgets into an array and calculate their parent levels @@ -8251,6 +8251,9 @@ end; { ============================================================================= $Log$ + Revision 1.370 2005/07/23 09:27:30 mattias + replaced codetools+gtk intf TList with faster TFPList + Revision 1.369 2005/07/22 11:37:26 mattias fixed gtk not container warnings and let a few gtk handled key messages pass diff --git a/lcl/interfaces/gtk/gtkproc.pp b/lcl/interfaces/gtk/gtkproc.pp index 376ca843d3..5ef51bfbf6 100644 --- a/lcl/interfaces/gtk/gtkproc.pp +++ b/lcl/interfaces/gtk/gtkproc.pp @@ -684,7 +684,7 @@ procedure UpdateStatusBarPanel(StatusBar: TObject; Index: integer; // sizing procedure SaveSizeNotification(Widget: PGtkWidget); procedure SaveClientSizeNotification(FixWidget: PGtkWidget); -function CreateTopologicalSortedWidgets(HashArray: TDynHashArray): TList; +function CreateTopologicalSortedWidgets(HashArray: TDynHashArray): TFPList; procedure GetGTKDefaultWidgetSize(AWinControl: TWinControl; var PreferredWidth, PreferredHeight: integer); @@ -932,8 +932,8 @@ var // LCLHandledKeyEvents stores the last handled key event (handled by the LCL) // Reason: The gtk sends the same key event to several widgets. The gtk intf // only wants to send them once to the LCL. - LCLHandledKeyEvents: TList; // list of TLCLHandledKeyEvent - LCLHandledKeyAfterEvents: TList; // list of TLCLHandledKeyEvent + LCLHandledKeyEvents: TFPList; // list of TLCLHandledKeyEvent + LCLHandledKeyAfterEvents: TFPList; // list of TLCLHandledKeyEvent var GdkTrapIsSet: Boolean; diff --git a/lcl/interfaces/gtk/gtkwscontrols.pp b/lcl/interfaces/gtk/gtkwscontrols.pp index 2a298dd7de..183ffdb475 100644 --- a/lcl/interfaces/gtk/gtkwscontrols.pp +++ b/lcl/interfaces/gtk/gtkwscontrols.pp @@ -624,7 +624,7 @@ begin if (GtkWindow=nil) then exit; TGtkWidgetSet(InterfaceObject).UnsetResizeRequest(PgtkWidget(GtkWindow)); - if ModalWindows=nil then ModalWindows:=TList.Create; + if ModalWindows=nil then ModalWindows:=TFPList.Create; ModalWindows.Add(GtkWindow); gtk_window_set_modal(GtkWindow, true);