Protect proxy combo box notifications against recursion

This can happen when switching between custom and other elements.
This commit is contained in:
Alexander Butenko 2010-08-24 23:50:47 +02:00 committed by Christian Dywan
parent a888a802ec
commit 672b7ab70a

View file

@ -247,10 +247,14 @@ proxy_combo_box_changed_cb (GtkComboBox* button,
}
else if (value != custom_value && GTK_IS_ENTRY (child))
{
g_signal_handlers_block_by_func (
button, proxy_combo_box_changed_cb, object);
/* Force the combo to change the item again */
gtk_widget_destroy (child);
gtk_combo_box_set_active (button, value + 1);
gtk_combo_box_set_active (button, value);
g_signal_handlers_unblock_by_func (
button, proxy_combo_box_changed_cb, object);
}
}