From 7bb3d17abe5e58480e7c4378c7a922c6df016725 Mon Sep 17 00:00:00 2001 From: Kristian Rietveld Date: Sat, 2 Feb 2002 17:07:49 +0000 Subject: [PATCH] set upper member of vadjustment correct, so the vscrollbars of lists Sat Feb 2 18:07:51 2002 Kristian Rietveld * gtk/gtktreeview.c (gtk_tree_view_size_allocate): set upper member of vadjustment correct, so the vscrollbars of lists smaller than 1 page are somewhat saner (#66905) * gtk/gtkliststore.c (gtk_list_store_remove_silently): do not increment the stamp, liststore is a model with persisting iters --- ChangeLog | 9 +++++++++ ChangeLog.pre-2-0 | 9 +++++++++ ChangeLog.pre-2-10 | 9 +++++++++ ChangeLog.pre-2-2 | 9 +++++++++ ChangeLog.pre-2-4 | 9 +++++++++ ChangeLog.pre-2-6 | 9 +++++++++ ChangeLog.pre-2-8 | 9 +++++++++ gtk/gtkliststore.c | 2 -- gtk/gtktreeview.c | 2 +- 9 files changed, 64 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2ad5e94d5a..5315a4c9cf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Sat Feb 2 18:07:51 2002 Kristian Rietveld + + * gtk/gtktreeview.c (gtk_tree_view_size_allocate): set upper member + of vadjustment correct, so the vscrollbars of lists smaller than + 1 page are somewhat saner (#66905) + + * gtk/gtkliststore.c (gtk_list_store_remove_silently): do not + increment the stamp, liststore is a model with persisting iters + Fri Feb 1 23:54:00 2002 Owen Taylor * gtk/gtkrc.[ch] (gtk_rc_parse_engine): Support diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 2ad5e94d5a..5315a4c9cf 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,12 @@ +Sat Feb 2 18:07:51 2002 Kristian Rietveld + + * gtk/gtktreeview.c (gtk_tree_view_size_allocate): set upper member + of vadjustment correct, so the vscrollbars of lists smaller than + 1 page are somewhat saner (#66905) + + * gtk/gtkliststore.c (gtk_list_store_remove_silently): do not + increment the stamp, liststore is a model with persisting iters + Fri Feb 1 23:54:00 2002 Owen Taylor * gtk/gtkrc.[ch] (gtk_rc_parse_engine): Support diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 2ad5e94d5a..5315a4c9cf 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,12 @@ +Sat Feb 2 18:07:51 2002 Kristian Rietveld + + * gtk/gtktreeview.c (gtk_tree_view_size_allocate): set upper member + of vadjustment correct, so the vscrollbars of lists smaller than + 1 page are somewhat saner (#66905) + + * gtk/gtkliststore.c (gtk_list_store_remove_silently): do not + increment the stamp, liststore is a model with persisting iters + Fri Feb 1 23:54:00 2002 Owen Taylor * gtk/gtkrc.[ch] (gtk_rc_parse_engine): Support diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 2ad5e94d5a..5315a4c9cf 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,12 @@ +Sat Feb 2 18:07:51 2002 Kristian Rietveld + + * gtk/gtktreeview.c (gtk_tree_view_size_allocate): set upper member + of vadjustment correct, so the vscrollbars of lists smaller than + 1 page are somewhat saner (#66905) + + * gtk/gtkliststore.c (gtk_list_store_remove_silently): do not + increment the stamp, liststore is a model with persisting iters + Fri Feb 1 23:54:00 2002 Owen Taylor * gtk/gtkrc.[ch] (gtk_rc_parse_engine): Support diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 2ad5e94d5a..5315a4c9cf 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,12 @@ +Sat Feb 2 18:07:51 2002 Kristian Rietveld + + * gtk/gtktreeview.c (gtk_tree_view_size_allocate): set upper member + of vadjustment correct, so the vscrollbars of lists smaller than + 1 page are somewhat saner (#66905) + + * gtk/gtkliststore.c (gtk_list_store_remove_silently): do not + increment the stamp, liststore is a model with persisting iters + Fri Feb 1 23:54:00 2002 Owen Taylor * gtk/gtkrc.[ch] (gtk_rc_parse_engine): Support diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 2ad5e94d5a..5315a4c9cf 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,12 @@ +Sat Feb 2 18:07:51 2002 Kristian Rietveld + + * gtk/gtktreeview.c (gtk_tree_view_size_allocate): set upper member + of vadjustment correct, so the vscrollbars of lists smaller than + 1 page are somewhat saner (#66905) + + * gtk/gtkliststore.c (gtk_list_store_remove_silently): do not + increment the stamp, liststore is a model with persisting iters + Fri Feb 1 23:54:00 2002 Owen Taylor * gtk/gtkrc.[ch] (gtk_rc_parse_engine): Support diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 2ad5e94d5a..5315a4c9cf 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,12 @@ +Sat Feb 2 18:07:51 2002 Kristian Rietveld + + * gtk/gtktreeview.c (gtk_tree_view_size_allocate): set upper member + of vadjustment correct, so the vscrollbars of lists smaller than + 1 page are somewhat saner (#66905) + + * gtk/gtkliststore.c (gtk_list_store_remove_silently): do not + increment the stamp, liststore is a model with persisting iters + Fri Feb 1 23:54:00 2002 Owen Taylor * gtk/gtkrc.[ch] (gtk_rc_parse_engine): Support diff --git a/gtk/gtkliststore.c b/gtk/gtkliststore.c index ec32660207..475a4ceb37 100644 --- a/gtk/gtkliststore.c +++ b/gtk/gtkliststore.c @@ -962,8 +962,6 @@ gtk_list_store_remove_silently (GtkListStore *list_store, if (iter->user_data == list_store->tail) list_store->tail = prev; } - - list_store->stamp ++; } /** diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index c5a6319739..4e0763ac54 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -1604,7 +1604,7 @@ gtk_tree_view_size_allocate (GtkWidget *widget, tree_view->priv->vadjustment->step_increment = (tree_view->priv->vadjustment->page_size) / 10; tree_view->priv->vadjustment->page_increment = (allocation->height - TREE_VIEW_HEADER_HEIGHT (tree_view)) / 2; tree_view->priv->vadjustment->lower = 0; - tree_view->priv->vadjustment->upper = tree_view->priv->height; + tree_view->priv->vadjustment->upper = MAX (tree_view->priv->vadjustment->page_size, tree_view->priv->height); if (tree_view->priv->vadjustment->value + allocation->height > tree_view->priv->height) gtk_adjustment_set_value (tree_view->priv->vadjustment,