2007-09-19 [colin] 3.0.1cvs10
authorColin Leroy <colin@colino.net>
Wed, 19 Sep 2007 17:15:14 +0000 (17:15 +0000)
committerColin Leroy <colin@colino.net>
Wed, 19 Sep 2007 17:15:14 +0000 (17:15 +0000)
* src/printing.c
Fix drawing area size, fix DPI change that
can cause total number of lines to decrease

ChangeLog
PATCHSETS
configure.ac
src/printing.c

index 34208760cb0db09f0c57fd5765b0a0c180acf3e9..45d96ed8d543daa89a0979d57dcf147b1cfac56d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-09-19 [colin]     3.0.1cvs10
+
+       * src/printing.c
+               Fix drawing area size, fix DPI change that
+               can cause total number of lines to decrease
+
 2007-09-19 [colin]     3.0.1cvs9
 
        * po/POTFILES.in
index 41fdd2e383961de36f03caf4d322c13b21008b8d..49f6d69c99da1ec1733a3ba2835e5b80f504f2c5 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.204.2.147 -r 1.204.2.148 src/prefs_common.c;  cvs diff -u -r 1.103.2.93 -r 1.103.2.94 src/prefs_common.h;  cvs diff -u -r 1.1.2.9 -r 1.1.2.10 src/prefs_image_viewer.c;  cvs diff -u -r 1.1.2.2 -r 1.1.2.3 src/printing.c;  ) > 3.0.1cvs7.patchset
 ( cvs diff -u -r 1.204.2.148 -r 1.204.2.149 src/prefs_common.c;  cvs diff -u -r 1.103.2.94 -r 1.103.2.95 src/prefs_common.h;  cvs diff -u -r 1.1.2.3 -r 1.1.2.4 src/printing.c;  ) > 3.0.1cvs8.patchset
 ( cvs diff -u -r 1.53.2.28 -r 1.53.2.29 po/POTFILES.in;  cvs diff -u -r 1.1.2.4 -r 1.1.2.5 src/printing.c;  ) > 3.0.1cvs9.patchset
+( cvs diff -u -r 1.1.2.5 -r 1.1.2.6 src/printing.c;  ) > 3.0.1cvs10.patchset
index 29851b348d5e907f5294633181259ac60e26678e..58c699f03ae4d9d9dcc191aa1e9171d1f7ac94c4 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=0
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=9
+EXTRA_VERSION=10
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 31078d5faa65fef184c61ad422da79b7cf935710..e8c38ddb58d8129cbae2896c06dd28e00cbeff42 100644 (file)
@@ -299,7 +299,6 @@ static gboolean cb_preview(GtkPrintOperation        *operation,
   gtk_box_pack_start(GTK_BOX(vbox), scrolled_window, TRUE, TRUE, 0);
   da = gtk_drawing_area_new();
   gtk_widget_set_double_buffered(da, FALSE);
-  gtk_widget_set_size_request(GTK_WIDGET(da), 400, 500);
   gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolled_window),
                                        da);
   gtk_widget_realize(da);
@@ -433,19 +432,10 @@ static void cb_preview_got_page_size(GtkPrintOperationPreview *preview,
     preview_height = paper_width;
   }
 
-  cr = gdk_cairo_create(preview_data->area->window);  
-
-  dpi_x = preview_data->area->allocation.width/preview_width;
-  dpi_y = preview_data->area->allocation.height/preview_height;
-
-  if((fabs(dpi_x - preview_data->dpi_x) > 0.001) ||
-     (fabs (dpi_y - preview_data->dpi_y) > 0.001))   {
-    gtk_print_context_set_cairo_context(context, cr, dpi_x, dpi_y);
-    preview_data->dpi_x = dpi_x;
-    preview_data->dpi_y = dpi_y;
-  }
-  pango_cairo_update_layout(cr, preview_data->print_data->layout);
-  cairo_destroy(cr);
+  debug_print("w/h %f/%f\n", paper_width * PREVIEW_SCALE, paper_height * PREVIEW_SCALE);
+  gtk_widget_set_size_request(GTK_WIDGET(preview_data->area), 
+                 (gint) paper_width * PREVIEW_SCALE, 
+                 (gint) paper_height * PREVIEW_SCALE);
 }
 
 static gboolean cb_preview_expose(GtkWidget *widget, GdkEventExpose *event,