repair VerboseFocus for gtk2

git-svn-id: trunk@13326 -
This commit is contained in:
paul 2007-12-14 04:17:15 +00:00
parent 8c6f42cbe0
commit 79fbbcfde2
3 changed files with 10 additions and 10 deletions

View File

@ -603,7 +603,7 @@ begin
FillChar(Mess,SizeOf(Mess),#0);
{$IFDEF VerboseFocus}
write('gtkfrmactivateAfter Widget=',DbgS(Widget),' Event^.theIn=',Event^.theIn);
write('gtkfrmactivateAfter Widget=',DbgS(Widget),' Event^.theIn=',Event^.{$ifdef gtk1}thein{$else}_in{$endif});
LCLObject:=TObject(data);
if LCLObject<>nil then begin
if LCLObject is TComponent then begin
@ -657,7 +657,7 @@ begin
{$ENDIF}
if (Widget=nil) or (Event=nil) then ;
{$IFDEF VerboseFocus}
write('gtkfrmdeactivate Widget=',DbgS(Widget),' ',Event^.theIn,
write('gtkfrmdeactivate Widget=',DbgS(Widget),' ',Event^.{$ifdef gtk1}thein{$else}_in{$endif},
' GetFocus=',DbgS(Widget));
LCLObject:=TControl(GetLCLObject(Widget));
if LCLObject<>nil then
@ -715,7 +715,7 @@ begin
if (Widget=nil) or (Event=nil) then ;
//DebugLn('GTKFocusCB ',DbgSName(TObject(Data)),' ',GetWidgetDebugReport(Widget));
{$IFDEF VerboseFocus}
write('GTKFocusCB Widget=',DbgS(Widget),' Event^.theIn=',Event^.theIn);
write('GTKFocusCB Widget=',DbgS(Widget),' Event^.theIn=',Event^.{$ifdef gtk1}thein{$else}_in{$endif});
LCLObject:=TObject(data);
if LCLObject<>nil then begin
if LCLObject is TComponent then begin
@ -762,7 +762,7 @@ begin
if (Widget=nil) or (Event=nil) then ;
//DebugLn('GTKFocusCBAfter ',DbgSName(TObject(Data)),' ',GetWidgetDebugReport(Widget));
{$IFDEF VerboseFocus}
write('GTKFocusCBAfter Widget=',DbgS(Widget),' Event^.theIn=',Event^.theIn);
write('GTKFocusCBAfter Widget=',DbgS(Widget),' Event^.theIn=',Event^.{$ifdef gtk1}thein{$else}_in{$endif});
LCLObject:=TObject(data);
if LCLObject<>nil then begin
if LCLObject is TComponent then begin
@ -815,7 +815,7 @@ begin
if (Widget=nil) or (Event=nil) then ;
//DebugLn('GTKKillFocusCB ',DbgSName(TObject(Data)),' ',GetWidgetDebugReport(Widget));
{$IFDEF VerboseFocus}
write('GTKillFocusCB Widget=',DbgS(Widget),' Event^.theIn=',Event^.theIn);
write('GTKillFocusCB Widget=',DbgS(Widget),' Event^.theIn=',Event^.{$ifdef gtk1}thein{$else}_in{$endif});
LCLObject:=TObject(data);
if LCLObject<>nil then begin
if LCLObject is TComponent then begin
@ -865,7 +865,7 @@ begin
{$ENDIF}
//DebugLn('GTKKillFocusCBAfter ',DbgSName(TObject(Data)),' ',GetWidgetDebugReport(Widget));
{$IFDEF VerboseFocus}
write('GTKillFocusCBAfter Widget=',DbgS(Widget),' Event^.theIn=',Event^.theIn);
write('GTKillFocusCBAfter Widget=',DbgS(Widget),' Event^.theIn=',Event^.{$ifdef gtk1}thein{$else}_in{$endif});
LCLObject:=TObject(data);
if LCLObject<>nil then begin
if LCLObject is TComponent then begin
@ -2637,7 +2637,7 @@ begin
end;
end;
function gtkswitchpage(widget: PGtkWidget; page: Pgtkwidget; pagenum: integer;
function GtkSwitchPage(widget: PGtkWidget; page: Pgtkwidget; pagenum: integer;
data: gPointer): GBoolean; cdecl;
var
Mess: TLMNotify;

View File

@ -8569,7 +8569,7 @@ begin
DbgOut(' OldFocus=',GetWidgetDebugReport(PGtkWidget(Result)));
DebugLn('');
if not GTK_WIDGET_VISIBLE(Widget) then
Raise Exception('TGtkWidgetSet.SetFocus: Widget is not visible');
raise Exception.Create('TGtkWidgetSet.SetFocus: Widget is not visible');
{$EndIf}
if Result=hWnd then exit;

View File

@ -561,7 +561,7 @@ function GTKAPIWidgetClient_FocusIn(AWidget: PGTKWidget;
Event: PGdkEventFocus): GTKEventResult; cdecl;
begin
{$IFDEF VerboseFocus}
DebugLn('GTKAPIWidgetClient_FocusIn ',DbgS(AWidget),' ',dbgs(event^.thein));
DebugLn('GTKAPIWidgetClient_FocusIn ',DbgS(AWidget),' ',dbgs(event^.{$ifdef gtk1}thein{$else}_in{$endif}));
{$ENDIF}
gtk_widget_set_flags(AWidget, GTK_HAS_FOCUS);
@ -579,7 +579,7 @@ function GTKAPIWidgetClient_FocusOut(AWidget: PGTKWidget;
Event: PGdkEventFocus): GTKEventResult; cdecl;
begin
{$IFDEF VerboseFocus}
DebugLn('GTKAPIWidgetClient_FocusOut ',DbgS(AWidget),' ',dbgs(event^.thein));
DebugLn('GTKAPIWidgetClient_FocusOut ',DbgS(AWidget),' ',dbgs(event^.{$ifdef gtk1}thein{$else}_in{$endif}));
{$ENDIF}
gtk_widget_unset_flags(AWidget, GTK_HAS_FOCUS);