mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 11:36:02 +02:00
MG: fixed cool little bug (menu double attaching bug)
git-svn-id: trunk@937 -
This commit is contained in:
parent
1dbce3192d
commit
d0966f30ff
@ -5398,10 +5398,15 @@ var
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
LCLMenuItem:=TMenuItem(Sender);
|
LCLMenuItem:=TMenuItem(Sender);
|
||||||
|
//writeln('TGtkObject.AttachMenu START ',LCLMenuItem.Name,':',LCLMenuItem.ClassName,' Parent=',LCLMenuItem.Parent.Name,':',LCLMenuItem.Parent.ClassName);
|
||||||
with LCLMenuItem do
|
with LCLMenuItem do
|
||||||
begin
|
begin
|
||||||
MenuItem := PGtkWidget(Handle);
|
MenuItem := PGtkWidget(Handle);
|
||||||
|
if MenuItem=nil then
|
||||||
|
RaiseException('TGtkObject.AttachMenu Handle=0');
|
||||||
ParentMenuWidget := PGtkWidget(Parent.Handle);
|
ParentMenuWidget := PGtkWidget(Parent.Handle);
|
||||||
|
if ParentMenuWidget=nil then
|
||||||
|
RaiseException('TGtkObject.AttachMenu ParentMenuWidget=nil');
|
||||||
|
|
||||||
if GtkWidgetIsA(ParentMenuWidget,GTK_MENU_BAR_TYPE) then begin
|
if GtkWidgetIsA(ParentMenuWidget,GTK_MENU_BAR_TYPE) then begin
|
||||||
// mainmenu
|
// mainmenu
|
||||||
@ -5447,6 +5452,7 @@ begin
|
|||||||
'activate_item');
|
'activate_item');
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
//writeln('TGtkObject.AttachMenu END ',LCLMenuItem.Name,':',LCLMenuItem.ClassName);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
@ -6009,6 +6015,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.241 2002/10/08 22:32:28 lazarus
|
||||||
|
MG: fixed cool little bug (menu double attaching bug)
|
||||||
|
|
||||||
Revision 1.240 2002/10/08 17:51:41 lazarus
|
Revision 1.240 2002/10/08 17:51:41 lazarus
|
||||||
MG: fixed settings negative widget sizes
|
MG: fixed settings negative widget sizes
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user