gtk intf: fixed RealizeAccelerate

git-svn-id: trunk@14300 -
This commit is contained in:
mattias 2008-02-28 13:05:18 +00:00
parent a6dd95e3b2
commit e4cad5b120

View File

@ -5394,17 +5394,17 @@ begin
AccelKey:=GetAccelKey(Widget); AccelKey:=GetAccelKey(Widget);
if (AccelKey=nil) or (AccelKey^.Realized) then exit; if (AccelKey=nil) or (AccelKey^.Realized) then exit;
if AccelKey^.Key<0 then begin if AccelKey^.Key>0 then begin
AccelGroup:=GetAccelGroupForComponent(Component,true); AccelGroup:=GetAccelGroupForComponent(Component,true);
if AccelGroup<>nil then begin if AccelGroup<>nil then begin
{ $IFDEF VerboseAccelerator} {$IFDEF VerboseAccelerator}
DebugLn('RealizeAccelerator Add Accelerator ', DebugLn('RealizeAccelerator Add Accelerator ',
Component.Name,':',Component.ClassName, Component.Name,':',Component.ClassName,
' Widget=',DbgS(Widget), ' Widget=',DbgS(Widget),
' Signal=',AccelKey^.Signal, ' Signal=',AccelKey^.Signal,
' Key=',dbgs(AccelKey^.Key),' Mods=',dbgs(AccelKey^.Mods), ' Key=',dbgs(AccelKey^.Key),' Mods=',dbgs(AccelKey^.Mods),
''); '');
{ $ENDIF} {$ENDIF}
gtk_widget_add_accelerator(Widget, PChar(AccelKey^.Signal), gtk_widget_add_accelerator(Widget, PChar(AccelKey^.Signal),
AccelGroup, AccelKey^.Key, AccelKey^.Mods, GTK_ACCEL_VISIBLE); AccelGroup, AccelKey^.Key, AccelKey^.Mods, GTK_ACCEL_VISIBLE);
AccelKey^.Realized:=true; AccelKey^.Realized:=true;