From: Daniel Boles Date: Fri, 1 Sep 2017 10:43:44 +0000 (+0100) Subject: ComboBox: Clean up handler disconnection some more X-Git-Tag: archive/raspbian/3.24.39-1+rpi1~1^2~65^2~39^2~260 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=85ca68b1c283b6e7e20c1ac719ae102675212b5d;p=gtk%2B3.0.git ComboBox: Clean up handler disconnection some more --- diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c index a6e3a536d2..e672101abc 100644 --- a/gtk/gtkcombobox.c +++ b/gtk/gtkcombobox.c @@ -2791,12 +2791,8 @@ gtk_combo_box_menu_destroy (GtkComboBox *combo_box) { GtkComboBoxPrivate *priv = combo_box->priv; - g_signal_handlers_disconnect_by_func (priv->button, - gtk_combo_box_menu_button_press, combo_box); - g_signal_handlers_disconnect_by_func (priv->button, - gtk_combo_box_button_state_flags_changed, combo_box); - g_signal_handlers_disconnect_by_func (priv->popup_widget, - gtk_combo_box_menu_activate, combo_box); + g_signal_handlers_disconnect_by_data (priv->button, combo_box); + g_signal_handlers_disconnect_by_data (priv->popup_widget, combo_box); /* changing the popup window will unref the menu and the children */ } @@ -3062,10 +3058,8 @@ gtk_combo_box_list_destroy (GtkComboBox *combo_box) GtkComboBoxPrivate *priv = combo_box->priv; /* disconnect signals */ + g_signal_handlers_disconnect_by_data (priv->button, combo_box); g_signal_handlers_disconnect_by_data (priv->tree_view, combo_box); - g_signal_handlers_disconnect_by_func (priv->button, - gtk_combo_box_list_button_pressed, - combo_box); g_signal_handlers_disconnect_by_data (priv->popup_window, combo_box); if (priv->cell_view) @@ -3088,8 +3082,8 @@ gtk_combo_box_list_destroy (GtkComboBox *combo_box) } gtk_widget_destroy (priv->tree_view); - priv->tree_view = NULL; + if (priv->popup_widget) { g_object_unref (priv->popup_widget);