From c0ce3a61078ee1cb174902c31d467cc139dc9b81 Mon Sep 17 00:00:00 2001 From: Lars Hamann Date: Fri, 17 Jul 1998 16:05:42 +0000 Subject: [PATCH] fix to avoid flicker at begin/end of list * gtk/gtkclist.c (scroll_vertical): fix to avoid flicker at begin/end of list --- ChangeLog | 6 ++++++ ChangeLog.pre-2-0 | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-2 | 6 ++++++ ChangeLog.pre-2-4 | 6 ++++++ ChangeLog.pre-2-6 | 6 ++++++ ChangeLog.pre-2-8 | 6 ++++++ gtk/gtkclist.c | 25 ++++++++++++++++++------- 8 files changed, 60 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6633e39bc..25444e512 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Jul 17 17:54:02 1998 Lars Hamann + + * gtk/gtkclist.c (scroll_vertical): fix to avoid flicker at begin/end + of list + Fri Jul 17 05:30:47 1998 Tim Janik * gtk/gtksignal.c (gtk_handlers_run) (gtk_signal_real_emit): @@ -32,6 +37,7 @@ Thu Jul 16 14:16:16 PDT 1998 Manish Singh it; --libs strips out redundant -L's properly (there was code in there to do it before, but it didn't work) +>>>>>>> 1.528 Thu Jul 16 18:24:41 1998 Tim Janik * gtk/gtknotebook.h: diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 6633e39bc..25444e512 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,8 @@ +Fri Jul 17 17:54:02 1998 Lars Hamann + + * gtk/gtkclist.c (scroll_vertical): fix to avoid flicker at begin/end + of list + Fri Jul 17 05:30:47 1998 Tim Janik * gtk/gtksignal.c (gtk_handlers_run) (gtk_signal_real_emit): @@ -32,6 +37,7 @@ Thu Jul 16 14:16:16 PDT 1998 Manish Singh it; --libs strips out redundant -L's properly (there was code in there to do it before, but it didn't work) +>>>>>>> 1.528 Thu Jul 16 18:24:41 1998 Tim Janik * gtk/gtknotebook.h: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 6633e39bc..25444e512 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +Fri Jul 17 17:54:02 1998 Lars Hamann + + * gtk/gtkclist.c (scroll_vertical): fix to avoid flicker at begin/end + of list + Fri Jul 17 05:30:47 1998 Tim Janik * gtk/gtksignal.c (gtk_handlers_run) (gtk_signal_real_emit): @@ -32,6 +37,7 @@ Thu Jul 16 14:16:16 PDT 1998 Manish Singh it; --libs strips out redundant -L's properly (there was code in there to do it before, but it didn't work) +>>>>>>> 1.528 Thu Jul 16 18:24:41 1998 Tim Janik * gtk/gtknotebook.h: diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 6633e39bc..25444e512 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,8 @@ +Fri Jul 17 17:54:02 1998 Lars Hamann + + * gtk/gtkclist.c (scroll_vertical): fix to avoid flicker at begin/end + of list + Fri Jul 17 05:30:47 1998 Tim Janik * gtk/gtksignal.c (gtk_handlers_run) (gtk_signal_real_emit): @@ -32,6 +37,7 @@ Thu Jul 16 14:16:16 PDT 1998 Manish Singh it; --libs strips out redundant -L's properly (there was code in there to do it before, but it didn't work) +>>>>>>> 1.528 Thu Jul 16 18:24:41 1998 Tim Janik * gtk/gtknotebook.h: diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 6633e39bc..25444e512 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +Fri Jul 17 17:54:02 1998 Lars Hamann + + * gtk/gtkclist.c (scroll_vertical): fix to avoid flicker at begin/end + of list + Fri Jul 17 05:30:47 1998 Tim Janik * gtk/gtksignal.c (gtk_handlers_run) (gtk_signal_real_emit): @@ -32,6 +37,7 @@ Thu Jul 16 14:16:16 PDT 1998 Manish Singh it; --libs strips out redundant -L's properly (there was code in there to do it before, but it didn't work) +>>>>>>> 1.528 Thu Jul 16 18:24:41 1998 Tim Janik * gtk/gtknotebook.h: diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 6633e39bc..25444e512 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +Fri Jul 17 17:54:02 1998 Lars Hamann + + * gtk/gtkclist.c (scroll_vertical): fix to avoid flicker at begin/end + of list + Fri Jul 17 05:30:47 1998 Tim Janik * gtk/gtksignal.c (gtk_handlers_run) (gtk_signal_real_emit): @@ -32,6 +37,7 @@ Thu Jul 16 14:16:16 PDT 1998 Manish Singh it; --libs strips out redundant -L's properly (there was code in there to do it before, but it didn't work) +>>>>>>> 1.528 Thu Jul 16 18:24:41 1998 Tim Janik * gtk/gtknotebook.h: diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 6633e39bc..25444e512 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +Fri Jul 17 17:54:02 1998 Lars Hamann + + * gtk/gtkclist.c (scroll_vertical): fix to avoid flicker at begin/end + of list + Fri Jul 17 05:30:47 1998 Tim Janik * gtk/gtksignal.c (gtk_handlers_run) (gtk_signal_real_emit): @@ -32,6 +37,7 @@ Thu Jul 16 14:16:16 PDT 1998 Manish Singh it; --libs strips out redundant -L's properly (there was code in there to do it before, but it didn't work) +>>>>>>> 1.528 Thu Jul 16 18:24:41 1998 Tim Janik * gtk/gtknotebook.h: diff --git a/gtk/gtkclist.c b/gtk/gtkclist.c index 07bba37c4..bf67c5760 100644 --- a/gtk/gtkclist.c +++ b/gtk/gtkclist.c @@ -5220,6 +5220,8 @@ scroll_vertical (GtkCList *clist, GtkScrollType scroll_type, gfloat position) { + gint old_focus_row; + g_return_if_fail (clist != NULL); g_return_if_fail (GTK_IS_CLIST (clist)); @@ -5231,16 +5233,23 @@ scroll_vertical (GtkCList *clist, case GTK_SELECTION_EXTENDED: if (clist->anchor >= 0) return; - if (!GTK_CLIST_ADD_MODE (clist)) - gtk_clist_unselect_all (clist); case GTK_SELECTION_BROWSE: - if (clist->selection_mode == GTK_SELECTION_BROWSE) - unselect_row (clist,clist->focus_row, -1, NULL); - + old_focus_row = clist->focus_row; move_focus_row (clist, scroll_type, position); + if (old_focus_row != clist->focus_row) + { + if (clist->selection_mode == GTK_SELECTION_BROWSE) + unselect_row (clist,old_focus_row, -1, NULL); + else if (!GTK_CLIST_ADD_MODE (clist)) + { + gtk_clist_unselect_all (clist); + clist->undo_anchor = old_focus_row; + } + } + if (clist->selection_mode == GTK_SELECTION_EXTENDED && GTK_CLIST_ADD_MODE (clist)) return; @@ -5248,7 +5257,8 @@ scroll_vertical (GtkCList *clist, switch (gtk_clist_row_is_visible (clist, clist->focus_row)) { case GTK_VISIBILITY_NONE: - select_row (clist, clist->focus_row, -1, NULL); + if (old_focus_row != clist->focus_row) + select_row (clist, clist->focus_row, -1, NULL); switch (scroll_type) { case GTK_SCROLL_STEP_BACKWARD: @@ -5286,7 +5296,8 @@ scroll_vertical (GtkCList *clist, } default: - select_row (clist, clist->focus_row, -1, NULL); + if (old_focus_row != clist->focus_row) + select_row (clist, clist->focus_row, -1, NULL); break; } break; -- 2.43.2