Disconnect all GTK signals referencing a wx object which is being destructed

or which is destroying the associated GTK object


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72696 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2012-10-17 16:23:18 +00:00
parent 5475b39f53
commit 8ab7533289
28 changed files with 96 additions and 90 deletions

View File

@@ -546,8 +546,6 @@ gtk_text_changed_callback( GtkWidget *WXUNUSED(widget), wxTextCtrl *win )
if ( win->IgnoreTextUpdate() )
return;
if (!win->m_hasVMT) return;
if ( win->MarkDirtyOnChange() )
win->MarkDirty();
@@ -607,12 +605,18 @@ void wxTextCtrl::Init()
SetUpdateFont(false);
m_text = NULL;
m_buffer = NULL;
m_showPositionOnThaw = NULL;
m_anonymousMarkList = NULL;
}
wxTextCtrl::~wxTextCtrl()
{
if (m_text)
GTKDisconnect(m_text);
if (m_buffer)
GTKDisconnect(m_buffer);
// this is also done by wxWindowGTK dtor, but has to be done here so our
// DoThaw() override is called
while (IsFrozen())