aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-tree.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-03-06 01:33:49 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:41:41 +0800
commit7aacf983b32ecac26bc9707697da622b3ef164a3 (patch)
tree754e32b12d21674efa6d55c7a1c8727477197dd4 /mail/em-folder-tree.c
parentbca1a2c5ea655a8cfacedadf8a9a6c6b62d2b0ab (diff)
downloadgsoc2013-evolution-7aacf983b32ecac26bc9707697da622b3ef164a3.tar.gz
gsoc2013-evolution-7aacf983b32ecac26bc9707697da622b3ef164a3.tar.zst
gsoc2013-evolution-7aacf983b32ecac26bc9707697da622b3ef164a3.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'mail/em-folder-tree.c')
-rw-r--r--mail/em-folder-tree.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index ee853331bf..81803b53a3 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -1453,7 +1453,8 @@ folder_tree_init (EMFolderTree *folder_tree)
select_uris_table = g_hash_table_new (g_str_hash, g_str_equal);
- folder_tree->priv = G_TYPE_INSTANCE_GET_PRIVATE (folder_tree, EM_TYPE_FOLDER_TREE, EMFolderTreePrivate);
+ folder_tree->priv = G_TYPE_INSTANCE_GET_PRIVATE (
+ folder_tree, EM_TYPE_FOLDER_TREE, EMFolderTreePrivate);
folder_tree->priv->select_uris_table = select_uris_table;
tree_view = GTK_TREE_VIEW (folder_tree);
@@ -2423,28 +2424,33 @@ tree_autoscroll (EMFolderTree *folder_tree)
GtkTreeView *tree_view;
GdkRectangle rect;
GdkWindow *window;
+ gdouble value;
gint offset, y;
- /* get the y pointer position relative to the treeview */
+ /* Get the y pointer position relative to the treeview. */
tree_view = GTK_TREE_VIEW (folder_tree);
window = gtk_tree_view_get_bin_window (tree_view);
gdk_window_get_pointer (window, NULL, &y, NULL);
- /* rect is in coorinates relative to the scrolled window relative to the treeview */
+ /* Rect is in coorinates relative to the scrolled window,
+ * relative to the treeview. */
gtk_tree_view_get_visible_rect (tree_view, &rect);
- /* move y into the same coordinate system as rect */
+ /* Move y into the same coordinate system as rect. */
y += rect.y;
- /* see if we are near the top edge */
- if ((offset = y - (rect.y + 2 * SCROLL_EDGE_SIZE)) > 0) {
- /* see if we are near the bottom edge */
- if ((offset = y - (rect.y + rect.height - 2 * SCROLL_EDGE_SIZE)) < 0)
+ /* See if we are near the top edge. */
+ offset = y - (rect.y + 2 * SCROLL_EDGE_SIZE);
+ if (offset > 0) {
+ /* See if we are near the bottom edge. */
+ offset = y - (rect.y + rect.height - 2 * SCROLL_EDGE_SIZE);
+ if (offset < 0)
return TRUE;
}
adjustment = gtk_tree_view_get_vadjustment (tree_view);
- gtk_adjustment_set_value (adjustment, MAX (gtk_adjustment_get_value (adjustment) + offset, 0.0));
+ value = gtk_adjustment_get_value (adjustment);
+ gtk_adjustment_set_value (adjustment, MAX (value + offset, 0.0));
return TRUE;
}