<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>src/model/wire.c-darcs-backup0</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -15,15 +15,13 @@ opts.Add (PackageOption ('DESTDIR', 'System base installation path', '/'));
 
 # Dependencies #
 deps = []
-deps.append ({'lib': 'gtk+-2.0',            'ver': '2.8.0'})
+deps.append ({'lib': 'gtk+-2.0',            'ver': '2.10.0'})
 deps.append ({'lib': 'libglade-2.0',        'ver': '2.5.0'})
 deps.append ({'lib': 'libgnomeui-2.0',      'ver': '2.12.0'})
-deps.append ({'lib': 'libgnomeprint-2.2',   'ver': '2.12.0'})
 deps.append ({'lib': 'libxml-2.0',          'ver': '2.6.0'})
 deps.append ({'lib': 'libgnomecanvas-2.0',  'ver': '2.12.0'})
 deps.append ({'lib': 'gtksourceview-1.0',   'ver': '1.0'})
 deps.append ({'lib': 'cairo',               'ver': '1.0.0'})
-deps.append ({'lib': 'libgnomeprintui-2.2', 'ver': '2.12.0'})
 
 # CUSTOM CHECK FUNC #
 def CheckPkg (context, pkg, version):</diff>
      <filename>SConstruct</filename>
    </modified>
    <modified>
      <diff>@@ -4,7 +4,6 @@ Import ('CEnv')
 resources = Split (&quot;&quot;&quot;
 	clamp-properties-dialog.glade2
 	log-window.glade2
-	page-properties.glade2
 	part-browser.glade2
 	part-properties-dialog.glade2
 	plot-add-function.glade2</diff>
      <filename>data/dialogs/SConscript</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,5 @@
 data/dialogs/clamp-properties-dialog.glade2
 data/dialogs/log-window.glade2
-data/dialogs/page-properties.glade2
 data/dialogs/part-browser.glade2
 data/dialogs/part-properties-dialog.glade2
 data/dialogs/plot-window.glade2
@@ -31,7 +30,6 @@ src/schematic-view.c
 src/schematic-view-ui.h
 src/save-schematic.c
 src/pspice2oregano.c
-src/print.c
 src/plot.c
 src/part-browser.c
 src/oregano-utils.c</diff>
      <filename>po/POTFILES.in</filename>
    </modified>
    <modified>
      <diff>@@ -44,7 +44,6 @@ files = Split (&quot;&quot;&quot;clipboard.c
 	part-browser.c
 	plot-add-function.c
 	plot.c
-	print.c
 	save-schematic.c
 	schematic-view.c
 	settings.c</diff>
      <filename>src/SConscript</filename>
    </modified>
    <modified>
      <diff>@@ -33,7 +33,6 @@
 #include &lt;gnome.h&gt;
 #include &quot;item-data.h&quot;
 #include &quot;node-store.h&quot;
-#include &quot;print.h&quot;
 
 static void item_data_class_init(ItemDataClass *klass);
 static void item_data_init(ItemData *item_data);
@@ -542,17 +541,17 @@ item_data_has_properties (ItemData *data)
 }
 
 void
-item_data_print (ItemData *data, OreganoPrintContext *ctxt)
+item_data_print (ItemData *data, cairo_t *cr)
 {
 	ItemDataClass *id_class;
 
 	g_return_if_fail (data != NULL);
 	g_return_if_fail (IS_ITEM_DATA (data));
-	g_return_if_fail (ctxt != NULL);
+	g_return_if_fail (cr != NULL);
 
 	id_class = ITEM_DATA_CLASS (G_OBJECT_GET_CLASS (data));
 	if (id_class-&gt;print) {
-		id_class-&gt;print (data, ctxt);
+		id_class-&gt;print (data, cr);
 	}
 }
 </diff>
      <filename>src/model/item-data.c</filename>
    </modified>
    <modified>
      <diff>@@ -37,8 +37,8 @@
  */
 
 #include &lt;gnome.h&gt;
+#include &lt;cairo/cairo.h&gt;
 #include &quot;sheet-pos.h&quot;
-#include &quot;print.h&quot;
 
 #define TYPE_ITEM_DATA			  (item_data_get_type())
 #define ITEM_DATA(obj)			  (G_TYPE_CHECK_INSTANCE_CAST((obj), TYPE_ITEM_DATA, ItemData))
@@ -80,7 +80,7 @@ struct _ItemDataClass
 	void (*set_property) (ItemData *data, char *property, char *value);
 	gboolean (*has_properties) (ItemData *data);
 
-	void (*print) (ItemData *data, OreganoPrintContext *ctxt);
+	void (*print) (ItemData *data, cairo_t *cr);
 };
 
 GType	  item_data_get_type (void);
@@ -143,7 +143,7 @@ void item_data_set_property (ItemData *data, char *property, char *value);
  * This method implement the GnomePrint stuff for schematic print of
  * an item.
  */
-void item_data_print (ItemData *data, OreganoPrintContext *ctxt);
+void item_data_print (ItemData *data, cairo_t *cr);
 
 
 #endif</diff>
      <filename>src/model/item-data.h</filename>
    </modified>
    <modified>
      <diff>@@ -38,7 +38,6 @@
 #include &quot;wire.h&quot;
 #include &quot;wire-private.h&quot;
 #include &quot;item-data.h&quot;
-#include &quot;print.h&quot;
 
 /*
  * NODE_EPSILON is used to check for intersection.
@@ -1141,7 +1140,7 @@ node_store_count_items (NodeStore *store, ArtDRect *rect)
 }
 
 void
-node_store_print_items (NodeStore *store, OreganoPrintContext *opc, ArtDRect *rect)
+node_store_print_items (NodeStore *store, cairo_t *cr, ArtDRect *rect)
 {
 	GList *list;
 	SheetPos p1, p2;
@@ -1149,23 +1148,18 @@ node_store_print_items (NodeStore *store, OreganoPrintContext *opc, ArtDRect *re
 
 	g_return_if_fail (store != NULL);
 	g_return_if_fail (IS_NODE_STORE (store));
-	g_return_if_fail (rect != NULL);
 
+	cairo_set_line_join (cr, CAIRO_LINE_JOIN_ROUND);
 	for (list = store-&gt;items; list; list = list-&gt;next) {
 		data = ITEM_DATA (list-&gt;data);
-		item_data_get_absolute_bbox (data, &amp;p1, &amp;p2);
-//		if (p1.x &gt;= rect-&gt;x0 &amp;&amp; p1.y &gt;= rect-&gt;y0 &amp;&amp; p2.x &lt;= rect-&gt;x1 &amp;&amp; p2.y &lt;= rect-&gt;y1) {
-		if ((p1.x &lt;= rect-&gt;x1) &amp;&amp; (p1.y &lt;= rect-&gt;y1) &amp;&amp;
-			(p2.x &gt;= rect-&gt;x0) &amp;&amp; (p2.y &gt;= rect-&gt;y0)) {
-			item_data_print (data, opc);
-		}
+		item_data_print (data, cr);
 	}
 }
 
 void
-node_store_print_labels (NodeStore *store, OreganoPrintContext *opc, ArtDRect *rect)
+node_store_print_labels (NodeStore *store, cairo_t *opc, ArtDRect *rect)
 {
-	GList *list;
+/*	GList *list;
 	SheetPos p1, p2;
 	ItemData *data;
 
@@ -1182,6 +1176,7 @@ node_store_print_labels (NodeStore *store, OreganoPrintContext *opc, ArtDRect *r
 			item_data_print (data, opc);
 		}
 	}
+*/
 }
 
 int</diff>
      <filename>src/model/node-store.c</filename>
    </modified>
    <modified>
      <diff>@@ -33,7 +33,6 @@
 #include &lt;glib.h&gt;
 #include &lt;glib-object.h&gt;
 #include &quot;sheet-pos.h&quot;
-#include &quot;print.h&quot;
 
 #define TYPE_NODE_STORE			  node_store_get_type ()
 #define NODE_STORE(obj)			  (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NODE_STORE, NodeStore))
@@ -91,10 +90,9 @@ GList	*node_store_get_nodes (NodeStore *store);
 void	 node_store_dump_wires (NodeStore *store);
 void	 node_store_get_bounds (NodeStore *store, ArtDRect *rect);
 gint	 node_store_count_items (NodeStore *store, ArtDRect *rect);
-void	 node_store_print_items (NodeStore *store,
-	OreganoPrintContext *opc, ArtDRect *rect);
+void	 node_store_print_items (NodeStore *store, cairo_t *opc, ArtDRect *rect);
 void	 node_store_print_labels (NodeStore *store,
-	OreganoPrintContext *opc, ArtDRect *rect);
+	cairo_t *opc, ArtDRect *rect);
 Node	 *node_store_get_or_create_node (NodeStore *store, SheetPos pos);
 
 #endif</diff>
      <filename>src/model/node-store.h</filename>
    </modified>
    <modified>
      <diff>@@ -42,7 +42,6 @@
 #include &quot;load-common.h&quot;
 #include &quot;load-library.h&quot;
 #include &quot;part-private.h&quot;
-#include &quot;print.h&quot;
 
 static void part_class_init (PartClass *klass);
 
@@ -76,7 +75,7 @@ static int part_register (ItemData *data);
 static void part_set_property (ItemData *data, char *property, char *value);
 
 static char *part_get_refdes_prefix (ItemData *data);
-static void part_print (ItemData *data, OreganoPrintContext *opc);
+static void part_print (ItemData *data, cairo_t *cr);
 
 enum {
 	ARG_0,
@@ -961,20 +960,18 @@ part_set_property (ItemData *data, char *property, char *value)
 }
 
 static void
-part_print (ItemData *data, OreganoPrintContext *opc)
+part_print (ItemData *data, cairo_t *cr)
 {
 	GSList *objects, *labels;
 	SymbolObject *object;
 	LibrarySymbol *symbol;
-	GnomeCanvasPoints *line;
 	double x0, y0;
-	ArtPoint dst, src;
-	double affine[6];
 	int i, rotation;
 	Part *part;
 	PartPriv *priv;
 	SheetPos pos;
 	IDFlip flip;
+	GnomeCanvasPoints *line;
 
 	g_return_if_fail (data != NULL);
 	g_return_if_fail (IS_PART (data));
@@ -982,26 +979,28 @@ part_print (ItemData *data, OreganoPrintContext *opc)
 	part = PART (data);
 	priv = part-&gt;priv;
 
+	symbol = library_get_symbol (priv-&gt;symbol_name);
+	if (symbol == NULL) {
+		return;
+	}
+
 	item_data_get_pos (ITEM_DATA (part), &amp;pos);
 	x0 = pos.x;
 	y0 = pos.y;
 
-	art_affine_identity (affine);
+	cairo_save (cr);
 
+	cairo_set_source_rgb (cr, 0, 0.7, 0);
 	rotation = part_get_rotation (part);
 	if (rotation != 0) {
-		art_affine_rotate (affine, rotation);
+		cairo_translate (cr, x0, y0);
+		cairo_rotate (cr, rotation*M_PI/180);
+		cairo_translate (cr, -x0, -y0);
 	}
 
 	flip = part_get_flip (part);
 	if (flip) {
-		art_affine_flip (affine, affine,
-			flip &amp; ID_FLIP_HORIZ, flip &amp; ID_FLIP_VERT);
-	}
-
-	symbol = library_get_symbol (priv-&gt;symbol_name);
-	if (symbol == NULL) {
-		return;
+		cairo_scale (cr, flip &amp; ID_FLIP_HORIZ, flip &amp; ID_FLIP_VERT);
 	}
 
 	for (objects = symbol-&gt;symbol_objects; objects; objects = objects-&gt;next) {
@@ -1009,7 +1008,6 @@ part_print (ItemData *data, OreganoPrintContext *opc)
 
 		switch (object-&gt;type) {
 			case SYMBOL_OBJECT_LINE:
-				gnome_print_setlinewidth (opc-&gt;ctx, 0);
 				line = object-&gt;u.uline.line;
 				for (i = 0; i &lt; line-&gt;num_points; i++) {
 					double x, y;
@@ -1017,18 +1015,10 @@ part_print (ItemData *data, OreganoPrintContext *opc)
 					x = line-&gt;coords[i * 2];
 					y = line-&gt;coords[i * 2 + 1];
 
-					if (rotation != 0 || flip != ID_FLIP_NONE) {
-						src.x = x;
-						src.y = y;
-						art_affine_point (&amp;dst, &amp;src, affine);
-						x = dst.x;
-						y = dst.y;
-					}
-
 					if (i == 0)
-						gnome_print_moveto (opc-&gt;ctx, x0 + x, y0 + y);
+						cairo_move_to (cr, x0 + x, y0 + y);
 					else
-						gnome_print_lineto (opc-&gt;ctx, x0 + x, y0 + y);
+						cairo_line_to (cr, x0 + x, y0 + y);
 				}
 			break;
 			case SYMBOL_OBJECT_ARC: {
@@ -1036,20 +1026,18 @@ part_print (ItemData *data, OreganoPrintContext *opc)
 				gdouble y1 = object-&gt;u.arc.y1;
 				gdouble x2 = object-&gt;u.arc.x2;
 				gdouble y2 = object-&gt;u.arc.y2;
-				gdouble width, height;
-				ArtPoint center;
+				gdouble width, height, x, y;
 
-				src.x = (x2 - x1) / 2 + x1;
-				src.y = (y2 - y1) / 2 + y1;
+				x = (x2 - x1) / 2 + x1;
+				y = (y2 - y1) / 2 + y1;
 				width = x2 - x1;
 				height = y2 - y1;
 
-				art_affine_point (&amp;center, &amp;src, affine);
-				center.x += x0;
-				center.y += y0;
-
-				gnome_print_setlinewidth (opc-&gt;ctx, 0);
-				print_draw_ellipse (opc-&gt;ctx, &amp;center, width, height);
+				cairo_save (cr);
+					cairo_translate (cr, x0 + x, y0 + y);
+					cairo_scale (cr, width / 2.0, height / 2.0);
+					cairo_arc (cr, 0.0, 0.0, 1.0, 0.0, 2 * M_PI);
+				cairo_restore (cr);
 			}
 			break;
 			default:
@@ -1060,63 +1048,44 @@ part_print (ItemData *data, OreganoPrintContext *opc)
 			continue;
 		}
 
-		gnome_print_stroke (opc-&gt;ctx);
-
-		for (labels = part_get_labels (part); labels; labels = labels-&gt;next) {
-			PartLabel *label = labels-&gt;data;
-			ArtPoint label_pos;
-			gchar *text;
-			gint text_width, text_height;
-
-			label_pos.x = label-&gt;pos.x;
-			label_pos.y = label-&gt;pos.y;
-
-			if (rotation != 0 || flip != ID_FLIP_NONE) {
-				src.x = label_pos.x;
-				src.y = label_pos.y;
-				art_affine_point (&amp;dst, &amp;src, affine);
-				label_pos.x = dst.x;
-				label_pos.y = dst.y;
-			}
-			
-			label_pos.x += x0;
-			label_pos.y += y0;
-
-			text = part_property_expand_macros (part, label-&gt;text);
-
-			text_height =
-				gnome_font_face_get_ascender(opc-&gt;label_font) +
-				gnome_font_face_get_descender(opc-&gt;label_font);
-			text_width = 5*strlen(text);
-			//gnome_font_get_width_string (opc-&gt;label_font, text);
+		cairo_stroke (cr);
+	}
 
-			/* Align the label. */
-			switch (rotation) {
+	/* We don't want to rotate labels text, only the (x,y)
+	 * coordinate
+	 */
+	for (labels = part_get_labels (part); labels; labels = labels-&gt;next) {
+		gdouble x, y;
+		PartLabel *label = (PartLabel *)labels-&gt;data;
+		gchar *text;
+		/* gint text_width, text_height; */
+
+		x = label-&gt;pos.x + x0;
+		y = label-&gt;pos.y + y0;
+
+		text = part_property_expand_macros (part, label-&gt;text);
+		/* Align the label.
+		switch (rotation) {
 			case 90:
-				/* North west */
-				label_pos.y += text_height*opc-&gt;scale;
+				y += text_height*opc-&gt;scale;
 			break;
 			case 180:
-				/* West */
 			break;
 			case 270:
-				/* South east */
-				label_pos.x -= text_width*opc-&gt;scale;
+				x -= text_width*opc-&gt;scale;
 			break;
 			case 0:
 			default:
-				/* South west */
 			break;
-			}
+		} */
 
-			gnome_print_setfont(opc-&gt;ctx,
-				gnome_font_face_get_font_default(
-				opc-&gt;label_font, 6)
-			);
-			print_draw_text (opc-&gt;ctx, text, &amp;label_pos);
-			g_free (text);
-		}
+		cairo_save (cr);
+			cairo_move_to (cr, x, y);
+			cairo_show_text (cr, text);
+		cairo_restore (cr);
+		g_free (text);
 	}
+	cairo_restore (cr);
 }
 
 </diff>
      <filename>src/model/part.c</filename>
    </modified>
    <modified>
      <diff>@@ -603,7 +603,7 @@ schematic_read (char *name, GError **out_error)
 	if (error != NULL) {
 		g_propagate_error (out_error, error);
 		g_object_unref(G_OBJECT(new_sm));
-		return;
+		return NULL;
 	}
 
 	if (ret) {
@@ -864,3 +864,76 @@ schematic_get_lowest_available_refdes2 (Schematic *schematic, char *prefix)
 }
 */
 
+static void
+draw_page (GtkPrintOperation *operation,
+	GtkPrintContext *context, int page_nr, Schematic *sm)
+{
+	NodeStore *store;
+	ArtDRect bbox;
+	gdouble page_w, page_h;
+	gdouble circuit_w, circuit_h;
+	gdouble scale, scalew, scaleh;
+	
+	page_w = gtk_print_context_get_width (context);
+	page_h = gtk_print_context_get_height (context);
+
+	circuit_w = page_w - 10;
+	circuit_h = page_h - 10;
+
+	cairo_t *cr = gtk_print_context_get_cairo_context (context);
+
+	/* Draw a red rectangle, as wide as the paper (inside the margins) */
+	cairo_set_source_rgb (cr, 1.0, 0, 0);
+	cairo_rectangle (cr, 0, 0, page_w, page_h);
+	cairo_stroke (cr);
+
+	store = schematic_get_store (sm);
+
+	node_store_get_bounds (store, &amp;bbox);
+
+	scalew = circuit_w / (bbox.x1 - bbox.x0);
+	scaleh = circuit_h / (bbox.y1 - bbox.y0);
+	if (scalew &lt; scaleh)
+		scale = scalew;
+	else
+		scale = scaleh;
+
+	cairo_save (cr);
+		cairo_set_line_width (cr, 0.5);
+		/* TODO : Add colors! */
+		cairo_set_source_rgb (cr, 0, 0, 0);
+		cairo_translate (cr, 5, 5);
+		cairo_scale (cr, scale, scale);	
+		cairo_translate (cr, -bbox.x0, -bbox.y0);
+		node_store_print_items (store, cr, NULL);
+		node_store_print_labels (store, cr, NULL);
+	cairo_restore (cr);
+}
+
+void
+schematic_print (Schematic *sm, GtkPageSetup *page, GtkPrintSettings *settings, gboolean preview)
+{
+	GtkPrintOperation *op;
+	GtkPrintOperationResult res;
+
+	op = gtk_print_operation_new ();
+
+	gtk_print_operation_set_print_settings (op, settings);
+	gtk_print_operation_set_default_page_setup (op, page);
+	gtk_print_operation_set_n_pages (op, 1);
+	gtk_print_operation_set_unit (op, GTK_UNIT_MM);
+
+	g_signal_connect (op, &quot;draw_page&quot;, G_CALLBACK (draw_page), sm);
+
+	if (preview)
+		res = gtk_print_operation_run (op, GTK_PRINT_OPERATION_ACTION_PREVIEW,
+		NULL, NULL);
+	else
+		res = gtk_print_operation_run (op, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
+		NULL, NULL);
+
+	if (res == GTK_PRINT_OPERATION_RESULT_APPLY) {
+	//  settings = gtk_print_operation_get_print_settings (op);
+	//save_print_settings (settings);
+	}
+}</diff>
      <filename>src/model/schematic.c</filename>
    </modified>
    <modified>
      <diff>@@ -105,6 +105,7 @@ gboolean schematic_is_dirty(Schematic *sm);
 void     schematic_set_dirty(Schematic *sm, gboolean b);
 gint schematic_save_file (Schematic *sm, GError **error);
 Schematic *schematic_read (char *fname, GError **error);
+void       schematic_print (Schematic *sm, GtkPageSetup *p, GtkPrintSettings *s, gboolean preview);
 
 #endif /* __SCHEMATIC_H__ */
 </diff>
      <filename>src/model/schematic.h</filename>
    </modified>
    <modified>
      <diff>@@ -33,7 +33,6 @@
 #include &quot;item-data.h&quot;
 #include &quot;textbox.h&quot;
 #include &quot;clipboard.h&quot;
-#include &quot;print.h&quot;
 #include &quot;node-store.h&quot;
 
 /*
@@ -50,7 +49,7 @@ static void textbox_init (Textbox *textbox);
 static void textbox_copy (ItemData *dest, ItemData *src);
 static ItemData *textbox_clone (ItemData *src);
 static void textbox_rotate (ItemData *data, int angle, SheetPos *center);
-static void textbox_print (ItemData *data, OreganoPrintContext *opc);
+static void textbox_print (ItemData *data, cairo_t *cr);
 static int textbox_register (ItemData *data);
 static void textbox_unregister (ItemData *data);
 static gboolean textbox_has_properties (ItemData *data);
@@ -413,9 +412,9 @@ textbox_get_font (Textbox *textbox)
 }
 
 static void
-textbox_print (ItemData *data, OreganoPrintContext *opc)
+textbox_print (ItemData *data, cairo_t *cr)
 {
-	GnomeCanvasPoints *line;
+/*	GnomeCanvasPoints *line;
 	double x0, y0;
 	ArtPoint dst, src;
 	double affine[6];
@@ -441,6 +440,7 @@ textbox_print (ItemData *data, OreganoPrintContext *opc)
 		opc-&gt;label_font, 6)
 	);
 	print_draw_text (opc-&gt;ctx, priv-&gt;text, &amp;src);
+	*/
 }
 
 static void</diff>
      <filename>src/model/textbox.c</filename>
    </modified>
    <modified>
      <diff>@@ -37,7 +37,6 @@
 #include &quot;wire.h&quot;
 #include &quot;wire-private.h&quot;
 #include &quot;clipboard.h&quot;
-#include &quot;print.h&quot;
 
 static void      wire_class_init (WireClass *klass);
 static void      wire_init (Wire *wire);
@@ -48,7 +47,6 @@ static void      wire_flip (ItemData *data, gboolean horizontal,
 	SheetPos *center);
 static void      wire_unregister (ItemData *data);
 static int       wire_register (ItemData *data);
-static gboolean  wire_has_properties (ItemData *data);
 static void	 wire_print (ItemData *data, OreganoPrintContext *opc);
 
 enum {
@@ -610,7 +608,7 @@ wire_register (ItemData *data)
 }
 
 static void
-wire_print (ItemData *data, OreganoPrintContext *opc)
+wire_print (ItemData *data, cairo_t *cr)
 {
 	SheetPos start_pos, end_pos;
 	Wire *wire;
@@ -623,10 +621,12 @@ wire_print (ItemData *data, OreganoPrintContext *opc)
 	wire_get_start_pos (wire, &amp;start_pos);
 	wire_get_end_pos (wire, &amp;end_pos);
 
-	gnome_print_setlinewidth (opc-&gt;ctx, 0);
-	gnome_print_moveto (opc-&gt;ctx, start_pos.x, start_pos.y);
-	gnome_print_lineto (opc-&gt;ctx, end_pos.x, end_pos.y);
-	gnome_print_stroke (opc-&gt;ctx);
+	cairo_save (cr);
+		cairo_set_source_rgb (cr, 0, 0, 1);
+		cairo_move_to (cr, start_pos.x, start_pos.y);
+		cairo_line_to (cr, end_pos.x, end_pos.y);
+		cairo_stroke (cr);
+	cairo_restore (cr);
 }
 
 void wire_delete (Wire *wire)</diff>
      <filename>src/model/wire.c</filename>
    </modified>
    <modified>
      <diff>@@ -33,10 +33,6 @@
 #include &lt;stdio.h&gt;
 #include &lt;stdlib.h&gt;
 #include &lt;gnome.h&gt;
-#include &lt;libgnomeprint/gnome-print.h&gt;
-#include &lt;libgnomeprintui/gnome-print-dialog.h&gt;
-#include &lt;libgnomeprintui/gnome-print-job-preview.h&gt;
-#include &lt;libgnomeprint/gnome-print-job.h&gt;
 #include &lt;gtksourceview/gtksourceprintjob.h&gt;
 
 static void netlist_editor_finalize (GObject *object);
@@ -159,7 +155,7 @@ netlist_editor_set_config (NetlistEditor * nle)
 void
 netlist_editor_print (GtkWidget * widget, NetlistEditor * nle)
 {
-	GnomePrintJob *print_job;
+/*	GnomePrintJob *print_job;
 	GtkSourcePrintJob *job;
 	GtkWidget *preview_widget;
 	char *header_left, *header_right;
@@ -192,6 +188,7 @@ netlist_editor_print (GtkWidget * widget, NetlistEditor * nle)
 
 	preview_widget = gnome_print_job_preview_new (print_job, _(&quot;Print Preview&quot;));
 	gtk_widget_show (GTK_WIDGET (preview_widget));
+	*/
 }
 
 void</diff>
      <filename>src/netlist-editor.c</filename>
    </modified>
    <modified>
      <diff>@@ -54,7 +54,6 @@
 #include &quot;sim-settings.h&quot;
 #include &quot;simulation.h&quot;
 #include &quot;smallicon.h&quot;
-#include &quot;print.h&quot;
 #include &quot;plot.h&quot;
 #include &quot;sheet-item-factory.h&quot;
 #include &quot;part-item.h&quot;
@@ -113,7 +112,8 @@ struct _SchematicViewPriv {
 	GHashTable *dots;
 
 	RubberbandInfo *rubberband;
-	PageProperties page;
+	GtkPageSetup *page_setup;
+	GtkPrintSettings *print_settings;
 
 	GList *preserve_selection_items;
 
@@ -309,45 +309,9 @@ page_properties_cmd (GtkWidget *widget, SchematicView *sv)
 	GtkCheckButton *fit, *center_h, *center_v;
 	gint btn;
 
-	s = schematic_view_get_schematic (sv);
-		
-	if (!g_file_test (OREGANO_GLADEDIR &quot;/page-properties.glade2&quot;, G_FILE_TEST_EXISTS)) {
-		gchar *msg;
-		msg = g_strdup_printf (
-			_(&quot;The file %s could not be found. You might need to reinstall Oregano to fix this.&quot;),
-			OREGANO_GLADEDIR &quot;/page-properties.glade2&quot;);
-
-		oregano_error_with_title (_(&quot;Could not create the page properties dialog&quot;), msg);
-		g_free (msg);
-		return;
-	}
-
-	xml = glade_xml_new (
-		OREGANO_GLADEDIR &quot;/page-properties.glade2&quot;,
-		&quot;page_properties&quot;, NULL
-	);
-
-	win = glade_xml_get_widget (xml, &quot;page_properties&quot;);
-
-	// Set the checkboxes according to the options selected
-	fit = GTK_CHECK_BUTTON (glade_xml_get_widget (xml, &quot;fit_page&quot;));
-	center_h = GTK_CHECK_BUTTON (glade_xml_get_widget (xml, &quot;center_h&quot;));
-	center_v = GTK_CHECK_BUTTON (glade_xml_get_widget (xml, &quot;center_v&quot;));
-
-	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (fit), sv-&gt;priv-&gt;page.fit_to_page);
-	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (center_h), sv-&gt;priv-&gt;page.center_h);
-	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (center_v), sv-&gt;priv-&gt;page.center_v);
-	
-	btn = gtk_dialog_run (GTK_DIALOG (win));
-
-	// Store the changes
-	if (btn == GTK_RESPONSE_OK) {
-		sv-&gt;priv-&gt;page.fit_to_page = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (fit));
-		sv-&gt;priv-&gt;page.center_h = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (center_h));
-		sv-&gt;priv-&gt;page.center_v = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (center_v));
-	}
-
-	gtk_widget_destroy (win);
+  sv-&gt;priv-&gt;page_setup = gtk_print_run_page_setup_dialog (NULL,
+			sv-&gt;priv-&gt;page_setup,
+			sv-&gt;priv-&gt;print_settings);
 }
 
 static void
@@ -607,13 +571,17 @@ show_label_cmd (GtkCheckMenuItem *toggle, SchematicView *sv)
 static void
 print_cmd (GtkWidget *widget, SchematicView *sv)
 {
-	print_schematic (G_OBJECT (sv), FALSE);
+	schematic_print (schematic_view_get_schematic (sv),
+		sv-&gt;priv-&gt;page_setup,
+		sv-&gt;priv-&gt;print_settings, FALSE);
 }
 
 static void
 print_preview_cmd (GtkWidget *widget, SchematicView *sv)
 {
-	print_schematic (G_OBJECT (sv), TRUE);
+	schematic_print (schematic_view_get_schematic (sv),
+		sv-&gt;priv-&gt;page_setup,
+		sv-&gt;priv-&gt;print_settings, TRUE);
 }
 
 static void
@@ -935,6 +903,8 @@ schematic_view_init (SchematicView *sv)
 	sv-&gt;priv-&gt;items = NULL;
 	sv-&gt;priv-&gt;empty = TRUE;
 	sv-&gt;priv-&gt;schematic = NULL;
+	sv-&gt;priv-&gt;page_setup = NULL;
+	sv-&gt;priv-&gt;print_settings = gtk_print_settings_new ();
 
 	sv-&gt;priv-&gt;show_voltmeters = FALSE;
 	sv-&gt;priv-&gt;voltmeter_items = NULL;
@@ -2687,8 +2657,3 @@ schematic_view_update_parts (SchematicView *sv)
 	}
 }
 
-PageProperties *
-schematic_view_get_page_properties (SchematicView *sv)
-{
-	return &amp;(sv-&gt;priv-&gt;page);
-}</diff>
      <filename>src/schematic-view.c</filename>
    </modified>
    <modified>
      <diff>@@ -49,12 +49,6 @@ typedef struct _SchematicView	   SchematicView;
 typedef struct _SchematicViewClass SchematicViewClass;
 typedef struct _SchematicViewPriv  SchematicViewPriv;
 
-typedef struct {
-	gboolean fit_to_page;
-	gboolean center_h;
-	gboolean center_v;
-} PageProperties;
-
 struct _SchematicView
 {
 	GObject parent;
@@ -128,6 +122,6 @@ void schematic_view_show_op_values (SchematicView *sv,
 */
 
 void		   schematic_view_clear_op_values (SchematicView *sv);
-PageProperties *schematic_view_get_page_properties (SchematicView *sv);
+
 #endif /* __SCHEMATIC_VIEW_H */
 </diff>
      <filename>src/schematic-view.h</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>data/dialogs/page-properties.glade2</filename>
    </removed>
    <removed>
      <filename>src/print.c</filename>
    </removed>
    <removed>
      <filename>src/print.h</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>2addaba5eb4c2a9b34acd484e1710d5879c4caee</id>
    </parent>
  </parents>
  <author>
    <name>Ricardo Markiewicz</name>
    <email>rmarkie@fi.uba.ar</email>
  </author>
  <url>http://github.com/Gazer/oregano/commit/c932265ebf634baca560987f47f92414b38f3e5b</url>
  <id>c932265ebf634baca560987f47f92414b38f3e5b</id>
  <committed-date>2006-09-05T22:33:00-07:00</committed-date>
  <authored-date>2006-09-05T22:33:00-07:00</authored-date>
  <message>Port printing code to GtkPrint.

Now the print engine is based on GtkPrint and Cairo.
Gtk+ version bump to 2.10

darcs-hash:20060906053324-7ae4f-e37b9829dcd5b1790f12ad3869fd2a80babe25bc.gz</message>
  <tree>b871e541fd6e642c72ede147c90b54772d933f64</tree>
  <committer>
    <name>Ricardo Markiewicz</name>
    <email>rmarkie@fi.uba.ar</email>
  </committer>
</commit>
