[gtk+/gtk-3-8] treeview: Don't emit cursor-changed in destruction



commit 53d5eef8466d197da814cd30fadc35a3ea4b559e
Author: John Lindgren <john lindgren aol com>
Date:   Wed Mar 13 02:03:45 2013 +0100

    treeview: Don't emit cursor-changed in destruction
    
    This is a workaround until we have a good idea on how we want to handle
    signal disconnection before/during/after dispose and destroy vfunc
    calls.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=671939

 gtk/gtktreeview.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 21873d7..4544c6f 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -13238,7 +13238,8 @@ gtk_tree_view_real_set_cursor (GtkTreeView     *tree_view,
                                            GTK_CELL_RENDERER_FOCUSED);
     }
 
-  g_signal_emit (tree_view, tree_view_signals[CURSOR_CHANGED], 0);
+  if (!gtk_widget_in_destruction (GTK_WIDGET (tree_view)))
+    g_signal_emit (tree_view, tree_view_signals[CURSOR_CHANGED], 0);
 }
 
 /**


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]