[gtk+/gtk-3-22] ComboBox: Clean up handler disconnection some more
- From: Daniel Boles <dboles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-22] ComboBox: Clean up handler disconnection some more
- Date: Fri, 1 Sep 2017 15:36:31 +0000 (UTC)
commit 85ca68b1c283b6e7e20c1ac719ae102675212b5d
Author: Daniel Boles <dboles src gnome org>
Date: Fri Sep 1 11:43:44 2017 +0100
ComboBox: Clean up handler disconnection some more
gtk/gtkcombobox.c | 14 ++++----------
1 files changed, 4 insertions(+), 10 deletions(-)
---
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index a6e3a53..e672101 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]