git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46562
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
//-----------------------------------------------------------------------------
static void wxInsertChildInToolBar( wxWindow* WXUNUSED(parent),
//-----------------------------------------------------------------------------
static void wxInsertChildInToolBar( wxWindow* WXUNUSED(parent),
- wxWindow* WXUNUSED(child) )
- // we don't do anything here
+ // Child widget will be inserted into GtkToolbar by DoInsertTool. Ref it
+ // here so reparenting into wxToolBar doesn't delete it.
+ g_object_ref(child->m_widget);
}
// ----------------------------------------------------------------------------
}
// ----------------------------------------------------------------------------
(const char *) NULL,
posGtk
);
(const char *) NULL,
posGtk
);
+ // release reference obtained by wxInsertChildInToolBar
+ g_object_unref(tool->GetControl()->m_widget);
// connect after in order to correct size_allocate events
g_signal_connect_after (tool->GetControl()->m_widget, "size_allocate",
// connect after in order to correct size_allocate events
g_signal_connect_after (tool->GetControl()->m_widget, "size_allocate",