]> spindle.queued.net Git - midori/commitdiff
Protect proxy combo box notifications against recursion
authorAlexander Butenko <a.butenka@gmail.com>
Tue, 24 Aug 2010 21:50:47 +0000 (23:50 +0200)
committerChristian Dywan <christian@twotoasts.de>
Tue, 24 Aug 2010 21:50:47 +0000 (23:50 +0200)
This can happen when switching between custom and other elements.

katze/katze-utils.c

index dc7f7946ec55232f253dbc8a823e91b9caf7669c..8e98ef4366f7241c898dac0f2c652a6f768c79af 100644 (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);
         }
     }