mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 13:19:20 +02:00
clean up
git-svn-id: trunk@7328 -
This commit is contained in:
parent
5589eb6e2c
commit
f3e322eb6c
@ -1162,7 +1162,7 @@ begin
|
|||||||
{$IFDEF VerboseMouseBugfix}
|
{$IFDEF VerboseMouseBugfix}
|
||||||
DebugLn('');
|
DebugLn('');
|
||||||
DesignOnlySignal:=GetDesignOnlySignalFlag(Widget,dstMousePress);
|
DesignOnlySignal:=GetDesignOnlySignalFlag(Widget,dstMousePress);
|
||||||
WriteLn('[gtkMouseBtnPress] ',
|
DebugLn('[gtkMouseBtnPress] ',
|
||||||
DbgSName(TObject(Data)),
|
DbgSName(TObject(Data)),
|
||||||
' Widget=',DbgS(Widget),
|
' Widget=',DbgS(Widget),
|
||||||
' ControlWidget=',DbgS(TWinControl(Data).Handle),
|
' ControlWidget=',DbgS(TWinControl(Data).Handle),
|
||||||
@ -2986,6 +2986,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.281 2005/07/07 20:56:29 mattias
|
||||||
|
clean up
|
||||||
|
|
||||||
Revision 1.280 2005/06/25 14:17:57 mattias
|
Revision 1.280 2005/06/25 14:17:57 mattias
|
||||||
added notification method CNPreferredSizeChanged
|
added notification method CNPreferredSizeChanged
|
||||||
|
|
||||||
|
@ -2367,7 +2367,7 @@ begin
|
|||||||
{$ELSE}
|
{$ELSE}
|
||||||
Result:=EventStopped;
|
Result:=EventStopped;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
//DebugLn('[HandleGTKKeyUpDown] ',DbgSName(TObject(Data)),' Result=',dbgs(Result));
|
DebugLn('[HandleGTKKeyUpDown] ',DbgSName(TObject(Data)),' Result=',dbgs(Result),' EventStopped=',dbgs(EventStopped));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
@ -3039,7 +3039,6 @@ begin
|
|||||||
if VKey <> $FF
|
if VKey <> $FF
|
||||||
then MVKeyInfo[VKey].KeyCode := Byte(n);
|
then MVKeyInfo[VKey].KeyCode := Byte(n);
|
||||||
end;
|
end;
|
||||||
WriteLN;
|
|
||||||
end;
|
end;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
@ -4857,7 +4856,7 @@ begin
|
|||||||
Result := PGTKAccelGroup(gtk_object_get_data(PGtkObject(Widget),'AccelGroup'));
|
Result := PGTKAccelGroup(gtk_object_get_data(PGtkObject(Widget),'AccelGroup'));
|
||||||
if (Result=nil) and CreateIfNotExists then begin
|
if (Result=nil) and CreateIfNotExists then begin
|
||||||
{$IFDEF VerboseAccelerator}
|
{$IFDEF VerboseAccelerator}
|
||||||
DebugLn('GetAccelGroup CREATING Widget=',DbgS(Widget),' CreateIfNotExists=',CreateIfNotExists);
|
DebugLn('GetAccelGroup CREATING Widget=',DbgS(Widget),' CreateIfNotExists=',dbgs(CreateIfNotExists));
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
Result:=gtk_accel_group_new;
|
Result:=gtk_accel_group_new;
|
||||||
SetAccelGroup(Widget,Result);
|
SetAccelGroup(Widget,Result);
|
||||||
@ -4874,7 +4873,7 @@ begin
|
|||||||
if AnAccelGroup<>nil then begin
|
if AnAccelGroup<>nil then begin
|
||||||
// attach group to widget
|
// attach group to widget
|
||||||
{$IFDEF VerboseAccelerator}
|
{$IFDEF VerboseAccelerator}
|
||||||
DebugLn('SetAccelGroup AnAccelGroup=',DbgS(AnAccelGroup),' IsMenu=',GtkWidgetIsA(Widget,GTK_MENU_TYPE));
|
DebugLn('SetAccelGroup AnAccelGroup=',DbgS(AnAccelGroup),' IsMenu=',dbgs(GtkWidgetIsA(Widget,GTK_MENU_TYPE)));
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
if GtkWidgetIsA(Widget,GTK_TYPE_MENU) then
|
if GtkWidgetIsA(Widget,GTK_TYPE_MENU) then
|
||||||
gtk_menu_set_accel_group(PGtkMenu(Widget), AnAccelGroup)
|
gtk_menu_set_accel_group(PGtkMenu(Widget), AnAccelGroup)
|
||||||
@ -4910,8 +4909,9 @@ procedure ShareWindowAccelGroups(AWindow: PGtkWidget);
|
|||||||
{$IfDef GTK2}
|
{$IfDef GTK2}
|
||||||
if (TheWindow=nil) or (TheAccelGroup=nil)
|
if (TheWindow=nil) or (TheAccelGroup=nil)
|
||||||
or (TheAccelGroup^.acceleratables=nil)
|
or (TheAccelGroup^.acceleratables=nil)
|
||||||
or (g_slist_find(TheAccelGroup^.acceleratables, TheWindow)=nil) then
|
or (g_slist_find(TheAccelGroup^.acceleratables, TheWindow)=nil)
|
||||||
exit;
|
then
|
||||||
|
exit;
|
||||||
gtk_window_add_accel_group(GTK_WINDOW(TheWindow), TheAccelGroup);
|
gtk_window_add_accel_group(GTK_WINDOW(TheWindow), TheAccelGroup);
|
||||||
{$else}
|
{$else}
|
||||||
if (TheAccelGroup=nil)
|
if (TheAccelGroup=nil)
|
||||||
@ -4979,13 +4979,15 @@ procedure UnshareWindowAccelGroups(AWindow: PGtkWidget);
|
|||||||
{$IfDef GTK2}
|
{$IfDef GTK2}
|
||||||
if (TheWindow=nil) or (TheAccelGroup=nil)
|
if (TheWindow=nil) or (TheAccelGroup=nil)
|
||||||
or (TheAccelGroup^.acceleratables=nil)
|
or (TheAccelGroup^.acceleratables=nil)
|
||||||
or (g_slist_find(TheAccelGroup^.acceleratables, TheWindow)=nil) then
|
or (g_slist_find(TheAccelGroup^.acceleratables, TheWindow)=nil)
|
||||||
exit;
|
then
|
||||||
|
exit;
|
||||||
gtk_window_remove_accel_group(GTK_WINDOW(TheWindow), TheAccelGroup);
|
gtk_window_remove_accel_group(GTK_WINDOW(TheWindow), TheAccelGroup);
|
||||||
{$else}
|
{$else}
|
||||||
if (TheAccelGroup=nil)
|
if (TheAccelGroup=nil)
|
||||||
or (TheAccelGroup^.attach_objects=nil)
|
or (TheAccelGroup^.attach_objects=nil)
|
||||||
or (g_slist_find(TheAccelGroup^.attach_objects, TheWindow)=nil) then
|
or (g_slist_find(TheAccelGroup^.attach_objects, TheWindow)=nil)
|
||||||
|
then
|
||||||
exit;
|
exit;
|
||||||
gtk_accel_group_detach(TheAccelGroup, PGtkObject(TheWindow));
|
gtk_accel_group_detach(TheAccelGroup, PGtkObject(TheWindow));
|
||||||
{$endif}
|
{$endif}
|
||||||
@ -5091,7 +5093,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
{$IFDEF VerboseAccelerator}
|
{$IFDEF VerboseAccelerator}
|
||||||
DebugLn('SetAccelKey Widget=',DbgS(Widget),
|
DebugLn('SetAccelKey Widget=',DbgS(Widget),
|
||||||
' Key=',Key,' Mods=',DbgS(Mods),
|
' Key=',dbgs(Key),' Mods=',DbgS(Mods),
|
||||||
' Signal="',Signal,'" Result=',DbgS(Result));
|
' Signal="',Signal,'" Result=',DbgS(Result));
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
gtk_object_set_data(PGtkObject(Widget), 'AccelKey', Result);
|
gtk_object_set_data(PGtkObject(Widget), 'AccelKey', Result);
|
||||||
@ -5122,7 +5124,7 @@ begin
|
|||||||
Component.Name,':',Component.ClassName,
|
Component.Name,':',Component.ClassName,
|
||||||
' Widget=',DbgS(Widget),
|
' Widget=',DbgS(Widget),
|
||||||
' Signal=',AccelKey^.Signal,
|
' Signal=',AccelKey^.Signal,
|
||||||
' Key=',AccelKey^.Key,' Mods=',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),
|
||||||
@ -5151,7 +5153,7 @@ begin
|
|||||||
DebugLn('UnrealizeAccelerator ',
|
DebugLn('UnrealizeAccelerator ',
|
||||||
' Widget=',DbgS(Widget),
|
' Widget=',DbgS(Widget),
|
||||||
' Signal=',AccelKey^.Signal,
|
' Signal=',AccelKey^.Signal,
|
||||||
' Key=',AccelKey^.Key,' Mods=',AccelKey^.Mods,
|
' Key=',dbgs(AccelKey^.Key),' Mods=',dbgs(AccelKey^.Mods),
|
||||||
'');
|
'');
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$Ifdef GTK2}
|
{$Ifdef GTK2}
|
||||||
@ -5177,7 +5179,7 @@ begin
|
|||||||
if (Component=nil) or (Widget=nil) or (Signal='') then
|
if (Component=nil) or (Widget=nil) or (Signal='') then
|
||||||
RaiseException('Accelerate: invalid input');
|
RaiseException('Accelerate: invalid input');
|
||||||
{$IFDEF VerboseAccelerator}
|
{$IFDEF VerboseAccelerator}
|
||||||
DebugLn('Accelerate ',Component.Name,':',Component.ClassName,' Key=',Key,' Mods=',DbgS(Mods),' Signal=',Signal);
|
DebugLn('Accelerate ',DbgSName(Component),' Key=',dbgs(Key),' Mods=',DbgS(Mods),' Signal=',Signal);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
// delete old accelerator key
|
// delete old accelerator key
|
||||||
@ -5597,8 +5599,9 @@ var
|
|||||||
// simply delete all ampersands and don't set the letter shortcut.
|
// simply delete all ampersands and don't set the letter shortcut.
|
||||||
DeleteAmpersands(s);
|
DeleteAmpersands(s);
|
||||||
gtk_label_set_text(LabelWidget,PChar(s));
|
gtk_label_set_text(LabelWidget,PChar(s));
|
||||||
{Accelerate(LCLMenuItem,MenuItemWidget,
|
Accelerate(LCLMenuItem,MenuItemWidget,
|
||||||
gtk_label_parse_uline(LabelWidget,PChar(s)),0,'activate_item');}
|
gtk_label_parse_uline(LabelWidget,PChar(s)),
|
||||||
|
0,{$Ifdef GTK2}'activate'{$Else}'activate_item'{$EndIF});
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else begin
|
else begin
|
||||||
@ -8247,6 +8250,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.367 2005/07/07 20:56:29 mattias
|
||||||
|
clean up
|
||||||
|
|
||||||
Revision 1.366 2005/07/07 20:20:45 mattias
|
Revision 1.366 2005/07/07 20:20:45 mattias
|
||||||
fixed clean all in IDE, added SystemKey parameter to IntfUTF8KeyPress
|
fixed clean all in IDE, added SystemKey parameter to IntfUTF8KeyPress
|
||||||
|
|
||||||
|
@ -7906,7 +7906,7 @@ begin
|
|||||||
Widget:=PGtkWidget(hWnd);
|
Widget:=PGtkWidget(hWnd);
|
||||||
{$IfDef VerboseFocus}
|
{$IfDef VerboseFocus}
|
||||||
DebugLn('');
|
DebugLn('');
|
||||||
writeln('[TGtkWidgetSet.SetFocus] A hWnd=',GetWidgetDebugReport(Widget));
|
debugln('[TGtkWidgetSet.SetFocus] A hWnd=',GetWidgetDebugReport(Widget));
|
||||||
LCLObject:=TWinControl(GetLCLObject(Widget));
|
LCLObject:=TWinControl(GetLCLObject(Widget));
|
||||||
{$EndIf}
|
{$EndIf}
|
||||||
if hwnd = 0 then begin
|
if hwnd = 0 then begin
|
||||||
@ -9027,6 +9027,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.425 2005/07/07 20:56:29 mattias
|
||||||
|
clean up
|
||||||
|
|
||||||
Revision 1.424 2005/07/01 12:07:50 mattias
|
Revision 1.424 2005/07/01 12:07:50 mattias
|
||||||
moved some menu intf methods to the TXXXWSMenuItem class from Martin Smat
|
moved some menu intf methods to the TXXXWSMenuItem class from Martin Smat
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user