block signal handlers, instead of disconnecting, to temporarily disable them

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46982 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2007-06-27 17:38:13 +00:00
parent ab29bb87b2
commit 9826452012
6 changed files with 49 additions and 62 deletions

View File

@@ -4159,13 +4159,13 @@ void wxWindowGTK::SetScrollPos(int orient, int pos, bool WXUNUSED(refresh))
pos = 0;
m_scrollPos[dir] = adj->value = pos;
g_signal_handlers_disconnect_by_func( m_scrollBar[dir],
(gpointer)gtk_scrollbar_value_changed, this);
g_signal_handlers_block_by_func(m_scrollBar[dir],
(gpointer)gtk_scrollbar_value_changed, this);
gtk_adjustment_value_changed(adj);
g_signal_connect_after(m_scrollBar[dir], "value_changed",
G_CALLBACK(gtk_scrollbar_value_changed), this);
g_signal_handlers_unblock_by_func(m_scrollBar[dir],
(gpointer)gtk_scrollbar_value_changed, this);
}
}