X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=shell%2Fev-sidebar-thumbnails.c;h=362ef48028d53ccf669ee6232b8f7259aa69dd0f;hb=65c06150e05948eb7b056b0ec5cb9c364b652cfe;hp=93f4150483b0859266ee5dc5e3196d3a9fb71464;hpb=6f98f83c02032b7f164fa6a497ad8069f60bf642;p=evince.git diff --git a/shell/ev-sidebar-thumbnails.c b/shell/ev-sidebar-thumbnails.c index 93f41504..362ef480 100644 --- a/shell/ev-sidebar-thumbnails.c +++ b/shell/ev-sidebar-thumbnails.c @@ -101,17 +101,24 @@ ev_sidebar_thumbnails_dispose (GObject *object) EvSidebarThumbnails *sidebar_thumbnails = EV_SIDEBAR_THUMBNAILS (object); ev_sidebar_thumbnails_clear_model (sidebar_thumbnails); - g_object_unref (sidebar_thumbnails->priv->loading_icon); - g_object_unref (sidebar_thumbnails->priv->list_store); - + if (sidebar_thumbnails->priv->loading_icon) { + g_object_unref (sidebar_thumbnails->priv->loading_icon); + sidebar_thumbnails->priv->loading_icon = NULL; + } + + if (sidebar_thumbnails->priv->list_store) { + g_object_unref (sidebar_thumbnails->priv->list_store); + sidebar_thumbnails->priv->list_store = NULL; + } + G_OBJECT_CLASS (ev_sidebar_thumbnails_parent_class)->dispose (object); } static void ev_sidebar_thumbnails_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec) + guint prop_id, + GValue *value, + GParamSpec *pspec) { EvSidebarThumbnails *sidebar = EV_SIDEBAR_THUMBNAILS (object); @@ -222,7 +229,8 @@ add_range (EvSidebarThumbnails *sidebar_thumbnails, -1); if (job == NULL && !thumbnail_set) { - job = (EvJobThumbnail *)ev_job_thumbnail_new (priv->document, page, THUMBNAIL_WIDTH); + /* FIXME: Need rotation */ + job = (EvJobThumbnail *)ev_job_thumbnail_new (priv->document, page, 0, THUMBNAIL_WIDTH); ev_job_queue_add_job (EV_JOB (job), EV_JOB_PRIORITY_HIGH); g_object_set_data_full (G_OBJECT (job), "tree_iter", gtk_tree_iter_copy (&iter), @@ -300,7 +308,8 @@ adjustment_changed_cb (EvSidebarThumbnails *sidebar_thumbnails) #ifdef HAVE_GTK_ICON_VIEW_GET_VISIBLE_RANGE if (! GTK_WIDGET_REALIZED (priv->icon_view)) return; - gtk_icon_view_get_visible_range (GTK_ICON_VIEW (priv->icon_view), &path, &path2); + if (! gtk_icon_view_get_visible_range (GTK_ICON_VIEW (priv->icon_view), &path, &path2)) + return; #else g_assert_not_reached (); #endif