--- libgnomeprintui/libgnomeprintui/gnome-print-preview-private.h	Tue Jan 20 11:54:08 2004
+++ libgnomeprintui-new/libgnomeprintui/gnome-print-preview-private.h	Mon Jan 19 11:54:08 2004
@@ -62,6 +62,8 @@ struct _GnomePrintPreviewClass {
 void gnome_print_preview_theme_compliance (GnomePrintPreview *pp,
 					   gboolean strict);
 
+void gnome_print_preview_use_theme (gboolean theme);
+
 G_END_DECLS
 
 #endif /* __GNOME_PRINT_PREVIEW_PRIVATE_H__ */
--- libgnomeprintui/libgnomeprintui/gnome-print-job-preview.c	Tue Jan 20 11:54:36 2004
+++ libgnomeprintui-new/libgnomeprintui/gnome-print-job-preview.c	Tue Jan 20 11:53:35 2004
@@ -102,6 +102,7 @@ struct _GPMPPrivate {
 
 	/* Strict theme compliance [#96802] */
 	gboolean theme_compliance;
+	GtkWidget *use_theme_button;	
 };
 
 static void gpmp_parse_layout (GnomePrintJobPreview *mp);
@@ -511,8 +512,16 @@ canvas_style_changed_cb (GtkWidget *canv
 	priv = (GPMPPrivate *) mp->priv;
 
 	style = gtk_widget_get_style (GTK_WIDGET (canvas));
-	page_color = GPP_COLOR_RGBA (style->base [GTK_STATE_NORMAL], 0xff);
-	border_color = GPP_COLOR_RGBA (style->text [GTK_STATE_NORMAL], 0xff);
+	if (priv->theme_compliance) {
+		page_color = GPP_COLOR_RGBA (style->base [GTK_STATE_NORMAL], 
+					     0xff);
+		border_color = GPP_COLOR_RGBA (style->text [GTK_STATE_NORMAL], 
+					       0xff);
+	}
+	else {
+		page_color = GPP_COLOR_RGBA (style->white, 0xff);
+		border_color = GPP_COLOR_RGBA (style->black, 0xff);
+	}
 
 	for (i = 0; i < mp->page_array->len; i++) {
 		page = g_object_get_data (mp->page_array->pdata[i], "page");
@@ -521,6 +530,8 @@ canvas_style_changed_cb (GtkWidget *canv
 			       "outline_color_rgba", border_color,
 			       NULL);
 	}
+
+	gnome_print_job_preview_update (mp);
 }
 
 static void
@@ -573,6 +584,19 @@ entry_focus_out_event_cb (GtkWidget *wid
 }
 
 static void
+check_button_toggled_cb (GtkWidget *widget, GnomePrintJobPreview *mp)
+{
+	GPMPPrivate *priv;
+	gboolean use_theme;
+	
+	priv = (GPMPPrivate *)mp->priv;
+	use_theme = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
+	priv->theme_compliance = use_theme;
+	gnome_print_preview_use_theme (use_theme);
+	g_signal_emit_by_name (G_OBJECT (priv->canvas), "style_set", NULL);
+}
+
+static void
 create_preview_canvas (GnomePrintJobPreview *mp)
 {
 	AtkRelationSet *relation_set;
@@ -608,10 +632,8 @@ create_preview_canvas (GnomePrintJobPrev
 
 	gtk_container_add (GTK_CONTAINER (priv->scrolled_window), GTK_WIDGET (priv->canvas));
 
-	if (priv->theme_compliance) {
-		g_signal_connect (G_OBJECT (priv->canvas), "style_set",
-				  G_CALLBACK (canvas_style_changed_cb), mp);
-	}
+	g_signal_connect (G_OBJECT (priv->canvas), "style_set",
+			  G_CALLBACK (canvas_style_changed_cb), mp);
 	
 	status = gtk_hbox_new (FALSE, 0);
 	l = gtk_label_new_with_mnemonic (_("P_age: "));
@@ -638,6 +660,12 @@ create_preview_canvas (GnomePrintJobPrev
 	atko = gtk_widget_get_accessible (priv->last);
 	atk_object_set_name (atko, _("Page total"));
 	atk_object_set_description (atko, _("The total number of pages in the document"));
+
+	priv->use_theme_button = gtk_check_button_new_with_mnemonic (_("Use _theme colors for content"));
+	gtk_box_pack_end (GTK_BOX (status), priv->use_theme_button, FALSE,
+			    FALSE, 2);
+	g_signal_connect (G_OBJECT (priv->use_theme_button), "toggled",
+			  G_CALLBACK (check_button_toggled_cb), mp);
 
 	gtk_box_pack_start (GTK_BOX (mp->vbox), status, FALSE, FALSE, 3);
 	gtk_box_pack_start (GTK_BOX (mp->vbox), priv->scrolled_window, TRUE, TRUE, 0);
--- libgnomeprintui/libgnomeprintui/gnome-print-preview.c	Tue Jan 20 11:55:02 2004
+++ libgnomeprintui-new/libgnomeprintui/gnome-print-preview.c	Mon Jan 19 11:55:31 2004
@@ -55,15 +55,19 @@ struct _GnomePrintPreviewPrivate {
 };
 
 static GnomePrintContextClass *parent_class;
+static gboolean use_theme;
 
 static void
-outline_set_style_cb (GtkWidget *canvas, GtkStyle *ps, GnomeCanvasItem *item)
+outline_set_style_cb (GtkWidget *canvas, GnomeCanvasItem *item)
 {
 	gint32 color;
 	GtkStyle *style;
 
 	style = gtk_widget_get_style (GTK_WIDGET (canvas));
-	color = GPP_COLOR_RGBA (style->text [GTK_STATE_NORMAL], 0xff);
+	if (use_theme)
+		color = GPP_COLOR_RGBA (style->text [GTK_STATE_NORMAL], 0xff);
+	else
+		color = GPP_COLOR_RGBA (style->black, 0xff);
 	
 	gnome_canvas_item_set (item, "outline_color_rgba", color, NULL);
 }
@@ -102,22 +106,21 @@ gpp_stroke (GnomePrintContext *pc, const
 
 	gnome_canvas_path_def_unref (path);
 
-	if (pp->priv->theme_compliance) {
-		g_signal_connect (G_OBJECT (item->canvas), "style_set",
-				  G_CALLBACK (outline_set_style_cb), item);
-	}
-	
+	outline_set_style_cb (GTK_WIDGET (item->canvas), item);	
 	return 1;
 }
 
 static void
-fill_set_style_cb (GtkWidget *canvas, GtkStyle *ps, GnomeCanvasItem *item)
+fill_set_style_cb (GtkWidget *canvas, GnomeCanvasItem *item)
 {
 	gint32 color;
 	GtkStyle *style;
 
 	style = gtk_widget_get_style (GTK_WIDGET (canvas));
-	color = GPP_COLOR_RGBA (style->text [GTK_STATE_NORMAL], 0xff);
+	if (use_theme)
+		color = GPP_COLOR_RGBA (style->text [GTK_STATE_NORMAL], 0xff);
+	else
+		color = GPP_COLOR_RGBA (style->black, 0xff);
 	
 	gnome_canvas_item_set (item, "fill_color_rgba", color, NULL);
 }
@@ -149,11 +152,7 @@ gpp_fill (GnomePrintContext *pc, const A
 		NULL);
 	gnome_canvas_path_def_unref (path);
 
-	if (pp->priv->theme_compliance) {
-		g_signal_connect (G_OBJECT (item->canvas), "style_set",
-				  G_CALLBACK (fill_set_style_cb), item);
-	}
-
+	fill_set_style_cb (GTK_WIDGET (item->canvas), item);
 	return 1;
 }
 
@@ -293,7 +292,7 @@ gpp_beginpage (GnomePrintContext *pc, co
 }
 
 static void
-glyphlist_set_style_cb (GtkWidget *canvas, GtkStyle *ps, GnomeCanvasItem *item)
+glyphlist_set_style_cb (GtkWidget *canvas, GnomeCanvasItem *item)
 {
 	GnomeGlyphList *gl, *new;
 	gint32 color;
@@ -301,7 +300,10 @@ glyphlist_set_style_cb (GtkWidget *canva
 	gint i;
 
 	style = gtk_widget_get_style (GTK_WIDGET (canvas));
-	color = GPP_COLOR_RGBA (style->text [GTK_STATE_NORMAL], 0xff);
+	if (use_theme)
+		color = GPP_COLOR_RGBA (style->text [GTK_STATE_NORMAL], 0xff);
+	else
+		color = GPP_COLOR_RGBA (style->black, 0xff);
 
 	g_object_get (G_OBJECT (item), "glyphlist", &gl, NULL);
 	new = gnome_glyphlist_duplicate (gl);
@@ -340,11 +342,7 @@ gpp_glyphlist (GnomePrintContext *pc, co
 
 	gnome_canvas_item_affine_absolute (item, transform);
 
-	if (pp->priv->theme_compliance) {
-		g_signal_connect (G_OBJECT (item->canvas), "style_set",
-				  G_CALLBACK (glyphlist_set_style_cb), item);
-	}
-	
+	glyphlist_set_style_cb (GTK_WIDGET (item->canvas), item);	
 	return 0;
 }
 
@@ -434,6 +432,12 @@ static void
 clear_val (GtkObject *object, void **val)
 {
 	*val = NULL;
+}
+
+void
+gnome_print_preview_use_theme (gboolean theme)
+{
+	use_theme = theme;
 }
 
 /**
