aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-tree.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-02-23 22:53:40 +0800
committerMilan Crha <mcrha@redhat.com>2011-02-23 22:53:40 +0800
commit7a7d6cd2f114e93fe321865abffd297d8743651b (patch)
tree369f7eb89d6b5a1b5fa5ab66cb016f4a3a99a013 /mail/em-folder-tree.c
parent56fa4795bbb46d17c90ca9f02ca8b4d64a8289f1 (diff)
downloadgsoc2013-evolution-7a7d6cd2f114e93fe321865abffd297d8743651b.tar.gz
gsoc2013-evolution-7a7d6cd2f114e93fe321865abffd297d8743651b.tar.zst
gsoc2013-evolution-7a7d6cd2f114e93fe321865abffd297d8743651b.zip
Bug #641343 - Cannot scroll to bottom of folder list while dragging
Diffstat (limited to 'mail/em-folder-tree.c')
-rw-r--r--mail/em-folder-tree.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index 69a34357a6..86a0bda6d6 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -2427,9 +2427,6 @@ tree_autoscroll (EMFolderTree *folder_tree)
GdkRectangle rect;
GdkWindow *window;
gint offset, y;
- gdouble page_size;
- gdouble upper;
- gdouble value;
/* get the y pointer position relative to the treeview */
tree_view = GTK_TREE_VIEW (folder_tree);
@@ -2450,13 +2447,7 @@ tree_autoscroll (EMFolderTree *folder_tree)
}
adjustment = gtk_tree_view_get_vadjustment (tree_view);
-
- page_size = gtk_adjustment_get_value (adjustment);
- upper = gtk_adjustment_get_upper (adjustment);
- value = gtk_adjustment_get_value (adjustment);
-
- value = CLAMP (value + offset, 0.0, upper - page_size);
- gtk_adjustment_set_value (adjustment, value);
+ gtk_adjustment_set_value (adjustment, MAX (gtk_adjustment_get_value (adjustment) + offset, 0.0));
return TRUE;
}