From e8d7c82083c528314acbbeaf3b08fa66ddd0a09c Mon Sep 17 00:00:00 2001 From: micha Date: Thu, 18 Dec 2003 10:17:00 +0000 Subject: [PATCH] remove non-useful variable wndlist (thx vincent) git-svn-id: trunk@4900 - --- lcl/interfaces/win32/win32int.pp | 9 +++------ lcl/interfaces/win32/win32object.inc | 9 +++------ lcl/interfaces/win32/win32winapi.inc | 23 +++++------------------ 3 files changed, 11 insertions(+), 30 deletions(-) diff --git a/lcl/interfaces/win32/win32int.pp b/lcl/interfaces/win32/win32int.pp index 4a27aaf655..435cfbc5ae 100644 --- a/lcl/interfaces/win32/win32int.pp +++ b/lcl/interfaces/win32/win32int.pp @@ -165,9 +165,6 @@ Const ClsName : array[0..20] of char = 'LazarusForm'#0; ToolBtnClsName : array[0..20] of char = 'ToolbarButton'#0; -Var - WndList: TList; - {$I win32proc.inc} {$I win32listsl.inc} {$I win32callback.inc} @@ -178,19 +175,19 @@ Var Initialization Assert(False, 'Trace:win32int.pp - Initialization'); -WndList := TList.Create; Finalization Assert(False, 'Trace:win32int.pp - Finalization'); -WndList.Free; -WndList := Nil; End. { ============================================================================= $Log$ + Revision 1.62 2003/12/18 10:17:00 micha + remove non-useful variable wndlist (thx vincent) + Revision 1.61 2003/12/18 08:51:01 micha fix accelerators: now registered per window diff --git a/lcl/interfaces/win32/win32object.inc b/lcl/interfaces/win32/win32object.inc index 48482b0318..af59f7bf96 100644 --- a/lcl/interfaces/win32/win32object.inc +++ b/lcl/interfaces/win32/win32object.inc @@ -1345,12 +1345,6 @@ Begin SendMessage(Window, Msg, Limit, 0); SetProp(Window, 'LIMIT_TEXT', @Limit); - - If WndList.IndexOf(Pointer(Window)) = -1 Then - Begin - WndList.Capacity := WndList.Count; - WndList.Add(Pointer(Window)); - End; End; {------------------------------------------------------------------------------ @@ -2893,6 +2887,9 @@ End; { $Log$ + Revision 1.144 2003/12/18 10:17:00 micha + remove non-useful variable wndlist (thx vincent) + Revision 1.143 2003/12/18 08:51:01 micha fix accelerators: now registered per window diff --git a/lcl/interfaces/win32/win32winapi.inc b/lcl/interfaces/win32/win32winapi.inc index 7dedab11e4..ac1112452f 100644 --- a/lcl/interfaces/win32/win32winapi.inc +++ b/lcl/interfaces/win32/win32winapi.inc @@ -2531,26 +2531,10 @@ End; for a properties-enumeration function that's called when the program is quit. ------------------------------------------------------------------------------} Function TWin32Object.SetProp(Handle: HWND; Str: PChar; Data: Pointer): Boolean; -Var - C: Cardinal; - WndListed: Boolean; Begin Assert(False, 'Trace:TWin32Object.SetProp - Start'); - WndListed := False; - - If WndList.Count > 0 Then - For C := 0 To WndList.Count - 1 Do - If HWND(WndList[C]) = Handle Then - WndListed := True; - - If Not WndListed Then - Begin - WndList.Capacity := WndList.Count; - WndList.Add(Pointer(Handle)); - End; - - Result := Windows.SetProp(Handle, Str, Integer(Data)); - Assert(False, Format('Trace:TWin32Object.SetProp --> Window handle: 0x%X, Propery to set: %S, Data to set: 0x%P, Window was previously in list: %S, Property was successfully set: %S', [Handle, String(Str), Data, BOOL_RESULT[WndListed], BOOL_RESULT[Result]])); + Result := Windows.SetProp(Handle, Str, LongInt(Data)); + Assert(False, Format('Trace:TWin32Object.SetProp --> Window handle: 0x%X, Propery to set: %S, Data to set: 0x%P, Property was successfully set: %S', [Handle, String(Str), Data, BOOL_RESULT[Result]])); End; {------------------------------------------------------------------------------ @@ -2842,6 +2826,9 @@ end; { ============================================================================= $Log$ + Revision 1.83 2003/12/18 10:17:00 micha + remove non-useful variable wndlist (thx vincent) + Revision 1.82 2003/12/16 08:33:31 micha UINT(-1) fix causing "Out of bounds." exception