Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/ev-sidebar-thumbnails.c
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2010-03-31 19:09:00 (GMT)
committer Carlos Garcia Campos <carlosgc@gnome.org>2010-03-31 19:09:00 (GMT)
commit80aa207c49dda77a013f0df2a2e2a393062a96b6 (patch)
tree8bc68cd259cd466866c1713547fd32f12654201a /shell/ev-sidebar-thumbnails.c
parent7e11393f41b7c3df86e1562bcc08a42b05c19a6f (diff)
[shell] Fix build with GSEAL_ENABLE
Diffstat (limited to 'shell/ev-sidebar-thumbnails.c')
-rw-r--r--shell/ev-sidebar-thumbnails.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/shell/ev-sidebar-thumbnails.c b/shell/ev-sidebar-thumbnails.c
index ad2c09f..b60aa71 100644
--- a/shell/ev-sidebar-thumbnails.c
+++ b/shell/ev-sidebar-thumbnails.c
@@ -499,6 +499,8 @@ adjustment_changed_cb (EvSidebarThumbnails *sidebar_thumbnails)
EvSidebarThumbnailsPrivate *priv = sidebar_thumbnails->priv;
GtkTreePath *path = NULL;
GtkTreePath *path2 = NULL;
+ gdouble page_size;
+ gdouble value;
gint wy1;
gint wy2;
@@ -506,18 +508,22 @@ adjustment_changed_cb (EvSidebarThumbnails *sidebar_thumbnails)
if (!gtk_widget_get_mapped (GTK_WIDGET (sidebar_thumbnails)))
return;
- if (priv->vadjustment->page_size == 0)
+ page_size = gtk_adjustment_get_page_size (priv->vadjustment);
+
+ if (page_size == 0)
return;
+
+ value = gtk_adjustment_get_value (priv->vadjustment);
if (priv->tree_view) {
if (! gtk_widget_get_realized (priv->tree_view))
return;
gtk_tree_view_convert_tree_to_bin_window_coords (GTK_TREE_VIEW (priv->tree_view),
- 0, (int) priv->vadjustment->value,
+ 0, (int) value,
NULL, &wy1);
gtk_tree_view_convert_tree_to_bin_window_coords (GTK_TREE_VIEW (priv->tree_view),
- 0, (int) (priv->vadjustment->value + priv->vadjustment->page_size),
+ 0, (int) (value + page_size),
NULL, &wy2);
gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (priv->tree_view),
1, wy1 + 1, &path,