forked from AuroraMiddleware/gtk
Fix reorder_fixup, #59583
Thu Nov 1 19:11:35 2001 Jonathan Blandford <jrb@redhat.com> * gtk/gtkrbtree.c (gtk_rbtree_reorder_fixup): Fix reorder_fixup, #59583 * gtk/gtktreeselection.c (gtk_tree_selection_set_mode): fix warning.
This commit is contained in:
parent
2ced30ad32
commit
a2ff9e4179
@ -1,3 +1,11 @@
|
||||
Thu Nov 1 19:11:35 2001 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkrbtree.c (gtk_rbtree_reorder_fixup): Fix reorder_fixup,
|
||||
#59583
|
||||
|
||||
* gtk/gtktreeselection.c (gtk_tree_selection_set_mode): fix
|
||||
warning.
|
||||
|
||||
Thu Nov 1 16:54:00 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtktypeutils.h: Make GtkFunction return boolean, not gint.
|
||||
|
@ -1,3 +1,11 @@
|
||||
Thu Nov 1 19:11:35 2001 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkrbtree.c (gtk_rbtree_reorder_fixup): Fix reorder_fixup,
|
||||
#59583
|
||||
|
||||
* gtk/gtktreeselection.c (gtk_tree_selection_set_mode): fix
|
||||
warning.
|
||||
|
||||
Thu Nov 1 16:54:00 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtktypeutils.h: Make GtkFunction return boolean, not gint.
|
||||
|
@ -1,3 +1,11 @@
|
||||
Thu Nov 1 19:11:35 2001 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkrbtree.c (gtk_rbtree_reorder_fixup): Fix reorder_fixup,
|
||||
#59583
|
||||
|
||||
* gtk/gtktreeselection.c (gtk_tree_selection_set_mode): fix
|
||||
warning.
|
||||
|
||||
Thu Nov 1 16:54:00 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtktypeutils.h: Make GtkFunction return boolean, not gint.
|
||||
|
@ -1,3 +1,11 @@
|
||||
Thu Nov 1 19:11:35 2001 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkrbtree.c (gtk_rbtree_reorder_fixup): Fix reorder_fixup,
|
||||
#59583
|
||||
|
||||
* gtk/gtktreeselection.c (gtk_tree_selection_set_mode): fix
|
||||
warning.
|
||||
|
||||
Thu Nov 1 16:54:00 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtktypeutils.h: Make GtkFunction return boolean, not gint.
|
||||
|
@ -1,3 +1,11 @@
|
||||
Thu Nov 1 19:11:35 2001 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkrbtree.c (gtk_rbtree_reorder_fixup): Fix reorder_fixup,
|
||||
#59583
|
||||
|
||||
* gtk/gtktreeselection.c (gtk_tree_selection_set_mode): fix
|
||||
warning.
|
||||
|
||||
Thu Nov 1 16:54:00 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtktypeutils.h: Make GtkFunction return boolean, not gint.
|
||||
|
@ -1,3 +1,11 @@
|
||||
Thu Nov 1 19:11:35 2001 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkrbtree.c (gtk_rbtree_reorder_fixup): Fix reorder_fixup,
|
||||
#59583
|
||||
|
||||
* gtk/gtktreeselection.c (gtk_tree_selection_set_mode): fix
|
||||
warning.
|
||||
|
||||
Thu Nov 1 16:54:00 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtktypeutils.h: Make GtkFunction return boolean, not gint.
|
||||
|
@ -1,3 +1,11 @@
|
||||
Thu Nov 1 19:11:35 2001 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkrbtree.c (gtk_rbtree_reorder_fixup): Fix reorder_fixup,
|
||||
#59583
|
||||
|
||||
* gtk/gtktreeselection.c (gtk_tree_selection_set_mode): fix
|
||||
warning.
|
||||
|
||||
Thu Nov 1 16:54:00 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtktypeutils.h: Make GtkFunction return boolean, not gint.
|
||||
|
@ -805,6 +805,7 @@ typedef struct _GtkRBReorder
|
||||
gint flags;
|
||||
gint order;
|
||||
gint invert_order;
|
||||
gint parity;
|
||||
} GtkRBReorder;
|
||||
|
||||
static int
|
||||
@ -828,19 +829,26 @@ gtk_rbtree_reorder_fixup (GtkRBTree *tree,
|
||||
if (node == tree->nil)
|
||||
return;
|
||||
|
||||
node->parity = 1;
|
||||
|
||||
if (node->left != tree->nil)
|
||||
{
|
||||
gtk_rbtree_reorder_fixup (tree, node->left);
|
||||
node->offset += node->left->offset;
|
||||
node->parity += node->left->parity;
|
||||
}
|
||||
if (node->right != tree->nil)
|
||||
{
|
||||
gtk_rbtree_reorder_fixup (tree, node->right);
|
||||
node->offset += node->right->offset;
|
||||
node->parity += node->right->parity;
|
||||
}
|
||||
|
||||
if (node->children)
|
||||
{
|
||||
node->offset += node->children->root->offset;
|
||||
node->parity += node->children->root->parity;
|
||||
}
|
||||
}
|
||||
|
||||
/* It basically pulls everything out of the tree, rearranges it, and puts it
|
||||
@ -849,7 +857,6 @@ gtk_rbtree_reorder_fixup (GtkRBTree *tree,
|
||||
* heights. There is probably a more elegant way to write this function. If
|
||||
* anyone wants to spend the time writing it, patches will be accepted.
|
||||
*/
|
||||
|
||||
void
|
||||
_gtk_rbtree_reorder (GtkRBTree *tree,
|
||||
gint *new_order,
|
||||
|
@ -230,6 +230,7 @@ gtk_tree_selection_set_mode (GtkTreeSelection *selection,
|
||||
tree,
|
||||
anchor_path,
|
||||
0);
|
||||
if (anchor_path)
|
||||
gtk_tree_path_free (anchor_path);
|
||||
}
|
||||
|
||||
|
@ -7987,9 +7987,15 @@ gtk_tree_view_set_reorderable (GtkTreeView *tree_view,
|
||||
{
|
||||
g_return_if_fail (GTK_IS_TREE_VIEW (tree_view));
|
||||
|
||||
if (tree_view->priv->reorderable == (reorderable?TRUE:FALSE))
|
||||
reorderable = reorderable != FALSE;
|
||||
|
||||
if (tree_view->priv->reorderable == reorderable)
|
||||
return;
|
||||
|
||||
tree_view->priv->reorderable = reorderable;
|
||||
|
||||
if (reorderable)
|
||||
{
|
||||
gtk_tree_view_set_rows_drag_source (tree_view,
|
||||
GDK_BUTTON1_MASK,
|
||||
row_targets,
|
||||
@ -8001,6 +8007,12 @@ gtk_tree_view_set_reorderable (GtkTreeView *tree_view,
|
||||
G_N_ELEMENTS (row_targets),
|
||||
GDK_ACTION_MOVE,
|
||||
NULL, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_tree_view_unset_rows_drag_source (tree_view);
|
||||
gtk_tree_view_unset_rows_drag_dest (tree_view);
|
||||
}
|
||||
|
||||
g_object_notify (G_OBJECT (tree_view), "reorderable");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user