X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;ds=inline;f=shell%2Fev-sidebar-thumbnails.c;h=08be12b2fab9283c86748935d9e237fd66d123cf;hb=b59f53187ed898327f3f6a159d523c5fffaa2395;hp=9c0e21728d7ec3abc5390c92059dac50cba23691;hpb=5b55c6afc5ba271aea0e04fa00ff92291290260c;p=evince.git diff --git a/shell/ev-sidebar-thumbnails.c b/shell/ev-sidebar-thumbnails.c index 9c0e2172..08be12b2 100644 --- a/shell/ev-sidebar-thumbnails.c +++ b/shell/ev-sidebar-thumbnails.c @@ -371,22 +371,12 @@ adjustment_changed_cb (EvSidebarThumbnails *sidebar_thumbnails) if (! GTK_WIDGET_REALIZED (priv->tree_view)) return; -#if GTK_CHECK_VERSION (2, 11, 3) gtk_tree_view_convert_tree_to_bin_window_coords (GTK_TREE_VIEW (priv->tree_view), 0, (int) priv->vadjustment->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), NULL, &wy2); -#else - gtk_tree_view_tree_to_widget_coords (GTK_TREE_VIEW (priv->tree_view), - 0, (int) priv->vadjustment->value, - NULL, &wy1); - gtk_tree_view_tree_to_widget_coords (GTK_TREE_VIEW (priv->tree_view), - 0, (int) (priv->vadjustment->value + priv->vadjustment->page_size), - NULL, &wy2); -#endif /* GTK_CHECK_VERSION (2, 11, 3) */ - gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (priv->tree_view), 1, wy1 + 1, &path, NULL, NULL, NULL); @@ -603,11 +593,11 @@ ev_sidebar_thumbnails_init (EvSidebarThumbnails *ev_sidebar_thumbnails) gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (priv->swindow), GTK_SHADOW_IN); priv->vadjustment = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (priv->swindow)); - g_signal_connect_data (G_OBJECT (priv->vadjustment), "value-changed", + g_signal_connect_data (priv->vadjustment, "value-changed", G_CALLBACK (adjustment_changed_cb), ev_sidebar_thumbnails, NULL, G_CONNECT_SWAPPED | G_CONNECT_AFTER); - g_signal_connect_swapped (G_OBJECT (priv->swindow), "size-allocate", + g_signal_connect_swapped (priv->swindow, "size-allocate", G_CALLBACK (adjustment_changed_cb), ev_sidebar_thumbnails); gtk_box_pack_start (GTK_BOX (ev_sidebar_thumbnails), priv->swindow, TRUE, TRUE, 0);