+void wxListBox::DisableEvents()
+{
+ GList *child = m_list->children;
+ while (child)
+ {
+ gtk_signal_disconnect_by_func( GTK_OBJECT(child->data),
+ GTK_SIGNAL_FUNC(gtk_listitem_select_callback), (gpointer)this );
+
+ if (HasFlag(wxLB_MULTIPLE))
+ gtk_signal_disconnect_by_func( GTK_OBJECT(child->data),
+ GTK_SIGNAL_FUNC(gtk_listitem_select_callback), (gpointer)this );
+
+ child = child->next;
+ }
+}
+
+void wxListBox::EnableEvents()
+{
+ GList *child = m_list->children;
+ while (child)
+ {
+ gtk_signal_connect( GTK_OBJECT(child->data), "select",
+ GTK_SIGNAL_FUNC(gtk_listitem_select_callback), (gpointer)this );
+
+ if (HasFlag(wxLB_MULTIPLE))
+ gtk_signal_connect( GTK_OBJECT(child->data), "deselect",
+ GTK_SIGNAL_FUNC(gtk_listitem_select_callback), (gpointer)this );
+
+ child = child->next;
+ }
+}
+