]> git.street.me.uk Git - andy/viking.git/blobdiff - src/print-preview.c
Add Refresh to consider reloading a Mapnik Rendering configuration.
[andy/viking.git] / src / print-preview.c
index f14cad112e660c2bf31926d97992b5de8d04356d..0ac7ab624ea1fa9ebeb5957cb1b6b89218a47005 100644 (file)
@@ -21,8 +21,6 @@
 
 #include <gtk/gtk.h>
 
 
 #include <gtk/gtk.h>
 
-#if GTK_CHECK_VERSION(2,10,0)
-
 #include "print-preview.h"
 
 
 #include "print-preview.h"
 
 
@@ -497,8 +495,10 @@ vik_print_preview_expose_event (GtkWidget        *widget,
 
       if (preview->pixbuf == NULL)
         {
 
       if (preview->pixbuf == NULL)
         {
-          gint width  = MIN (widget->allocation.width, 1024);
-          gint height = MIN (widget->allocation.height, 1024);
+          GtkAllocation allocation;
+          gtk_widget_get_allocation ( widget, &allocation );
+          gint width  = MIN (allocation.width, 1024);
+          gint height = MIN (allocation.height, 1024);
 
           preview->pixbuf = get_thumbnail(drawable, width, height);
         }
 
           preview->pixbuf = get_thumbnail(drawable, width, height);
         }
@@ -588,5 +588,3 @@ print_preview_queue_draw (VikPrintPreview *preview)
 {
   gtk_widget_queue_draw (GTK_WIDGET (preview->area));
 }
 {
   gtk_widget_queue_draw (GTK_WIDGET (preview->area));
 }
-
-#endif