mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
Update offsets before finding where to insert the new value.
* gtk/gtktreemodelsort.c: (gtk_tree_model_sort_insert_value): Update offsets before finding where to insert the new value. * gtk/gtktreeview.c: (validate_visible_area): Make sure we redraw when we scroll, instead of just updating the scroll position variables.
This commit is contained in:
parent
95ab890de0
commit
1845cc4349
@ -1,3 +1,11 @@
|
||||
2002-03-06 Darin Adler <darin@bentspoon.com>
|
||||
|
||||
* gtk/gtktreemodelsort.c: (gtk_tree_model_sort_insert_value):
|
||||
Update offsets before finding where to insert the new value.
|
||||
|
||||
* gtk/gtktreeview.c: (validate_visible_area): Make sure we redraw when
|
||||
we scroll, instead of just updating the scroll position variables.
|
||||
|
||||
2002-03-06 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gdk/Makefile.am
|
||||
|
@ -1,3 +1,11 @@
|
||||
2002-03-06 Darin Adler <darin@bentspoon.com>
|
||||
|
||||
* gtk/gtktreemodelsort.c: (gtk_tree_model_sort_insert_value):
|
||||
Update offsets before finding where to insert the new value.
|
||||
|
||||
* gtk/gtktreeview.c: (validate_visible_area): Make sure we redraw when
|
||||
we scroll, instead of just updating the scroll position variables.
|
||||
|
||||
2002-03-06 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gdk/Makefile.am
|
||||
|
@ -1,3 +1,11 @@
|
||||
2002-03-06 Darin Adler <darin@bentspoon.com>
|
||||
|
||||
* gtk/gtktreemodelsort.c: (gtk_tree_model_sort_insert_value):
|
||||
Update offsets before finding where to insert the new value.
|
||||
|
||||
* gtk/gtktreeview.c: (validate_visible_area): Make sure we redraw when
|
||||
we scroll, instead of just updating the scroll position variables.
|
||||
|
||||
2002-03-06 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gdk/Makefile.am
|
||||
|
@ -1,3 +1,11 @@
|
||||
2002-03-06 Darin Adler <darin@bentspoon.com>
|
||||
|
||||
* gtk/gtktreemodelsort.c: (gtk_tree_model_sort_insert_value):
|
||||
Update offsets before finding where to insert the new value.
|
||||
|
||||
* gtk/gtktreeview.c: (validate_visible_area): Make sure we redraw when
|
||||
we scroll, instead of just updating the scroll position variables.
|
||||
|
||||
2002-03-06 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gdk/Makefile.am
|
||||
|
@ -1,3 +1,11 @@
|
||||
2002-03-06 Darin Adler <darin@bentspoon.com>
|
||||
|
||||
* gtk/gtktreemodelsort.c: (gtk_tree_model_sort_insert_value):
|
||||
Update offsets before finding where to insert the new value.
|
||||
|
||||
* gtk/gtktreeview.c: (validate_visible_area): Make sure we redraw when
|
||||
we scroll, instead of just updating the scroll position variables.
|
||||
|
||||
2002-03-06 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gdk/Makefile.am
|
||||
|
@ -1,3 +1,11 @@
|
||||
2002-03-06 Darin Adler <darin@bentspoon.com>
|
||||
|
||||
* gtk/gtktreemodelsort.c: (gtk_tree_model_sort_insert_value):
|
||||
Update offsets before finding where to insert the new value.
|
||||
|
||||
* gtk/gtktreeview.c: (validate_visible_area): Make sure we redraw when
|
||||
we scroll, instead of just updating the scroll position variables.
|
||||
|
||||
2002-03-06 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gdk/Makefile.am
|
||||
|
@ -1,3 +1,11 @@
|
||||
2002-03-06 Darin Adler <darin@bentspoon.com>
|
||||
|
||||
* gtk/gtktreemodelsort.c: (gtk_tree_model_sort_insert_value):
|
||||
Update offsets before finding where to insert the new value.
|
||||
|
||||
* gtk/gtktreeview.c: (validate_visible_area): Make sure we redraw when
|
||||
we scroll, instead of just updating the scroll position variables.
|
||||
|
||||
2002-03-06 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gdk/Makefile.am
|
||||
|
@ -1663,6 +1663,12 @@ gtk_tree_model_sort_insert_value (GtkTreeModelSort *tree_model_sort,
|
||||
elt.ref_count = 0;
|
||||
elt.children = NULL;
|
||||
|
||||
/* update all larger offsets */
|
||||
tmp_elt = SORT_ELT (level->array->data);
|
||||
for (i = 0; i < level->array->len; i++, tmp_elt++)
|
||||
if (tmp_elt->offset >= offset)
|
||||
tmp_elt->offset++;
|
||||
|
||||
if (tree_model_sort->sort_column_id == GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID &&
|
||||
tree_model_sort->default_sort_func == NO_SORT_FUNC)
|
||||
index = offset;
|
||||
@ -1672,16 +1678,10 @@ gtk_tree_model_sort_insert_value (GtkTreeModelSort *tree_model_sort,
|
||||
FALSE);
|
||||
|
||||
g_array_insert_vals (level->array, index, &elt, 1);
|
||||
|
||||
/* update all larger offsets */
|
||||
tmp_elt = SORT_ELT (level->array->data);
|
||||
for (i = 0; i < level->array->len; i++, tmp_elt++)
|
||||
{
|
||||
if ((tmp_elt->offset >= offset) && i != index)
|
||||
tmp_elt->offset++;
|
||||
if (tmp_elt->children)
|
||||
tmp_elt->children->parent_elt = tmp_elt;
|
||||
}
|
||||
if (tmp_elt->children)
|
||||
tmp_elt->children->parent_elt = tmp_elt;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -3652,7 +3652,7 @@ validate_visible_area (GtkTreeView *tree_view)
|
||||
GtkTreeIter iter;
|
||||
GtkRBTree *tree = NULL;
|
||||
GtkRBNode *node = NULL;
|
||||
gboolean validated_area = FALSE;
|
||||
gboolean need_redraw = FALSE;
|
||||
gboolean size_changed = FALSE;
|
||||
gboolean modify_dy = FALSE;
|
||||
gint total_height;
|
||||
@ -3675,7 +3675,7 @@ validate_visible_area (GtkTreeView *tree_view)
|
||||
if (GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_INVALID) ||
|
||||
GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_COLUMN_INVALID))
|
||||
{
|
||||
validated_area = TRUE;
|
||||
need_redraw = TRUE;
|
||||
if (validate_row (tree_view, tree, node, &iter, path))
|
||||
size_changed = TRUE;
|
||||
}
|
||||
@ -3736,7 +3736,7 @@ validate_visible_area (GtkTreeView *tree_view)
|
||||
if (GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_INVALID) ||
|
||||
GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_COLUMN_INVALID))
|
||||
{
|
||||
validated_area = TRUE;
|
||||
need_redraw = TRUE;
|
||||
if (validate_row (tree_view, tree, node, &iter, path))
|
||||
size_changed = TRUE;
|
||||
}
|
||||
@ -3809,7 +3809,7 @@ validate_visible_area (GtkTreeView *tree_view)
|
||||
if (GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_INVALID) ||
|
||||
GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_COLUMN_INVALID))
|
||||
{
|
||||
validated_area = TRUE;
|
||||
need_redraw = TRUE;
|
||||
if (validate_row (tree_view, tree, node, &iter, path))
|
||||
size_changed = TRUE;
|
||||
}
|
||||
@ -3838,7 +3838,7 @@ validate_visible_area (GtkTreeView *tree_view)
|
||||
if (GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_INVALID) ||
|
||||
GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_COLUMN_INVALID))
|
||||
{
|
||||
validated_area = TRUE;
|
||||
need_redraw = TRUE;
|
||||
if (validate_row (tree_view, tree, node, &iter, above_path))
|
||||
size_changed = TRUE;
|
||||
}
|
||||
@ -3860,6 +3860,7 @@ validate_visible_area (GtkTreeView *tree_view)
|
||||
tree_view->priv->top_row =
|
||||
gtk_tree_row_reference_new_proxy (G_OBJECT (tree_view), tree_view->priv->model, above_path);
|
||||
tree_view->priv->top_row_dy = - area_above;
|
||||
need_redraw = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -3881,7 +3882,7 @@ validate_visible_area (GtkTreeView *tree_view)
|
||||
}
|
||||
if (size_changed)
|
||||
gtk_widget_queue_resize (GTK_WIDGET (tree_view));
|
||||
if (validated_area)
|
||||
if (need_redraw)
|
||||
gtk_widget_queue_draw (GTK_WIDGET (tree_view));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user