Only show the GtkImage when we have rendered a page to it.
authorTilman Sauerbeck <tilman@code-monkey.de>
Sun, 22 Apr 2007 17:15:18 +0000 (19:15 +0200)
committerTilman Sauerbeck <tilman@code-monkey.de>
Sun, 22 Apr 2007 17:15:18 +0000 (19:15 +0200)
src/rakt-window.c

index 5e7b3ab0e020c06e5ab4c3c271fad184a1a6050a..9f45644dd918818f1350b79b83f5836dcbedafe8 100644 (file)
@@ -156,6 +156,7 @@ render_page (RaktWindow *window)
        poppler_page_render_to_pixbuf (page, 0, 0, width, height, 1.0, 0,
                                       priv->pixbuf);
        gtk_image_set_from_pixbuf (GTK_IMAGE (priv->image), priv->pixbuf);
+       gtk_widget_show (priv->image);
 }
 
 static void
@@ -241,7 +242,6 @@ rakt_window_init (RaktWindow *window)
 
        priv->image = gtk_image_new ();
 
-       gtk_widget_show (priv->image);
        gtk_box_pack_start (GTK_BOX (priv->content_vbox), priv->image,
                            TRUE, TRUE, 0);