]> www.fi.muni.cz Git - evince.git/commitdiff
Added. Returns whether the animation has everything necessary to run. Do
authorCarlos Garnacho <carlosg@gnome.org>
Fri, 29 Feb 2008 09:23:30 +0000 (09:23 +0000)
committerCarlos Garnacho <carlosg@src.gnome.org>
Fri, 29 Feb 2008 09:23:30 +0000 (09:23 +0000)
2008-02-29  Carlos Garnacho  <carlosg@gnome.org>

        * shell/ev-transition-animation.[ch] (ev_transition_animation_ready):
        Added. Returns whether the animation has everything necessary to run.
        * shell/ev-view.c (ev_view_expose_event): Do not assume the animation
        is ready just because it's been created. Fixes #519106.
        (draw_one_page): Do not show the "Loading..." text in presentation
        mode, there was a slim probability that this could happen.

svn path=/trunk/; revision=2933

ChangeLog
shell/ev-transition-animation.c
shell/ev-transition-animation.h
shell/ev-view.c

index 1517b4b1d7537514e750739a78660a7d313dedf0..8cd1d17c93624bd078207b5ee7e186468476e3c8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2008-02-29  Carlos Garnacho  <carlosg@gnome.org>
+
+       * shell/ev-transition-animation.[ch] (ev_transition_animation_ready):
+       Added. Returns whether the animation has everything necessary to run.
+       * shell/ev-view.c (ev_view_expose_event): Do not assume the animation
+       is ready just because it's been created. Fixes #519106.
+       (draw_one_page): Do not show the "Loading..." text in presentation
+       mode, there was a slim probability that this could happen.
+
 2008-02-27  Carlos Garcia Campos  <carlosgc@gnome.org>
 
        * libdocument/ev-document-factory.c: (get_mime_type_from_uri):
index 5bea280c9bcc52d1f346dda20f6f6b91ddf40164..148b4c7734eccaba3e576e1f1ec5ef060ce722e3 100644 (file)
@@ -668,3 +668,15 @@ ev_transition_animation_set_dest_surface (EvTransitionAnimation *animation,
        if (priv->origin_surface && priv->dest_surface)
                ev_timeline_start (EV_TIMELINE (animation));
 }
+
+gboolean
+ev_transition_animation_ready (EvTransitionAnimation *animation)
+{
+       EvTransitionAnimationPriv *priv;
+
+       g_return_val_if_fail (EV_IS_TRANSITION_ANIMATION (animation), FALSE);
+
+       priv = EV_TRANSITION_ANIMATION_GET_PRIVATE (animation);
+
+       return (priv->origin_surface && priv->dest_surface);
+}
index b07619fe2108c4f7681c8746005ba1e3d7f60562..522caf28872210670d9c795eed962806134a2cb4 100644 (file)
@@ -60,6 +60,8 @@ gint                    ev_transition_animation_get_page_to        (EvTransition
 void                    ev_transition_animation_paint              (EvTransitionAnimation *animation,
                                                                    cairo_t               *cr,
                                                                    GdkRectangle           page_area);
+gboolean                ev_transition_animation_ready              (EvTransitionAnimation *animation);
+
 
 G_END_DECLS
 
index 3b7a60dd30a32eea400bb41bb7ca30d884dd907c..129d87c334928e2599ec1c020d5457f3704cad82 100644 (file)
@@ -2483,7 +2483,7 @@ ev_view_expose_event (GtkWidget      *widget,
        cairo_t *cr;
        gint     i;
 
-       if (view->animation) {
+       if (view->animation && ev_transition_animation_ready (view->animation)) {
                GdkRectangle page_area;
                GtkBorder    border;
 
@@ -3739,9 +3739,12 @@ draw_one_page (EvView       *view,
                page_surface = ev_pixbuf_cache_get_surface (view->pixbuf_cache, page);
 
                if (!page_surface) {
-                       draw_loading_text (view,
-                                          &real_page_area,
-                                          expose_area);
+                       if (!view->presentation) {
+                               draw_loading_text (view,
+                                                  &real_page_area,
+                                                  expose_area);
+                       }
+
                        *page_ready = FALSE;
 
                        return;