[gnome-documents] sidebar-thumbnails: don't set icon view columns to G_MAXINT



commit 8693f4dc5f6fa1923d00703a14d8f548a7af633c
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Fri Jun 22 15:45:57 2012 -0400

    sidebar-thumbnails: don't set icon view columns to G_MAXINT
    
    GTK+ behavior wrt. this has changed since commit
    d406bf96d4bb1191b05f1ddb374c2f57138c8d45, but it was a hack in the first
    place. GTK+ shouldn't probably crash if we do that anyway, but in the
    meantime, set this value to the number of items of the document
    displayed.

 src/lib/gd-sidebar-thumbnails.c |    2 ++
 src/lib/gd-thumb-nav.c          |    5 -----
 2 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/src/lib/gd-sidebar-thumbnails.c b/src/lib/gd-sidebar-thumbnails.c
index fdfcd5e..8619e15 100644
--- a/src/lib/gd-sidebar-thumbnails.c
+++ b/src/lib/gd-sidebar-thumbnails.c
@@ -739,6 +739,8 @@ gd_sidebar_thumbnails_document_changed_cb (EvDocumentModel     *model,
 						     (GDestroyNotify)g_free,
 						     (GDestroyNotify)g_object_unref);
 
+	gtk_icon_view_set_columns (GTK_ICON_VIEW (self), priv->n_pages);
+
 	gd_sidebar_thumbnails_clear_model (self);
 	gd_sidebar_thumbnails_fill_model (self);
 	gtk_widget_queue_resize (GTK_WIDGET (self));
diff --git a/src/lib/gd-thumb-nav.c b/src/lib/gd-thumb-nav.c
index afed2be..7e0e8d9 100644
--- a/src/lib/gd-thumb-nav.c
+++ b/src/lib/gd-thumb-nav.c
@@ -286,11 +286,6 @@ gd_thumb_nav_constructed (GObject *object)
 	if (priv->thumbview != NULL) {
 		gtk_container_add (GTK_CONTAINER (priv->sw), priv->thumbview);
 		gtk_widget_show_all (priv->sw);
-
-		gtk_icon_view_set_columns (GTK_ICON_VIEW (priv->thumbview),
-					   G_MAXINT);
-
-		gtk_widget_set_size_request (priv->thumbview, -1, -1);
 		gd_sidebar_thumbnails_set_item_height (GD_SIDEBAR_THUMBNAILS (priv->thumbview),
 						       115);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]