[gtk+/gtk-3-22] ComboBox: Dodge possible surplus disconnects
- From: Daniel Boles <dboles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-22] ComboBox: Dodge possible surplus disconnects
- Date: Fri, 1 Sep 2017 19:20:54 +0000 (UTC)
commit d9b5fd357f9d0da503edc0683d755ee322cc1d75
Author: Daniel Boles <dboles src gnome org>
Date: Fri Sep 1 20:17:11 2017 +0100
ComboBox: Dodge possible surplus disconnects
in case anyone connected any other signal on the model to this ComboBox.
gtk/gtkcombobox.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index cee696b..9acb1fb 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -2465,7 +2465,18 @@ gtk_combo_box_unset_model (GtkComboBox *combo_box)
if (priv->model)
{
- g_signal_handlers_disconnect_by_data (priv->model, combo_box);
+ g_signal_handlers_disconnect_by_func (priv->model,
+ gtk_combo_box_model_row_inserted,
+ combo_box);
+ g_signal_handlers_disconnect_by_func (priv->model,
+ gtk_combo_box_model_row_deleted,
+ combo_box);
+ g_signal_handlers_disconnect_by_func (priv->model,
+ gtk_combo_box_model_rows_reordered,
+ combo_box);
+ g_signal_handlers_disconnect_by_func (priv->model,
+ gtk_combo_box_model_row_changed,
+ combo_box);
g_object_unref (priv->model);
priv->model = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]