mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-31 07:21:39 +02:00
gtk intf: fixed RealizeAccelerate
git-svn-id: trunk@14300 -
This commit is contained in:
parent
a6dd95e3b2
commit
e4cad5b120
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user