[gtk+] treeview: Reorder code a bit
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] treeview: Reorder code a bit
- Date: Tue, 29 Nov 2011 19:51:47 +0000 (UTC)
commit bbf00265fc9255b9da0fa3a7ce43aad038bb6482
Author: Benjamin Otte <otte redhat com>
Date: Sat Nov 26 23:49:05 2011 +0100
treeview: Reorder code a bit
This is mainly in preparation for the next commit, but also to reorder
the code to
1) prepare modification of tree
2) modify tree
3) emit signals
gtk/gtktreeview.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 29c6b4d..698052c 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -12807,6 +12807,7 @@ gtk_tree_view_real_collapse_row (GtkTreeView *tree_view,
gint x, y;
GList *list;
GdkWindow *child;
+ gboolean selection_changed;
if (animate)
g_object_get (gtk_widget_get_settings (GTK_WIDGET (tree_view)),
@@ -12895,19 +12896,18 @@ gtk_tree_view_real_collapse_row (GtkTreeView *tree_view,
gtk_tree_path_free (anchor_path);
}
+ selection_changed = gtk_tree_view_unref_and_check_selection_tree (tree_view, node->children);
+
/* Stop a pending double click */
tree_view->priv->last_button_x = -1;
tree_view->priv->last_button_y = -1;
_gtk_tree_view_accessible_remove (tree_view, node->children, NULL);
- if (gtk_tree_view_unref_and_check_selection_tree (tree_view, node->children))
- {
- _gtk_rbtree_remove (node->children);
+ _gtk_rbtree_remove (node->children);
+
+ if (selection_changed)
g_signal_emit_by_name (tree_view->priv->selection, "changed");
- }
- else
- _gtk_rbtree_remove (node->children);
if (animate)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]