mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 18:20:30 +02:00
gtk2: auto disconnecting some handlers, bug #12929
git-svn-id: trunk@18174 -
This commit is contained in:
parent
89fc070b2a
commit
3e47231699
@ -3529,6 +3529,9 @@ procedure TGtkWidgetSet.RemoveCallbacks(Widget: PGtkWidget);
|
||||
var
|
||||
MainWidget, ClientWidget, ImplWidget: PGtkWidget;
|
||||
WinWidgetInfo: PWinWidgetInfo;
|
||||
{$ELSE}
|
||||
var
|
||||
Info: PWinWidgetInfo;
|
||||
{$ENDIF}
|
||||
begin
|
||||
{$IFDEF Gtk1}
|
||||
@ -3548,6 +3551,12 @@ begin
|
||||
if (ImplWidget<>nil)
|
||||
and (ImplWidget<>ClientWidget) and (ImplWidget<>MainWidget) then
|
||||
g_signal_handlers_destroy(PGtkObject(ImplWidget));
|
||||
{$ELSE}
|
||||
if Widget=nil then exit;
|
||||
Info:=GetWidgetInfo(Widget,false);
|
||||
if Info<>nil then begin
|
||||
g_signal_handlers_disconnect_matched(Widget,G_SIGNAL_MATCH_DATA,0,0,nil,nil,Info);
|
||||
end;
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user