goffice r2367 - in trunk: . goffice/graph goffice/math goffice/utils plugins/plot_barcol plugins/plot_distrib plugins/plot_pie plugins/plot_radar plugins/plot_surface plugins/plot_xy plugins/smoothing po tests



Author: jbrefort
Date: Fri Apr 10 15:00:10 2009
New Revision: 2367
URL: http://svn.gnome.org/viewvc/goffice?rev=2367&view=rev

Log:
2009-04-10  Jean Brefort  <jean brefort normalesup org>

	* All files: moved GogStyle code to utils and renamed it GOStyle.



Added:
   trunk/goffice/utils/go-editor.c
   trunk/goffice/utils/go-editor.h
   trunk/goffice/utils/go-style-prefs.glade
      - copied, changed from r2366, /trunk/goffice/graph/gog-style-prefs.glade
   trunk/goffice/utils/go-style.c
      - copied, changed from r2366, /trunk/goffice/graph/gog-style.c
   trunk/goffice/utils/go-style.h
      - copied, changed from r2366, /trunk/goffice/graph/gog-style.h
   trunk/goffice/utils/go-styled-object.c
   trunk/goffice/utils/go-styled-object.h
Removed:
   trunk/goffice/graph/gog-style-prefs.glade
   trunk/goffice/graph/gog-style.c
   trunk/goffice/graph/gog-style.h
Modified:
   trunk/ChangeLog
   trunk/goffice/graph/Makefile.am
   trunk/goffice/graph/goffice-graph.h
   trunk/goffice/graph/gog-3d-box.c
   trunk/goffice/graph/gog-axis-line.c
   trunk/goffice/graph/gog-axis.c
   trunk/goffice/graph/gog-chart.c
   trunk/goffice/graph/gog-equation.c
   trunk/goffice/graph/gog-error-bar.c
   trunk/goffice/graph/gog-error-bar.h
   trunk/goffice/graph/gog-graph.c
   trunk/goffice/graph/gog-grid-line.c
   trunk/goffice/graph/gog-grid.c
   trunk/goffice/graph/gog-label.c
   trunk/goffice/graph/gog-legend.c
   trunk/goffice/graph/gog-object-xml.c
   trunk/goffice/graph/gog-object-xml.h
   trunk/goffice/graph/gog-object.c
   trunk/goffice/graph/gog-object.h
   trunk/goffice/graph/gog-outlined-object.c
   trunk/goffice/graph/gog-plot.c
   trunk/goffice/graph/gog-reg-curve.c
   trunk/goffice/graph/gog-renderer.c
   trunk/goffice/graph/gog-renderer.h
   trunk/goffice/graph/gog-series-impl.h
   trunk/goffice/graph/gog-series-lines.c
   trunk/goffice/graph/gog-series.c
   trunk/goffice/graph/gog-smoothed-curve.c
   trunk/goffice/graph/gog-styled-object.c
   trunk/goffice/graph/gog-styled-object.h
   trunk/goffice/graph/gog-theme.c
   trunk/goffice/graph/gog-theme.h
   trunk/goffice/graph/gog-trend-line.c
   trunk/goffice/graph/gog-view.c
   trunk/goffice/math/go-R.h
   trunk/goffice/math/go-matrix3x3.h
   trunk/goffice/utils/Makefile.am
   trunk/goffice/utils/go-libxml-extras.c
   trunk/goffice/utils/go-libxml-extras.h
   trunk/goffice/utils/goffice-utils.h
   trunk/plugins/plot_barcol/gog-1.5d.c
   trunk/plugins/plot_barcol/gog-barcol.c
   trunk/plugins/plot_barcol/gog-dropbar.c
   trunk/plugins/plot_barcol/gog-line.c
   trunk/plugins/plot_barcol/gog-minmax.c
   trunk/plugins/plot_distrib/gog-boxplot.c
   trunk/plugins/plot_distrib/gog-histogram.c
   trunk/plugins/plot_distrib/gog-probability-plot.c
   trunk/plugins/plot_pie/gog-pie.c
   trunk/plugins/plot_radar/gog-radar.c
   trunk/plugins/plot_surface/gog-contour.c
   trunk/plugins/plot_surface/gog-surface.c
   trunk/plugins/plot_surface/gog-xyz-surface.c
   trunk/plugins/plot_surface/gog-xyz.c
   trunk/plugins/plot_surface/xl-surface.c
   trunk/plugins/plot_xy/gog-xy.c
   trunk/plugins/smoothing/gog-exp-smooth.c
   trunk/plugins/smoothing/gog-moving-avg.c
   trunk/po/ChangeLog
   trunk/po/POTFILES.in
   trunk/po/POTFILES.skip
   trunk/tests/go-demo.c
   trunk/tests/pie-demo.c

Modified: trunk/goffice/graph/Makefile.am
==============================================================================
--- trunk/goffice/graph/Makefile.am	(original)
+++ trunk/goffice/graph/Makefile.am	Fri Apr 10 15:00:10 2009
@@ -21,7 +21,6 @@
 	gog-grid.c			\
 	gog-grid-line.c			\
 	\
-	gog-style.c			\
 	gog-theme.c			\
 	\
 	gog-plot.c			\
@@ -59,7 +58,6 @@
 	gog-label.h			\
 	gog-grid.h			\
 	gog-grid-line.h			\
-	gog-style.h			\
 	gog-theme.h			\
 	gog-plot.h			\
 	gog-plot-impl.h			\
@@ -91,7 +89,6 @@
 	gog-object-prefs.glade		\
 	gog-graph-prefs.glade		\
 	gog-plot-prefs.glade		\
-	gog-style-prefs.glade		\
 	gog-axis-prefs.glade		\
 	gog-error-bar-prefs.glade	\
 	gog-reg-curve-prefs.glade	\

Modified: trunk/goffice/graph/goffice-graph.h
==============================================================================
--- trunk/goffice/graph/goffice-graph.h	(original)
+++ trunk/goffice/graph/goffice-graph.h	Fri Apr 10 15:00:10 2009
@@ -61,7 +61,6 @@
 
 /* formating */
 typedef struct _GogTheme	GogTheme;
-typedef struct _GogStyle	GogStyle;
 typedef GSList 			GogSeriesElementStyleList;
 
 /* Data */
@@ -85,7 +84,7 @@
 	double wl, ht;
 } GogViewPadding;
 
-typedef void (*GogEnumFunc) (unsigned i, GogStyle *style,
+typedef void (*GogEnumFunc) (unsigned i, gpointer style,
 			     char const *name, gpointer data);
 
 typedef enum {

Modified: trunk/goffice/graph/gog-3d-box.c
==============================================================================
--- trunk/goffice/graph/gog-3d-box.c	(original)
+++ trunk/goffice/graph/gog-3d-box.c	Fri Apr 10 15:00:10 2009
@@ -151,7 +151,7 @@
 
 static void
 gog_3d_box_populate_editor (GogObject *gobj, 
-			  GogEditor *editor, 
+			  GOEditor *editor, 
 			  GogDataAllocator *dalloc, 
 			  GOCmdContext *cc)
 {
@@ -163,7 +163,7 @@
 	g3d = go_3d_rotation_sel_new ();
 	go_3d_rotation_sel_set_matrix (GO_3D_ROTATION_SEL (g3d), &box->mat);
 	go_3d_rotation_sel_set_fov (GO_3D_ROTATION_SEL (g3d), box->fov);
-	gog_editor_add_page (editor, g3d, _("Rotation"));
+	go_editor_add_page (editor, g3d, _("Rotation"));
 
 	gui = go_libglade_new ("gog-3d-box-prefs.glade", "gog_3d_box_prefs", GETTEXT_PACKAGE, cc);
 	if (gui == NULL)
@@ -212,7 +212,7 @@
 	g_object_set_data_full (G_OBJECT (w),
 		"state", gui, (GDestroyNotify)g_object_unref);
 	
-	gog_editor_add_page (editor, w, _("Advanced"));
+	go_editor_add_page (editor, w, _("Advanced"));
 }
 
 #endif

Modified: trunk/goffice/graph/gog-axis-line.c
==============================================================================
--- trunk/goffice/graph/gog-axis-line.c	(original)
+++ trunk/goffice/graph/gog-axis-line.c	Fri Apr 10 15:00:10 2009
@@ -28,7 +28,7 @@
 #include <goffice/graph/gog-chart-map-3d.h>
 #include <goffice/graph/gog-data-allocator.h>
 #include <goffice/graph/gog-renderer.h>
-#include <goffice/graph/gog-style.h>
+#include <goffice/utils/go-style.h>
 #include <goffice/graph/gog-theme.h>
 #include <goffice/math/go-math.h>
 #include <goffice/utils/go-persist.h>
@@ -490,7 +490,7 @@
 
 static void
 gog_axis_base_populate_editor (GogObject *gobj,
-			       GogEditor *editor,
+			       GOEditor *editor,
 			       GogDataAllocator *dalloc,
 			       GOCmdContext *cc)
 {
@@ -522,7 +522,7 @@
 	if (!gog_object_is_visible (axis_base->axis))
 		return;
 
-	gog_editor_set_store_page (editor, &axis_base_pref_page);
+	go_editor_set_store_page (editor, &axis_base_pref_page);
 
 	axis_type = gog_axis_get_atype (axis_base->axis);
 	if (axis_type == GOG_AXIS_PSEUDO_3D) {
@@ -642,7 +642,7 @@
 		gtk_widget_hide (w);
 	}
 
-	gog_editor_add_page (editor,
+	go_editor_add_page (editor,
 			     glade_xml_get_widget (gui, "axis_base_pref_box"),
 			     _("Layout"));
 
@@ -651,9 +651,9 @@
 #endif
 
 static void
-gog_axis_base_init_style (GogStyledObject *gso, GogStyle *style)
+gog_axis_base_init_style (GogStyledObject *gso, GOStyle *style)
 {
-	style->interesting_fields = GOG_STYLE_LINE | GOG_STYLE_FONT;
+	style->interesting_fields = GO_STYLE_LINE | GO_STYLE_FONT;
 	gog_theme_fillin_style (gog_object_get_theme (GOG_OBJECT (gso)),
 		style, GOG_OBJECT (gso), 0, FALSE);
 }
@@ -993,7 +993,7 @@
 	GogAxisMap *map = NULL;
 	GogAxisTick *ticks;
 	GOGeometryAABR total_bbox, bbox;
-	GogStyle *style = axis_base->base.style;
+	GOStyle *style = axis_base->base.style;
 	GOGeometryAABR txt_aabr;
 	GOGeometryOBR txt_obr;
 	GOGeometryOBR *obrs = NULL;
@@ -1012,7 +1012,7 @@
 	cos_alpha = side == GO_SIDE_LEFT ? - sin (axis_angle) : + sin (axis_angle);
 	sin_alpha = side == GO_SIDE_LEFT ? + cos (axis_angle) : - cos (axis_angle);
 
-	is_line_visible = gog_style_is_line_visible (style);
+	is_line_visible = go_style_is_line_visible (style);
 	line_width = gog_renderer_line_size (renderer, style->line.width) / 2;
 
 	minor_tick_len = gog_renderer_pt2r (renderer, axis_base->minor.size_pts);
@@ -1106,7 +1106,7 @@
 {
 	GogAxisMap *map = NULL;
 	GogAxisTick *ticks;
-	GogStyle *style = axis_base->base.style;
+	GOStyle *style = axis_base->base.style;
 	GOGeometryOBR zero_obr;
 	GOGeometryOBR *obrs = NULL;
 	GOGeometrySide label_anchor = GO_SIDE_AUTO;
@@ -1136,7 +1136,7 @@
 	axis_base_view->x_stop = x + w;
 	axis_base_view->y_stop = y + h;
 
-	is_line_visible = gog_style_is_line_visible (style);
+	is_line_visible = go_style_is_line_visible (style);
 	line_width = gog_renderer_line_size (renderer, style->line.width) / 2;
 
 	if (is_line_visible)
@@ -1325,7 +1325,7 @@
 	gog_renderer_get_text_OBR (renderer, "0", TRUE, &txt_obr);
 	label_padding = txt_obr.w;
 
-	draw_ticks = gog_style_is_line_visible (axis_base->base.style) &&
+	draw_ticks = go_style_is_line_visible (axis_base->base.style) &&
 		(axis_base->major.tick_out || axis_base->minor.tick_out);
 
 	map = gog_chart_map_get_axis_map (c_map, 1);
@@ -1397,7 +1397,7 @@
 		go_path_arc (path, parms->cx, parms->cy, parms->rx, parms->ry,
 			     -parms->th1, -parms->th0);
 
-	is_line_visible = gog_style_is_line_visible (axis_base->base.style);
+	is_line_visible = go_style_is_line_visible (axis_base->base.style);
 	draw_major = axis_base->major.tick_in || axis_base->major.tick_out;
 	draw_minor = axis_base->minor.tick_in || axis_base->minor.tick_out;
 
@@ -2092,7 +2092,7 @@
 {
 	GogAxisSet axis_set;
 	GogAxisBase *axis_base = GOG_AXIS_BASE (view->model);
-	GogStyle *style = axis_base->base.style;
+	GOStyle *style = axis_base->base.style;
 
 	if (gog_axis_get_atype (axis_base->axis) >= GOG_AXIS_VIRTUAL)
 		return;
@@ -2130,7 +2130,7 @@
 {
 	GogAxisSet axis_set;
 	GogAxisBase *axis_base = GOG_AXIS_BASE (view->model);
-	GogStyle *style = axis_base->base.style;
+	GOStyle *style = axis_base->base.style;
 	GogViewAllocation const *plot_area;
 
 	if (gog_axis_get_atype (axis_base->axis) >= GOG_AXIS_VIRTUAL)
@@ -2186,7 +2186,7 @@
 {
 	GogAxisSet axis_set;
 	GogAxisBase *axis_base = GOG_AXIS_BASE (view->model);
-	GogStyle *style = axis_base->base.style;
+	GOStyle *style = axis_base->base.style;
 	GogViewPadding padding = {0};
 
 	if (gog_axis_get_atype (axis_base->axis) >= GOG_AXIS_VIRTUAL)

Modified: trunk/goffice/graph/gog-axis.c
==============================================================================
--- trunk/goffice/graph/gog-axis.c	(original)
+++ trunk/goffice/graph/gog-axis.c	Fri Apr 10 15:00:10 2009
@@ -23,8 +23,6 @@
 #include <goffice/graph/gog-axis.h>
 #include <goffice/graph/gog-axis-line-impl.h>
 #include <goffice/graph/gog-grid-line.h>
-#include <goffice/graph/gog-styled-object.h>
-#include <goffice/graph/gog-style.h>
 #include <goffice/graph/gog-theme.h>
 #include <goffice/graph/gog-data-set.h>
 #include <goffice/graph/gog-data-allocator.h>
@@ -39,6 +37,8 @@
 #include <goffice/utils/datetime.h>
 #include <goffice/utils/go-persist.h>
 #include <goffice/utils/go-glib-extras.h>
+#include <goffice/utils/go-style.h>
+#include <goffice/utils/go-styled-object.h>
 #include <goffice/data/go-data-simple.h>
 
 #include <gsf/gsf-impl-utils.h>
@@ -2139,7 +2139,7 @@
 
 static void
 gog_axis_populate_editor (GogObject *gobj,
-			  GogEditor *editor,
+			  GOEditor *editor,
 			  GogDataAllocator *dalloc,
 			  GOCmdContext *cc)
 {
@@ -2232,7 +2232,7 @@
 					 G_CALLBACK (cb_axis_toggle_changed), axis, 0);
 	}
 
-	gog_editor_add_page (editor,
+	go_editor_add_page (editor,
 			     glade_xml_get_widget (gui, "axis_pref_box"),
 			     _("Scale"));
 
@@ -2250,7 +2250,7 @@
 			    go_format_sel_set_style_format (GO_FORMAT_SEL (w),
 							    fmt);
 
-		    gog_editor_add_page (editor, w, _("Format"));
+		    go_editor_add_page (editor, w, _("Format"));
 
 		    gtk_widget_show (w);
 		    g_signal_connect (G_OBJECT (w),
@@ -2261,16 +2261,16 @@
 	g_object_set_data_full (G_OBJECT (w), "state", state,
 				(GDestroyNotify)gog_axis_pref_state_free);
 
-	gog_editor_set_store_page (editor, &axis_pref_page);
+	go_editor_set_store_page (editor, &axis_pref_page);
 }
 #endif
 
 static void
-gog_axis_init_style (GogStyledObject *gso, GogStyle *style)
+gog_axis_init_style (GogStyledObject *gso, GOStyle *style)
 {
 	if (gog_axis_get_atype (GOG_AXIS (gso)) != GOG_AXIS_PSEUDO_3D)
-		style->interesting_fields = GOG_STYLE_LINE | GOG_STYLE_FONT |
-			GOG_STYLE_TEXT_LAYOUT;
+		style->interesting_fields = GO_STYLE_LINE | GO_STYLE_FONT |
+			GO_STYLE_TEXT_LAYOUT;
 	else
 		style->interesting_fields = 0;
 	gog_theme_fillin_style (gog_object_get_theme (GOG_OBJECT (gso)),
@@ -2755,7 +2755,7 @@
 	GogViewAllocation label_pos;
 	GogViewAllocation tmp = *plot_area;
 	GogViewRequisition req, available;
-	GogStyle *style = gog_styled_object_get_style (GOG_STYLED_OBJECT (child->model));
+	GOStyle *style = go_styled_object_get_style (GO_STYLED_OBJECT (child->model));
 	double angle;
 
 	gog_axis_base_view_label_position_request (view, plot_area, &label_pos);

Modified: trunk/goffice/graph/gog-chart.c
==============================================================================
--- trunk/goffice/graph/gog-chart.c	(original)
+++ trunk/goffice/graph/gog-chart.c	Fri Apr 10 15:00:10 2009
@@ -26,7 +26,7 @@
 #include <goffice/graph/gog-3d-box.h>
 #include <goffice/graph/gog-plot-impl.h>
 #include <goffice/graph/gog-graph-impl.h>
-#include <goffice/graph/gog-style.h>
+#include <goffice/utils/go-style.h>
 #include <goffice/graph/gog-view.h>
 #include <goffice/graph/gog-axis.h>
 #include <goffice/graph/gog-axis-line-impl.h>
@@ -186,7 +186,7 @@
 
 static void
 gog_chart_populate_editor (GogObject *gobj, 
-			   GogEditor *editor, 
+			   GOEditor *editor, 
 			   G_GNUC_UNUSED GogDataAllocator *dalloc, 
 			   GOCmdContext *cc)
 {
@@ -194,7 +194,7 @@
 
 	(GOG_OBJECT_CLASS(chart_parent_klass)->populate_editor) (gobj, editor, dalloc, cc);
 
-	gog_editor_set_store_page (editor, &chart_pref_page);
+	go_editor_set_store_page (editor, &chart_pref_page);
 }
 
 static void

Modified: trunk/goffice/graph/gog-equation.c
==============================================================================
--- trunk/goffice/graph/gog-equation.c	(original)
+++ trunk/goffice/graph/gog-equation.c	Fri Apr 10 15:00:10 2009
@@ -25,11 +25,14 @@
 
 #include <goffice/goffice-config.h>
 #include <goffice/graph/gog-outlined-object.h>
-#include <goffice/graph/gog-style.h>
+#include <goffice/utils/go-style.h>
+#include <goffice/graph/gog-renderer.h>
 #include <goffice/graph/gog-theme.h>
 #include <goffice/graph/gog-equation.h>
 #include <goffice/utils/go-persist.h>
 #include <goffice/utils/go-color.h>
+#include <goffice/utils/go-style.h>
+#include <goffice/utils/go-styled-object.h>
 
 #include <gsf/gsf-impl-utils.h>
 #include <glib/gi18n-lib.h>
@@ -79,7 +82,7 @@
 
 static void
 gog_equation_populate_editor (GogObject *obj,
-			      GogEditor *editor,
+			      GOEditor *editor,
 			      G_GNUC_UNUSED GogDataAllocator *dalloc,
 			      GOCmdContext *cc)
 {
@@ -104,17 +107,17 @@
 
 	widget = glade_xml_get_widget (gui, "gog_equation_prefs");
 
-	gog_editor_add_page (editor, widget, _("Equation"));
+	go_editor_add_page (editor, widget, _("Equation"));
 
 	(GOG_OBJECT_CLASS(equation_parent_klass)->populate_editor) (obj, editor, dalloc, cc);
 
-	gog_editor_set_store_page (editor, &equation_pref_page);
+	go_editor_set_store_page (editor, &equation_pref_page);
 }
 
 #endif
 
 static void
-_update_equation_style (GogEquation *equation, const GogStyle *style)
+_update_equation_style (GogEquation *equation, const GOStyle *style)
 {
 	GMathmlStyle *math_style;
 	GMathmlMathElement *math_element;
@@ -233,7 +236,7 @@
 		equation->mathml = mathml;
 
 		_update_equation_style (equation,
-					gog_styled_object_get_style (GOG_STYLED_OBJECT (equation)));
+					go_styled_object_get_style (GO_STYLED_OBJECT (equation)));
 	} else
 		g_object_unref (mathml);
 
@@ -285,18 +288,18 @@
 }
 
 static void
-gog_equation_style_changed (GogStyledObject *gso, GogStyle const *new_style)
+gog_equation_style_changed (GogStyledObject *gso, GOStyle const *new_style)
 {
 	_update_equation_style (GOG_EQUATION (gso), new_style);
 }
 
 static void
-gog_equation_init_style (GogStyledObject *gso, GogStyle *style)
+gog_equation_init_style (GogStyledObject *gso, GOStyle *style)
 {
 	style->interesting_fields =
-		GOG_STYLE_OUTLINE |
-		GOG_STYLE_FILL |
-		GOG_STYLE_FONT;
+		GO_STYLE_OUTLINE |
+		GO_STYLE_FILL |
+		GO_STYLE_FONT;
 
 	gog_theme_fillin_style (gog_object_get_theme (GOG_OBJECT (gso)),
 				style, GOG_OBJECT (gso), 0, FALSE);

Modified: trunk/goffice/graph/gog-error-bar.c
==============================================================================
--- trunk/goffice/graph/gog-error-bar.c	(original)
+++ trunk/goffice/graph/gog-error-bar.c	Fri Apr 10 15:00:10 2009
@@ -25,13 +25,13 @@
 #include "gog-plot-impl.h"
 #include "gog-object-xml.h"
 #include "gog-data-allocator.h"
-#include "gog-style.h"
 #include "gog-renderer.h"
 #include <goffice/data/go-data-impl.h>
 #include <goffice/data/go-data.h>
 #include <goffice/math/go-math.h>
 #include <goffice/utils/go-path.h>
 #include <goffice/utils/go-persist.h>
+#include <goffice/utils/go-style.h>
 #include <gsf/gsf-impl-utils.h>
 
 #include <glib/gi18n-lib.h>
@@ -329,8 +329,8 @@
 	bar->type = GOG_ERROR_BAR_TYPE_NONE;
 	bar->display = GOG_ERROR_BAR_DISPLAY_BOTH;
 	bar->width = 5.;
-	bar->style = gog_style_new ();
-	bar->style->interesting_fields = GOG_STYLE_LINE;
+	bar->style = go_style_new ();
+	bar->style->interesting_fields = GO_STYLE_LINE;
 	bar->style->line.color = RGBA_BLACK;
 	bar->style->line.width = 1.;
 }
@@ -604,7 +604,7 @@
 	dbar->display = bar->display;
 	dbar->width = bar->width;
 	if (dbar->style) g_object_unref (dbar->style);
-	dbar->style = gog_style_dup (bar->style);
+	dbar->style = go_style_dup (bar->style);
 	return dbar;
 }
 

Modified: trunk/goffice/graph/gog-error-bar.h
==============================================================================
--- trunk/goffice/graph/gog-error-bar.h	(original)
+++ trunk/goffice/graph/gog-error-bar.h	Fri Apr 10 15:00:10 2009
@@ -52,7 +52,7 @@
 	int error_i;
 	GogErrorBarDisplay display;
 	float width;
-	GogStyle* style;
+	GOStyle* style;
 };
 
 #define GOG_TYPE_ERROR_BAR		(gog_error_bar_get_type ())

Modified: trunk/goffice/graph/gog-graph.c
==============================================================================
--- trunk/goffice/graph/gog-graph.c	(original)
+++ trunk/goffice/graph/gog-graph.c	Fri Apr 10 15:00:10 2009
@@ -24,10 +24,11 @@
 #include <goffice/graph/gog-graph-impl.h>
 #include <goffice/graph/gog-chart-impl.h>
 #include <goffice/graph/gog-renderer.h>
-#include <goffice/graph/gog-style.h>
+#include <goffice/utils/go-style.h>
 #include <goffice/graph/gog-theme.h>
 #include <goffice/data/go-data.h>
 #include <goffice/utils/go-persist.h>
+#include <goffice/utils/go-styled-object.h>
 #include <goffice/utils/go-units.h>
 
 #include <gsf/gsf-impl-utils.h>
@@ -189,7 +190,7 @@
 
 static void
 gog_graph_populate_editor (GogObject *gobj, 
-			   GogEditor *editor, 
+			   GOEditor *editor, 
 			   G_GNUC_UNUSED GogDataAllocator *dalloc, 
 			   GOCmdContext *cc)
 {
@@ -233,12 +234,12 @@
 		box = glade_xml_get_widget (gui, "gog_graph_prefs");
 		g_object_set_data_full (G_OBJECT (box), "gui", gui,
 					(GDestroyNotify)g_object_unref);
-		gog_editor_add_page (editor, box, _("Theme"));
+		go_editor_add_page (editor, box, _("Theme"));
 
 		g_slist_free (theme_names);	
 	}	     
 
-	gog_editor_set_store_page (editor, &graph_pref_page);
+	go_editor_set_store_page (editor, &graph_pref_page);
 }
 #endif
 
@@ -385,7 +386,7 @@
 	GOG_OBJECT (graph)->user_name = g_strdup (_("Graph"));
 	gog_theme_fillin_style (graph->theme,
 		gso->style, GOG_OBJECT (graph), 0, TRUE);
-	gog_styled_object_apply_theme (gso, gso->style);
+	go_styled_object_apply_theme (GO_STYLED_OBJECT (gso), gso->style);
 
 	graph->data_refs = g_hash_table_new (g_direct_hash, g_direct_equal);
 }
@@ -515,17 +516,17 @@
 	for (ptr = object->children; ptr !=  NULL; ptr = ptr->next)
 		apply_theme (ptr->data, theme, force_auto);		
 
-	if (GOG_IS_STYLED_OBJECT (object)) {
-		GogStyledObject *styled_object = (GogStyledObject *) object;
-		GogStyle *style;
+	if (GO_IS_STYLED_OBJECT (object)) {
+		GOStyledObject *styled_object = (GOStyledObject *) object;
+		GOStyle *style;
 
-		style = gog_styled_object_get_style (styled_object);
+		style = go_styled_object_get_style (styled_object);
 		if (force_auto) 
 			/* FIXME: Some style settings are not themed yet,
 			 * such as font or fill type. */
-			gog_style_force_auto (style);
-		gog_styled_object_apply_theme (styled_object, style);
-		gog_styled_object_style_changed (styled_object);
+			go_style_force_auto (style);
+		go_styled_object_apply_theme (styled_object, style);
+		go_styled_object_style_changed (styled_object);
 		gog_object_emit_changed (object, TRUE);
 	}
 }

Modified: trunk/goffice/graph/gog-grid-line.c
==============================================================================
--- trunk/goffice/graph/gog-grid-line.c	(original)
+++ trunk/goffice/graph/gog-grid-line.c	Fri Apr 10 15:00:10 2009
@@ -27,8 +27,8 @@
 #include <goffice/graph/gog-data-allocator.h>
 #include <goffice/graph/gog-grid-line.h>
 #include <goffice/graph/gog-renderer.h>
-#include <goffice/graph/gog-style.h>
-#include <goffice/graph/gog-styled-object.h>
+#include <goffice/utils/go-style.h>
+#include <goffice/utils/go-styled-object.h>
 #include <goffice/graph/gog-theme.h>
 #include <goffice/graph/gog-view.h>
 #include <goffice/data/go-data.h>
@@ -69,9 +69,9 @@
 }
 
 static void
-gog_grid_line_init_style (GogStyledObject *gso, GogStyle *style)
+gog_grid_line_init_style (GogStyledObject *gso, GOStyle *style)
 {
-	style->interesting_fields = GOG_STYLE_LINE | GOG_STYLE_FILL;
+	style->interesting_fields = GO_STYLE_LINE | GO_STYLE_FILL;
 	gog_theme_fillin_style (gog_object_get_theme (GOG_OBJECT (gso)),
 		style, GOG_OBJECT (gso), 0, FALSE);
 }
@@ -843,7 +843,7 @@
 	GogAxis *axis;
 	GogChart *chart;
 	GogView *chart_view;
-	GogStyle *style;
+	GOStyle *style;
 	GogAxisType axis_type;
 	GogAxisTick *ticks;
 	unsigned tick_nbr;
@@ -863,11 +863,11 @@
 		return;
 
 	plot_area = gog_chart_view_get_plot_area (chart_view);
-	style = gog_styled_object_get_style (GOG_STYLED_OBJECT (grid_line));
+	style = go_styled_object_get_style (GO_STYLED_OBJECT (grid_line));
 	gog_renderer_push_style (view->renderer, style);
 
-	if ((!stripes && gog_style_is_line_visible (style)) ||
-	    (stripes && (style->fill.type != GOG_FILL_STYLE_NONE))) {
+	if ((!stripes && go_style_is_line_visible (style)) ||
+	    (stripes && (style->fill.type != GO_STYLE_FILL_NONE))) {
 		if (gog_chart_get_axis_set (chart) == GOG_AXIS_SET_XYZ) {
 			gog_grid_line_xyz_render (grid_line, view, axis,
 			                          ticks, tick_nbr, chart,

Modified: trunk/goffice/graph/gog-grid.c
==============================================================================
--- trunk/goffice/graph/gog-grid.c	(original)
+++ trunk/goffice/graph/gog-grid.c	Fri Apr 10 15:00:10 2009
@@ -24,8 +24,8 @@
 #include <goffice/graph/gog-chart.h>
 #include <goffice/graph/gog-chart-map.h>
 #include <goffice/graph/gog-chart-map-3d.h>
-#include <goffice/graph/gog-styled-object.h>
-#include <goffice/graph/gog-style.h>
+#include <goffice/utils/go-styled-object.h>
+#include <goffice/utils/go-style.h>
 #include <goffice/graph/gog-view.h>
 #include <goffice/graph/gog-theme.h>
 #include <goffice/graph/gog-renderer.h>
@@ -57,9 +57,9 @@
 };
 
 static void
-gog_grid_init_style (GogStyledObject *gso, GogStyle *style)
+gog_grid_init_style (GogStyledObject *gso, GOStyle *style)
 {
-	style->interesting_fields = GOG_STYLE_FILL | GOG_STYLE_OUTLINE;
+	style->interesting_fields = GO_STYLE_FILL | GO_STYLE_OUTLINE;
 	gog_theme_fillin_style (gog_object_get_theme (GOG_OBJECT (gso)),
 		style, GOG_OBJECT (gso), 0, FALSE);
 }

Modified: trunk/goffice/graph/gog-label.c
==============================================================================
--- trunk/goffice/graph/gog-label.c	(original)
+++ trunk/goffice/graph/gog-label.c	Fri Apr 10 15:00:10 2009
@@ -26,7 +26,7 @@
 #include <goffice/graph/gog-data-set.h>
 #include <goffice/graph/gog-label.h>
 #include <goffice/graph/gog-outlined-object.h>
-#include <goffice/graph/gog-style.h>
+#include <goffice/utils/go-style.h>
 #include <goffice/graph/gog-theme.h>
 #include <goffice/graph/gog-view.h>
 #include <goffice/graph/gog-renderer.h>
@@ -104,12 +104,12 @@
 }
 
 static void
-gog_text_init_style (GogStyledObject *gso, GogStyle *style)
+gog_text_init_style (GogStyledObject *gso, GOStyle *style)
 {
 	GogObject *parent;
 
-	style->interesting_fields = GOG_STYLE_OUTLINE | GOG_STYLE_FILL | 
-		GOG_STYLE_FONT | GOG_STYLE_TEXT_LAYOUT;
+	style->interesting_fields = GO_STYLE_OUTLINE | GO_STYLE_FILL | 
+		GO_STYLE_FONT | GO_STYLE_TEXT_LAYOUT;
 	gog_theme_fillin_style (gog_object_get_theme (GOG_OBJECT (gso)),
 		style, GOG_OBJECT (gso), 0, FALSE);
 	
@@ -188,7 +188,7 @@
 #ifdef GOFFICE_WITH_GTK
 static void
 gog_label_populate_editor (GogObject *gobj, 
-			   GogEditor *editor, 
+			   GOEditor *editor, 
 			   GogDataAllocator *dalloc, 
 			   GOCmdContext *cc)
 {
@@ -205,10 +205,10 @@
 	gtk_container_add (GTK_CONTAINER (alignment), hbox);
 	gtk_widget_show_all (alignment);
 
-	gog_editor_add_page (editor, alignment, _("Data"));
+	go_editor_add_page (editor, alignment, _("Data"));
 	
 	(GOG_OBJECT_CLASS(label_parent_klass)->populate_editor) (gobj, editor, dalloc, cc);
-	gog_editor_set_store_page (editor, &label_pref_page);
+	go_editor_set_store_page (editor, &label_pref_page);
 }
 #endif
 
@@ -345,7 +345,7 @@
 
 static void
 gog_reg_eqn_populate_editor (GogObject *gobj, 
-			     GogEditor *editor, 
+			     GOEditor *editor, 
 			     GogDataAllocator *dalloc, 
 			     GOCmdContext *cc)
 {
@@ -357,7 +357,7 @@
 	if (gui == NULL)
 		return;
 
-	gog_editor_add_page (editor, 
+	go_editor_add_page (editor, 
 			     glade_xml_get_widget (gui, "reg-eqn-prefs"),
 			     _("Details"));
 
@@ -477,14 +477,14 @@
 {
 	GogText *text = GOG_TEXT (view->model);
 	GogOutlinedObject *goo = GOG_OUTLINED_OBJECT (text);
-	GogStyle *style = text->base.base.style;
+	GOStyle *style = text->base.base.style;
 	char *str = gog_text_get_str (text);
 
 	gog_renderer_push_style (view->renderer, style);
 	if (str != NULL) {
 		double outline = gog_renderer_line_size (view->renderer, 
 							 goo->base.style->outline.width);
-		if (style->fill.type != GOG_FILL_STYLE_NONE || outline > 0.) {
+		if (style->fill.type != GO_STYLE_FILL_NONE || outline > 0.) {
 			GogViewAllocation rect;
 			GOGeometryAABR aabr;
 			double pad_x = gog_renderer_pt2r_x (view->renderer, goo->padding_pts);

Modified: trunk/goffice/graph/gog-legend.c
==============================================================================
--- trunk/goffice/graph/gog-legend.c	(original)
+++ trunk/goffice/graph/gog-legend.c	Fri Apr 10 15:00:10 2009
@@ -25,9 +25,10 @@
 #include <goffice/graph/gog-view.h>
 #include <goffice/graph/gog-renderer.h>
 #include <goffice/graph/gog-chart.h>
-#include <goffice/graph/gog-style.h>
+#include <goffice/utils/go-style.h>
 #include <goffice/graph/gog-theme.h>
 #include <goffice/utils/go-color.h>
+#include <goffice/utils/go-styled-object.h>
 #include <goffice/math/go-math.h>
 #include <goffice/utils/go-marker.h>
 #include <goffice/utils/go-path.h>
@@ -160,20 +161,20 @@
 
 static void
 gog_legend_populate_editor (GogObject *gobj, 
-			    GogEditor *editor, 
+			    GOEditor *editor, 
 			    GogDataAllocator *dalloc, 
 			    GOCmdContext *cc)
 {
 	static guint legend_pref_page = 0;
 
 	(GOG_OBJECT_CLASS(parent_klass)->populate_editor) (gobj, editor, dalloc, cc);
-	gog_editor_set_store_page (editor, &legend_pref_page);
+	go_editor_set_store_page (editor, &legend_pref_page);
 }
 
 static void
-gog_legend_init_style (GogStyledObject *gso, GogStyle *style)
+gog_legend_init_style (GogStyledObject *gso, GOStyle *style)
 {
-	style->interesting_fields = GOG_STYLE_OUTLINE | GOG_STYLE_FILL | GOG_STYLE_FONT;
+	style->interesting_fields = GO_STYLE_OUTLINE | GO_STYLE_FILL | GO_STYLE_FONT;
 	gog_theme_fillin_style (gog_object_get_theme (GOG_OBJECT (gso)),
 		style, GOG_OBJECT (gso), 0, FALSE);
 }
@@ -261,7 +262,7 @@
 static GogViewClass *lview_parent_klass;
 
 static void
-cb_size_elements (unsigned i, GogStyle const *style, 
+cb_size_elements (unsigned i, GOStyle const *style, 
 		  char const *name, GogLegendView *glv)
 {
 	GogView *view = GOG_VIEW (glv);
@@ -273,7 +274,7 @@
 		glv->element_width = aabr.w;
 	if (glv->element_height < aabr.h)
 		glv->element_height = aabr.h;
-	if (!glv->uses_lines && (style->interesting_fields & GOG_STYLE_LINE)) 
+	if (!glv->uses_lines && (style->interesting_fields & GO_STYLE_LINE)) 
 		glv->uses_lines = TRUE;
 }
 
@@ -286,7 +287,7 @@
 	GogLegendView *glv = GOG_LEGEND_VIEW (v);
 	GogLegend *l = GOG_LEGEND (v->model);
 	GogViewRequisition child_req, residual, frame_req;
-	GogStyle *style;
+	GOStyle *style;
 	double available_space, element_size;
 	unsigned num_elements;
 
@@ -316,7 +317,7 @@
 		return;
 	}
 
-	style = gog_styled_object_get_style (GOG_STYLED_OBJECT (l));
+	style = go_styled_object_get_style (GO_STYLED_OBJECT (l));
 	gog_renderer_push_style (v->renderer, style);
 	
 	glv->font_size = pango_font_description_get_size (style->font.font->desc) / PANGO_SCALE;
@@ -372,10 +373,10 @@
 } SwatchScaleClosure;
 
 static void
-cb_swatch_scale (unsigned i, GogStyle const *style, char const *name,
+cb_swatch_scale (unsigned i, GOStyle const *style, char const *name,
 		 SwatchScaleClosure *data)
 {
-	GogStyleLine const *line = NULL;
+	GOStyleLine const *line = NULL;
 	double size;
 	double maximum, scale;
 
@@ -385,9 +386,9 @@
 	if (data->size_min > size)
 		data->size_min = size;
 
-	if (style->interesting_fields & GOG_STYLE_LINE)
+	if (style->interesting_fields & GO_STYLE_LINE)
 		line = &style->line;
-	else if (style->interesting_fields & GOG_STYLE_OUTLINE)
+	else if (style->interesting_fields & GO_STYLE_OUTLINE)
 		line = &style->outline;
 
 	if (line == NULL ||
@@ -424,13 +425,13 @@
 } RenderClosure;
 
 static void
-cb_render_elements (unsigned index, GogStyle const *base_style, char const *name,
+cb_render_elements (unsigned index, GOStyle const *base_style, char const *name,
 		    RenderClosure *data)
 {
 	GogView const *view = data->view;
 	GogLegendView *glv = GOG_LEGEND_VIEW (view);
 	GogRenderer *renderer = view->renderer;
-	GogStyle *style = NULL;
+	GOStyle *style = NULL;
 	GogViewAllocation pos, rectangle;
 	double half_width, y;
 	GOPath *line_path;
@@ -446,8 +447,8 @@
 	}
 	data->count++;
 
-	if (base_style->interesting_fields & GOG_STYLE_LINE) { /* line and marker */
-		style = gog_style_dup (base_style);
+	if (base_style->interesting_fields & GO_STYLE_LINE) { /* line and marker */
+		style = go_style_dup (base_style);
 		g_return_if_fail (style != NULL);
 		go_marker_set_size (style->marker.mark,
 				    go_marker_get_size (style->marker.mark) *
@@ -461,7 +462,7 @@
 		y = data->y + glv->element_height / 2.;
 		go_path_move_to (line_path, data->x + half_width, y);
 		go_path_line_to (line_path, data->x + data->swatch.w * GLV_LINE_LENGTH_EM - half_width, y);
-		if (style->interesting_fields & GOG_STYLE_FILL) {
+		if (style->interesting_fields & GO_STYLE_FILL) {
 			rectangle.x = data->x - half_width;
 			rectangle.y = y;
 			rectangle.w = data->swatch.w * GLV_LINE_LENGTH_EM + 2.0 * half_width;
@@ -472,7 +473,7 @@
 		go_path_free (line_path);
 		gog_renderer_draw_marker (renderer, data->x + data->swatch.w  * GLV_LINE_LENGTH_EM * 0.5, y);
 	} else {					/* area swatch */
-		style = gog_style_dup (base_style);
+		style = go_style_dup (base_style);
 		if (style->outline.width > data->hairline_width)
 			style->outline.width =
 				0.5 * (data->hairline_width + style->outline.width) * data->line_scale_a +
@@ -501,7 +502,7 @@
 {
 	GogLegendView *glv = GOG_LEGEND_VIEW (v);
 	GogLegend *l = GOG_LEGEND (v->model);
-	GogStyle *style = gog_styled_object_get_style (GOG_STYLED_OBJECT (l));
+	GOStyle *style = go_styled_object_get_style (GO_STYLED_OBJECT (l));
 	RenderClosure data;
 	SwatchScaleClosure swatch_data;
 	double swatch_size_min;

Modified: trunk/goffice/graph/gog-object-xml.c
==============================================================================
--- trunk/goffice/graph/gog-object-xml.c	(original)
+++ trunk/goffice/graph/gog-object-xml.c	Fri Apr 10 15:00:10 2009
@@ -460,14 +460,14 @@
 		GogObject *obj;
 
 		if (NULL == type_str) {
-			g_warning ("missing type for property property `%s' of class `%s'",
+			g_warning ("missing type for property `%s' of class `%s'",
 				   prop_str, G_OBJECT_TYPE_NAME (state->obj));
 			return;
 		}
 
 		type = g_type_from_name (type_str);
 		if (0 == type) {
-			g_warning ("unknown type '%s' for property property `%s' of class `%s'",
+			g_warning ("unknown type '%s' for property `%s' of class `%s'",
 				   type_str, prop_str, G_OBJECT_TYPE_NAME (state->obj));
 			return;
 		}
@@ -617,11 +617,3 @@
 	gsf_xml_in_push_state (xin, doc, state,
 		(GsfXMLInExtDtor) go_sax_parser_done, attrs);
 }
-
-void
-go_xml_out_add_color (GsfXMLOut *output, char const *id, GOColor c)
-{
-	char *str = go_color_as_str (c);
-	gsf_xml_out_add_cstr_unchecked (output, id, str);
-	g_free (str);
-}

Modified: trunk/goffice/graph/gog-object-xml.h
==============================================================================
--- trunk/goffice/graph/gog-object-xml.h	(original)
+++ trunk/goffice/graph/gog-object-xml.h	Fri Apr 10 15:00:10 2009
@@ -30,7 +30,6 @@
 G_BEGIN_DECLS
 
 void	   gog_object_set_arg	   (char const *name, char const *val, GogObject *obj);
-void	   go_xml_out_add_color (GsfXMLOut *out, char const *id, GOColor c);
 void	   gog_object_write_xml_sax(GogObject const *obj, GsfXMLOut *output);
 
 /* deprecated as soon as sax import works */

Modified: trunk/goffice/graph/gog-object.c
==============================================================================
--- trunk/goffice/graph/gog-object.c	(original)
+++ trunk/goffice/graph/gog-object.c	Fri Apr 10 15:00:10 2009
@@ -35,171 +35,6 @@
 #include <goffice/gtk/goffice-gtk.h>
 #endif
 
-/*****************************************************************************/
-
-/**
- * gog_editor_new:
- *
- * Returns: a new GogEditor object, which is used to store a collection of
- * 	property edition widgets (pages). The returned object must be freed
- * 	using @gog_editor_free.
- **/
-GogEditor *
-gog_editor_new (void)
-{
-	GogEditor *editor = g_new (GogEditor, 1);
-
-	editor->store_page = NULL;
-	editor->pages = NULL;
-	g_datalist_init (&editor->registered_widgets);
-
-	return editor;
-}
-
-/**
- * gog_editor_free:
- * @editor: a #GogEditor
- *
- * Frees a GogEditor object.
- **/
-
-void
-gog_editor_free (GogEditor *editor)
-{
-	g_slist_foreach (editor->pages, (GFunc) g_free, NULL);
-	g_slist_free (editor->pages);
-	g_datalist_clear (&editor->registered_widgets);
-
-	g_free (editor);
-}
-
-/**
- * gog_editor_add_page:
- * @editor: a #GogEditor
- * @widget: property edition widget
- * @label: a label identifying the widget
- *
- * Adds a page to @editor.
- */
-
-void
-gog_editor_add_page (GogEditor *editor, gpointer widget, char const *label)
-{
-	GogEditorPage *page;
-
-	g_return_if_fail (editor != NULL);
-	page = g_new (GogEditorPage, 1);
-
-	page->widget = widget;
-	page->label = label;
-
-	editor->pages = g_slist_prepend (editor->pages, page);
-}
-
-/**
- * gog_editor_set_store_page:
- * @editor: a #GogEditor
- * @store_page: placeholder for the last selected page
- *
- * Sets a placeholder for storing the last active editor page.
- **/
-
-void
-gog_editor_set_store_page (GogEditor *editor, unsigned *store_page)
-{
-	g_return_if_fail (editor != NULL);
-
-	editor->store_page = store_page;
-}
-
-#ifdef GOFFICE_WITH_GTK
-
-/**
- * gog_editor_register_widget:
- * @editor: a #GogEditor
- * @widget: a #GtkWidget
- * 
- * Registers a widget that then can be retrieved later using 
- * @gog_editor_get_registered_widget. The main use of this function is to 
- * provide the ability to extend a page.
- **/
-void
-gog_editor_register_widget (GogEditor *editor, GtkWidget *widget)
-{
-	g_return_if_fail (editor != NULL);
-	g_return_if_fail (GTK_IS_WIDGET (widget));
-
-	g_datalist_set_data (&editor->registered_widgets, gtk_widget_get_name (widget), widget);
-}
-
-/**
- * gog_editor_get_registered_widget:
- * @editor: a #GogEditor
- * @name: the name of the registered widget
- *
- * Returns: a widget previously registered using @gog_editor_register_widget.
- **/
-GtkWidget *
-gog_editor_get_registered_widget (GogEditor *editor, char const *name)
-{
-	g_return_val_if_fail (editor != NULL, NULL);
-
-	return g_datalist_get_data (&editor->registered_widgets, name);
-}
-
-static void
-cb_switch_page (G_GNUC_UNUSED GtkNotebook *n, G_GNUC_UNUSED GtkNotebookPage *p,
-		guint page_num, guint *store_page)
-{
-		*store_page = page_num;
-}
-
-/**
- * gog_editor_get_notebook:
- * @editor: a #GogEditor
- *
- * Returns: a GtkNotebook from the widget collection stored in @editor.
- **/
-GtkWidget *
-gog_editor_get_notebook (GogEditor *editor)
-{
-	GtkWidget *notebook;
-	GogEditorPage *page;
-	GSList *ptr;
-	unsigned page_count = 0;
-
-	notebook = gtk_notebook_new ();
-	if (editor->pages != NULL) {
-		for (ptr = editor->pages; ptr != NULL; ptr = ptr->next) {
-			page = (GogEditorPage *) ptr->data;
-			gtk_notebook_prepend_page (GTK_NOTEBOOK (notebook),
-						   GTK_WIDGET (page->widget),
-						   gtk_label_new (page->label));
-			gtk_widget_show (page->widget);
-			page_count ++;
-		}
-	} else {
-		/* Display a blank page */
-		GtkWidget *label =  gtk_label_new (NULL);
-		gtk_notebook_prepend_page (GTK_NOTEBOOK (notebook),
-					   label, NULL);
-		gtk_widget_show (label);
-		page_count = 1;
-	}
-
-	if (editor->store_page != NULL) {
-		gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), *editor->store_page);
-		g_signal_connect (G_OBJECT (notebook),
-				  "switch_page",
-				  G_CALLBACK (cb_switch_page), editor->store_page);
-	} else
-		gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), 0);
-
-	return notebook;
-}
-
-#endif
-
 typedef struct {
 	char const *label;
 	char const *value;
@@ -530,7 +365,7 @@
 
 static void
 gog_object_populate_editor (GogObject *gobj, 
-			    GogEditor *editor, 
+			    GOEditor *editor, 
 			    G_GNUC_UNUSED GogDataAllocator *dalloc, 
 			    GOCmdContext *cc)
 {
@@ -692,7 +527,7 @@
 	w = glade_xml_get_widget (gui, "gog_object_prefs");
 	g_object_set_data_full (G_OBJECT (w), "state", state, 
 				(GDestroyNotify) object_pref_state_free);  
-	gog_editor_add_page (editor, w, _("Position"));
+	go_editor_add_page (editor, w, _("Position"));
 }
 #endif
 
@@ -1428,12 +1263,12 @@
 {
 #ifdef GOFFICE_WITH_GTK
 	GtkWidget *notebook;
-	GogEditor *editor;
+	GOEditor *editor;
 	GogObjectClass *klass = GOG_OBJECT_GET_CLASS (obj);
 
 	g_return_val_if_fail (klass != NULL, NULL);
 
-	editor = gog_editor_new ();
+	editor = go_editor_new ();
 	if (klass->populate_editor) {
 		/* If there are pending updates do them before creating the editor
 		 * to avoid expensive widget changes later */
@@ -1441,9 +1276,9 @@
 		(*klass->populate_editor) (obj, editor, dalloc, cc);
 	}
 
-	notebook = gog_editor_get_notebook (editor);
+	notebook = go_editor_get_notebook (editor);
 
-	gog_editor_free (editor);
+	go_editor_free (editor);
 
 	return notebook;
 #else

Modified: trunk/goffice/graph/gog-object.h
==============================================================================
--- trunk/goffice/graph/gog-object.h	(original)
+++ trunk/goffice/graph/gog-object.h	Fri Apr 10 15:00:10 2009
@@ -23,6 +23,7 @@
 
 #include <goffice/graph/goffice-graph.h>
 #include <goffice/app/goffice-app.h>
+#include <goffice/utils/go-editor.h>
 #include <glib-object.h>
 #ifdef GOFFICE_WITH_GTK
 #include <gtk/gtk.h>
@@ -30,27 +31,6 @@
 
 G_BEGIN_DECLS
 
-typedef struct {
-	char const	*label;		/* label for notebook page */
-	gpointer 	 widget;	/* GtkWidget* */	
-} GogEditorPage;
-
-typedef struct {
-	unsigned	*store_page;		/* pointer to a place for storing last edited page */
-	GSList		*pages;			/* GogEditorPage */
-	GData		*registered_widgets;
-} GogEditor;
-
-GogEditor	*gog_editor_new 		  (void);
-void 		 gog_editor_free 		  (GogEditor *editor);
-void		 gog_editor_add_page 		  (GogEditor *editor, gpointer widget, char const *label);
-void 		 gog_editor_set_store_page  	  (GogEditor *editor, unsigned *store_page);
-#ifdef GOFFICE_WITH_GTK
-void 		 gog_editor_register_widget 	  (GogEditor *editor, GtkWidget *widget);
-GtkWidget  	*gog_editor_get_registered_widget (GogEditor *editor, char const *name);
-GtkWidget 	*gog_editor_get_notebook 	  (GogEditor *editor);
-#endif
-
 typedef enum {
 	GOG_OBJECT_NAME_BY_ROLE	 = 1,
 	GOG_OBJECT_NAME_BY_TYPE  = 2,
@@ -116,7 +96,7 @@
 	void	     (*parent_changed)	(GogObject *obj, gboolean was_set);
 	char const  *(*type_name)	(GogObject const *obj);
 	void	     (*populate_editor)	(GogObject *obj, 
-					 GogEditor *editor,
+					 GOEditor *editor,
 					 GogDataAllocator *dalloc, 
 					 GOCmdContext *cc);
 	void	     (*document_changed)(GogObject *obj, GODoc *doc);

Modified: trunk/goffice/graph/gog-outlined-object.c
==============================================================================
--- trunk/goffice/graph/gog-outlined-object.c	(original)
+++ trunk/goffice/graph/gog-outlined-object.c	Fri Apr 10 15:00:10 2009
@@ -21,7 +21,7 @@
 
 #include <goffice/goffice-config.h>
 #include <goffice/graph/gog-outlined-object.h>
-#include <goffice/graph/gog-style.h>
+#include <goffice/utils/go-style.h>
 #include <goffice/graph/gog-theme.h>
 #include <goffice/graph/gog-graph.h>
 #include <goffice/graph/gog-view.h>
@@ -113,9 +113,9 @@
 	GogOutlinedObject *goo = GOG_OUTLINED_OBJECT (v->model);
 	double outline = gog_renderer_line_size (v->renderer, 
 						 goo->base.style->outline.width);
-	double is_outline_visible = gog_style_is_outline_visible (goo->base.style);
+	double is_outline_visible = go_style_is_outline_visible (goo->base.style);
 
-	if (goo->base.style->fill.type != GOG_FILL_STYLE_NONE || is_outline_visible) {
+	if (goo->base.style->fill.type != GO_STYLE_FILL_NONE || is_outline_visible) {
 		req->w += outline * 2 + 
 			gog_renderer_pt2r_y (v->renderer, goo->padding_pts);
 		req->h += outline * 2 + 
@@ -130,10 +130,10 @@
 	GogViewAllocation res = *a;
 	double outline = gog_renderer_line_size (v->renderer, 
 						 goo->base.style->outline.width);
-	double is_outline_visible = gog_style_is_outline_visible (goo->base.style);
+	double is_outline_visible = go_style_is_outline_visible (goo->base.style);
 
 	/* We only need internal padding if there is an outline or a pattern */
-	if (goo->base.style->fill.type != GOG_FILL_STYLE_NONE || is_outline_visible) {
+	if (goo->base.style->fill.type != GO_STYLE_FILL_NONE || is_outline_visible) {
 		double pad_x = gog_renderer_pt2r_x (v->renderer, goo->padding_pts);
 		double pad_y = gog_renderer_pt2r_y (v->renderer, goo->padding_pts);
 		res.x += outline + pad_x/2;

Modified: trunk/goffice/graph/gog-plot.c
==============================================================================
--- trunk/goffice/graph/gog-plot.c	(original)
+++ trunk/goffice/graph/gog-plot.c	Fri Apr 10 15:00:10 2009
@@ -25,7 +25,6 @@
 #include <goffice/graph/gog-series-impl.h>
 #include <goffice/graph/gog-chart.h>
 #include <goffice/graph/gog-axis.h>
-#include <goffice/graph/gog-style.h>
 #include <goffice/graph/gog-theme.h>
 #include <goffice/graph/gog-graph.h>
 #include <goffice/graph/gog-object-xml.h>
@@ -33,6 +32,8 @@
 #include <goffice/data/go-data.h>
 #include <goffice/math/go-math.h>
 #include <goffice/utils/go-persist.h>
+#include <goffice/utils/go-style.h>
+#include <goffice/utils/go-styled-object.h>
 #include <glib/gi18n-lib.h>
 
 #ifdef GOFFICE_WITH_GTK
@@ -251,7 +252,7 @@
 
 static void
 gog_plot_populate_editor (GogObject *obj,
-			  GogEditor *editor,
+			  GOEditor *editor,
 			  G_GNUC_UNUSED GogDataAllocator *dalloc,
 			  GOCmdContext *cc)
 {
@@ -342,7 +343,7 @@
 			gtk_table_set_row_spacings (GTK_TABLE (table), 6);
 			gtk_container_set_border_width (GTK_CONTAINER (table), 12);
 			gtk_widget_show_all (table);
-			gog_editor_add_page (editor, table, _("Axes"));
+			go_editor_add_page (editor, table, _("Axes"));
 		}
 		else
 			g_object_unref (G_OBJECT (table));
@@ -391,7 +392,7 @@
 	w = glade_xml_get_widget (gui, "gog_plot_prefs");
 	g_object_set_data_full (G_OBJECT (w), "state", state, 
 				(GDestroyNotify) plot_pref_state_free);  
-	gog_editor_add_page (editor, w, _("Plot area"));
+	go_editor_add_page (editor, w, _("Plot area"));
 
 	state->update_editor_handler = g_signal_connect (G_OBJECT (plot), 
 							 "update-editor", 
@@ -711,7 +712,7 @@
 {
 	GSList *ptr;
 	GogSeries const *series;
-	GogStyle *style, *tmp_style;
+	GOStyle *style, *tmp_style;
 	GODataVector *labels;
 	unsigned i, n, num_labels = 0;
 	char *label = NULL;
@@ -742,7 +743,7 @@
 
 		for (; ptr != NULL ; ptr = ptr->next)
 			if (!only_visible || gog_series_has_legend (ptr->data)) {
-				func (i, gog_styled_object_get_style (ptr->data),
+				func (i, go_styled_object_get_style (ptr->data),
 				      gog_object_get_name (ptr->data), data);
 				i++;
 			}
@@ -758,7 +759,7 @@
 		labels = GO_DATA_VECTOR (series->values[0].data);
 		num_labels = go_data_vector_get_len (labels);
 	}
-	style = gog_style_dup (series->base.style);
+	style = go_style_dup (series->base.style);
 	n = only_visible ? plot->visible_cardinality : plot->full_cardinality;
 	for (overrides = series->overrides, i = 0; i < n ; i++) {
 		if (overrides != NULL &&

Modified: trunk/goffice/graph/gog-reg-curve.c
==============================================================================
--- trunk/goffice/graph/gog-reg-curve.c	(original)
+++ trunk/goffice/graph/gog-reg-curve.c	Fri Apr 10 15:00:10 2009
@@ -23,7 +23,7 @@
 #include <goffice/graph/gog-reg-curve.h>
 #include <goffice/graph/gog-data-allocator.h>
 #include <goffice/graph/gog-plot-engine.h>
-#include <goffice/graph/gog-style.h>
+#include <goffice/utils/go-style.h>
 #include <goffice/graph/gog-theme.h>
 #include <goffice/graph/gog-view.h>
 #include <goffice/graph/gog-series-impl.h>
@@ -54,9 +54,9 @@
 };
 
 static void
-gog_reg_curve_init_style (GogStyledObject *gso, GogStyle *style)
+gog_reg_curve_init_style (GogStyledObject *gso, GOStyle *style)
 {
-	style->interesting_fields = GOG_STYLE_LINE;
+	style->interesting_fields = GO_STYLE_LINE;
 	gog_theme_fillin_style (gog_object_get_theme (GOG_OBJECT (gso)),
 		style, GOG_OBJECT (gso), 0, FALSE);
 }
@@ -70,7 +70,7 @@
 
 static void
 gog_reg_curve_populate_editor (GogObject	*gobj, 
-			       GogEditor	*editor, 
+			       GOEditor	*editor, 
 			       GogDataAllocator	*dalloc, 
 			       GOCmdContext	*cc)
 {
@@ -83,7 +83,7 @@
 	if (gui == NULL)
 		return;
 
-	gog_editor_add_page (editor, 
+	go_editor_add_page (editor, 
 			     glade_xml_get_widget (gui, "reg-curve-prefs"),
 			     _("Details"));
 
@@ -297,7 +297,7 @@
 	GogChart *chart = GOG_CHART (GOG_OBJECT (plot)->parent);
 	GogAxisMap *x_map, *y_map;
 	GogChartMap *chart_map;
-	GogStyle *style;
+	GOStyle *style;
 	GOPath *path;
 	GSList *ptr;
 	double *x, *y;

Modified: trunk/goffice/graph/gog-renderer.c
==============================================================================
--- trunk/goffice/graph/gog-renderer.c	(original)
+++ trunk/goffice/graph/gog-renderer.c	Fri Apr 10 15:00:10 2009
@@ -19,10 +19,10 @@
  * USA
  */
 #include <goffice/goffice-config.h>
-#include <goffice/graph/gog-style.h>
 #include <goffice/graph/gog-graph.h>
 #include <goffice/graph/gog-graph-impl.h>
 #include <goffice/graph/gog-view.h>
+#include <goffice/graph/gog-renderer.h>
 #include <goffice/math/go-math.h>
 #include <goffice/utils/go-units.h>
 #include <goffice/utils/go-cairo.h>
@@ -75,14 +75,14 @@
 	GClosure *font_watcher;
 	gboolean  needs_update;
 
-	GogStyle const *cur_style;
+	GOStyle const *cur_style;
 	GSList   *style_stack;
 
 	GOLineDashSequence 	*line_dash;
 	GOLineDashSequence 	*outline_dash;
 
-	GogStyle 	*grip_style;
-	GogStyle 	*selection_style;
+	GOStyle 	*grip_style;
+	GOStyle 	*selection_style;
 
 	int 		 w, h;
 
@@ -185,11 +185,11 @@
 static void
 emit_line (GogRenderer *rend, gboolean preserve, GOPathOptions options)
 {
-	GogStyle const *style = rend->cur_style;
+	GOStyle const *style = rend->cur_style;
 	cairo_t *cr = rend->cairo;
 	double width;
 
-	if (!gog_style_is_line_visible (style)) {
+	if (!go_style_is_line_visible (style)) {
 		if (!preserve)
 			cairo_new_path (cr);
 		return;
@@ -218,11 +218,11 @@
 static void
 emit_outline (GogRenderer *rend, gboolean preserve, GOPathOptions options)
 {
-	GogStyle const *style = rend->cur_style;
+	GOStyle const *style = rend->cur_style;
 	cairo_t *cr = rend->cairo;
 	double width;
 
-	if (!gog_style_is_outline_visible (style)) {
+	if (!go_style_is_outline_visible (style)) {
 		if (!preserve)
 			cairo_new_path (cr);
 		return;
@@ -251,11 +251,11 @@
 static void
 emit_fill (GogRenderer *rend, gboolean preserve)
 {
-	GogStyle const *style = rend->cur_style;
+	GOStyle const *style = rend->cur_style;
 	cairo_t *cr = rend->cairo;
 	cairo_pattern_t *cr_pattern = NULL;
 
-	cr_pattern = gog_style_create_cairo_pattern (style, cr);
+	cr_pattern = go_style_create_cairo_pattern (style, cr);
 	if (cr_pattern == NULL) {
 		if (!preserve)
 			cairo_new_path (cr);
@@ -433,7 +433,7 @@
 gog_renderer_stroke_serie (GogRenderer *renderer,
 			   GOPath const *path)
 {
-	GogStyle const *style;
+	GOStyle const *style;
 	GOPathOptions line_options;
 	gboolean is_outline;
 	double width;
@@ -443,13 +443,13 @@
 	g_return_if_fail (GO_IS_PATH (path));
 
         style = renderer->cur_style;
-	is_outline = style->interesting_fields & GOG_STYLE_OUTLINE;
+	is_outline = style->interesting_fields & GO_STYLE_OUTLINE;
 	line_options = go_path_get_options (path);
 	width = _grc_line_size (renderer,
 				is_outline ?  style->outline.width : style->line.width,
 				line_options & GO_PATH_OPTIONS_SNAP_WIDTH);
 
-	if (gog_style_is_line_visible (style)) {
+	if (go_style_is_line_visible (style)) {
 		path_interpret (renderer, path, width);
 		if (is_outline)
 			emit_outline (renderer, FALSE, go_path_get_options (path));
@@ -463,7 +463,7 @@
 			 GOPath const *path,
 			 GOPath const *close_path)
 {
-	GogStyle const *style;
+	GOStyle const *style;
 
 	g_return_if_fail (GOG_IS_RENDERER (renderer));
 	g_return_if_fail (renderer->cur_style != NULL);
@@ -471,7 +471,7 @@
 
 	style = renderer->cur_style;
 
-	if (gog_style_is_fill_visible (style)) {
+	if (go_style_is_fill_visible (style)) {
 		fill_path_interpret (renderer, path, close_path);
 		emit_fill (renderer, FALSE);
 	}
@@ -480,7 +480,7 @@
 static void
 _draw_shape (GogRenderer *renderer, GOPath const *path, gboolean fill, gboolean stroke)
 {
-	GogStyle const *style;
+	GOStyle const *style;
 	GOPathOptions line_options;
 	double width;
 	gboolean use_outline;
@@ -490,7 +490,7 @@
 	g_return_if_fail (GO_IS_PATH (path));
 
         style = renderer->cur_style;
-	use_outline = style->interesting_fields & GOG_STYLE_OUTLINE;
+	use_outline = style->interesting_fields & GO_STYLE_OUTLINE;
 
 	line_options = go_path_get_options (path);
 	width = stroke ? _grc_line_size (renderer, use_outline ? style->outline.width : style->line.width,
@@ -600,16 +600,16 @@
 static void
 _draw_circle (GogRenderer *rend, double x, double y, double r, gboolean fill, gboolean stroke)
 {
-	GogStyle const *style;
+	GOStyle const *style;
 	GOPath *path;
 	gboolean narrow = r < 1.5;
 	double o, o_2;
 
 	g_return_if_fail (GOG_IS_RENDERER (rend));
-	g_return_if_fail (GOG_IS_STYLE (rend->cur_style));
+	g_return_if_fail (GO_IS_STYLE (rend->cur_style));
 
 	style = rend->cur_style;
-	narrow |= !gog_style_is_outline_visible (style);
+	narrow |= !go_style_is_outline_visible (style);
 
 	path = go_path_new ();
 	go_path_set_options (path, GO_PATH_OPTIONS_SHARP);
@@ -657,16 +657,16 @@
 static void
 _draw_rectangle (GogRenderer *rend, GogViewAllocation const *rect, gboolean fill, gboolean stroke)
 {
-	GogStyle const *style;
+	GOStyle const *style;
 	GOPath *path;
 	gboolean narrow = (rect->w < 3.) || (rect->h < 3.);
 	double o, o_2;
 
 	g_return_if_fail (GOG_IS_RENDERER (rend));
-	g_return_if_fail (GOG_IS_STYLE (rend->cur_style));
+	g_return_if_fail (GO_IS_STYLE (rend->cur_style));
 
 	style = rend->cur_style;
-	narrow |= !gog_style_is_outline_visible (style);
+	narrow |= !go_style_is_outline_visible (style);
 
 	path = go_path_new ();
 	go_path_set_options (path, GO_PATH_OPTIONS_SHARP);
@@ -717,16 +717,16 @@
 	GogViewAllocation rectangle;
 
 	if (renderer->grip_style == NULL) {
-		GogStyle *style;
+		GOStyle *style;
 
-		style = gog_style_new ();
+		style = go_style_new ();
 		style->outline.dash_type = GO_LINE_SOLID;
 		style->outline.width = 0.0;
 		style->outline.color =
 		style->fill.pattern.back = 0xff000080;
 		style->fill.pattern.pattern = GO_PATTERN_SOLID;
-		style->fill.type = GOG_FILL_STYLE_PATTERN;
-		style->interesting_fields = GOG_STYLE_FILL | GOG_STYLE_OUTLINE;
+		style->fill.type = GO_STYLE_FILL_PATTERN;
+		style->interesting_fields = GO_STYLE_FILL | GO_STYLE_OUTLINE;
 
 		renderer->grip_style = style;
 	}
@@ -746,14 +746,14 @@
 gog_renderer_draw_selection_rectangle (GogRenderer *renderer, GogViewAllocation const *rectangle)
 {
 	if (renderer->selection_style == NULL) {
-		GogStyle *style;
+		GOStyle *style;
 
-		style = gog_style_new ();
+		style = go_style_new ();
 		style->outline.dash_type = GO_LINE_DOT;
 		style->outline.width = 0.0;
 		style->outline.color = 0x0000ffB0;
-		style->fill.type = GOG_FILL_STYLE_NONE;
-		style->interesting_fields = GOG_STYLE_OUTLINE;
+		style->fill.type = GO_STYLE_FILL_NONE;
+		style->interesting_fields = GO_STYLE_OUTLINE;
 
 		renderer->selection_style = style;
 	}
@@ -839,7 +839,7 @@
 	cairo_t *cairo = rend->cairo;
 	GOGeometryOBR obr;
 	GOGeometryAABR aabr;
-	GogStyle const *style;
+	GOStyle const *style;
 	int iw, ih;
 
 	g_return_if_fail (GOG_IS_RENDERER (rend));
@@ -910,7 +910,7 @@
 gog_renderer_get_text_OBR (GogRenderer *rend, char const *text,
 			   gboolean use_markup, GOGeometryOBR *obr)
 {
-	GogStyle const *style;
+	GOStyle const *style;
 	PangoLayout *layout;
 	PangoContext *context;
 	PangoRectangle logical;
@@ -981,10 +981,10 @@
 }
 
 void
-gog_renderer_push_style (GogRenderer *rend, GogStyle const *style)
+gog_renderer_push_style (GogRenderer *rend, GOStyle const *style)
 {
 	g_return_if_fail (GOG_IS_RENDERER (rend));
-	g_return_if_fail (GOG_IS_STYLE (style));
+	g_return_if_fail (GO_IS_STYLE (style));
 
 	if (rend->cur_style != NULL)
 		rend->style_stack = g_slist_prepend (
@@ -1001,7 +1001,7 @@
 gog_renderer_pop_style (GogRenderer *rend)
 {
 	g_return_if_fail (GOG_IS_RENDERER (rend));
-	g_return_if_fail (GOG_IS_STYLE (rend->cur_style));
+	g_return_if_fail (GO_IS_STYLE (rend->cur_style));
 
 	g_object_unref ((gpointer)rend->cur_style);
 	if (rend->style_stack != NULL) {

Modified: trunk/goffice/graph/gog-renderer.h
==============================================================================
--- trunk/goffice/graph/gog-renderer.h	(original)
+++ trunk/goffice/graph/gog-renderer.h	Fri Apr 10 15:00:10 2009
@@ -26,6 +26,7 @@
 #include <goffice/utils/go-geometry.h>
 #include <goffice/utils/go-image.h>
 #include <goffice/utils/go-path.h>
+#include <goffice/utils/go-style.h>
 #include <glib-object.h>
 
 #include <gsf/gsf.h>
@@ -73,7 +74,6 @@
 #endif
 
 G_BEGIN_DECLS
-
 /* We need to define an hair line width for the svg and gnome_print renderer. 
  * 0.5 pt is approx. the dot size of a 150 dpi printer, if the plot is 
  * printed at scale 1:1 */
@@ -130,7 +130,7 @@
 void  gog_renderer_get_text_AABR  (GogRenderer *rend, char const *text,
 				   gboolean use_markup, GOGeometryAABR *aabr);
 
-void  gog_renderer_push_style     	(GogRenderer *rend, GogStyle const *style);
+void  gog_renderer_push_style     	(GogRenderer *rend, GOStyle const *style);
 void  gog_renderer_pop_style      	(GogRenderer *rend);
 
 void  gog_renderer_push_clip 	  	(GogRenderer *rend, GOPath const *path);

Modified: trunk/goffice/graph/gog-series-impl.h
==============================================================================
--- trunk/goffice/graph/gog-series-impl.h	(original)
+++ trunk/goffice/graph/gog-series-impl.h	Fri Apr 10 15:00:10 2009
@@ -26,7 +26,7 @@
 #include <goffice/graph/gog-styled-object.h>
 #include <goffice/graph/gog-series.h>
 #include <goffice/graph/gog-data-set.h>
-#include <goffice/graph/gog-style.h>
+#include <goffice/utils/go-style.h>
 #include <glib-object.h>
 
 G_BEGIN_DECLS
@@ -42,7 +42,7 @@
 
 	/* Virtuals */
 	gpointer (*gse_populate_editor) (GogObject *gobj,
-					 GogEditor *editor,
+					 GOEditor *editor,
 					 GOCmdContext *cc);
 } GogSeriesElementClass;
 

Modified: trunk/goffice/graph/gog-series-lines.c
==============================================================================
--- trunk/goffice/graph/gog-series-lines.c	(original)
+++ trunk/goffice/graph/gog-series-lines.c	Fri Apr 10 15:00:10 2009
@@ -23,9 +23,11 @@
 #include <goffice/graph/gog-plot.h>
 #include <goffice/graph/gog-renderer.h>
 #include <goffice/graph/gog-series-impl.h>
-#include <goffice/graph/gog-style.h>
+#include <goffice/utils/go-style.h>
 #include <goffice/graph/gog-theme.h>
 #include <goffice/utils/go-marker.h>
+#include <goffice/utils/go-style.h>
+#include <goffice/utils/go-styled-object.h>
 #include "gog-series-lines.h"
 
 #include <gsf/gsf-impl-utils.h>
@@ -39,11 +41,11 @@
 };
 
 static void
-gog_series_lines_init_style (GogStyledObject *gso, GogStyle *style)
+gog_series_lines_init_style (GogStyledObject *gso, GOStyle *style)
 {
 	style->interesting_fields = (GOG_SERIES_LINES (gso)->use_markers)
-		? GOG_STYLE_LINE | GOG_STYLE_MARKER
-		: GOG_STYLE_LINE;
+		? GO_STYLE_LINE | GO_STYLE_MARKER
+		: GO_STYLE_LINE;
 	gog_theme_fillin_style (gog_object_get_theme (GOG_OBJECT (gso)),
 		style, GOG_OBJECT (gso), 0, FALSE);
 }
@@ -97,13 +99,13 @@
 void gog_series_lines_stroke (GogSeriesLines *lines, GogRenderer *rend, 
 		GogViewAllocation const *bbox, GOPath *path, gboolean invert)
 {
-	GogStyle *style = gog_styled_object_get_style (GOG_STYLED_OBJECT (lines));
+	GOStyle *style = go_styled_object_get_style (GO_STYLED_OBJECT (lines));
 
 	if (invert) {
 		GOMarker *marker;
 		GOColor color;
 		
-		style = gog_style_dup (style);
+		style = go_style_dup (style);
 		style->line.color ^= 0xffffff00;
 		marker = style->marker.mark;
 		color = go_marker_get_outline_color (marker);
@@ -113,7 +115,7 @@
 	}
 	gog_renderer_push_style (rend, style);
 	gog_renderer_stroke_serie (rend, path);
-	if ((style->interesting_fields & GOG_STYLE_MARKER) != 0)
+	if ((style->interesting_fields & GO_STYLE_MARKER) != 0)
 		go_path_interpret (path, GO_PATH_DIRECTION_FORWARD,
 				   path_move_to,
 				   path_move_to,

Modified: trunk/goffice/graph/gog-series.c
==============================================================================
--- trunk/goffice/graph/gog-series.c	(original)
+++ trunk/goffice/graph/gog-series.c	Fri Apr 10 15:00:10 2009
@@ -24,10 +24,12 @@
 #include <goffice/graph/gog-data-allocator.h>
 #include <goffice/graph/gog-plot-impl.h>
 #include <goffice/graph/gog-theme.h>
-#include <goffice/graph/gog-style.h>
+#include <goffice/utils/go-style.h>
 #include <goffice/graph/gog-error-bar.h>
 #include <goffice/data/go-data.h>
 #include <goffice/utils/go-persist.h>
+#include <goffice/utils/go-style.h>
+#include <goffice/utils/go-styled-object.h>
 
 #include <gsf/gsf-impl-utils.h>
 #include <glib/gi18n-lib.h>
@@ -80,8 +82,8 @@
 gog_series_element_set_index (GogSeriesElement *gse, int ind)
 {
 	gse->index = ind;
-	gog_styled_object_apply_theme (&gse->base, gse->base.style);
-	gog_styled_object_style_changed (&gse->base);
+	go_styled_object_apply_theme (GO_STYLED_OBJECT (gse), gse->base.style);
+	go_styled_object_style_changed (GO_STYLED_OBJECT (gse));
 }
 
 static void
@@ -145,7 +147,7 @@
 
 static void
 gog_series_element_populate_editor (GogObject *gobj,
-				    GogEditor *editor,
+				    GOEditor *editor,
 			   GogDataAllocator *dalloc,
 			   GOCmdContext *cc)
 {
@@ -178,21 +180,21 @@
 	gtk_widget_show_all (vbox);
 
 	if (gse_vbox == NULL)
-		gog_editor_add_page (editor, vbox, _("Settings"));
+		go_editor_add_page (editor, vbox, _("Settings"));
 
-	gog_editor_set_store_page (editor, &series_element_pref_page);
+	go_editor_set_store_page (editor, &series_element_pref_page);
 }
 #endif
 
 static void
-gog_series_element_init_style (GogStyledObject *gso, GogStyle *style)
+gog_series_element_init_style (GogStyledObject *gso, GOStyle *style)
 {
 	GogSeries const *series = GOG_SERIES (GOG_OBJECT (gso)->parent);
-	GogStyle *parent_style;
+	GOStyle *parent_style;
 
 	g_return_if_fail (series != NULL);
 
-	parent_style = gog_styled_object_get_style (GOG_STYLED_OBJECT (series));
+	parent_style = go_styled_object_get_style (GO_STYLED_OBJECT (series));
 	style->interesting_fields = parent_style->interesting_fields;
 	gog_theme_fillin_style (gog_object_get_theme (GOG_OBJECT (gso)),
 		style, GOG_OBJECT (gso), GOG_SERIES_ELEMENT (gso)->index, FALSE);
@@ -290,8 +292,8 @@
 role_series_element_post_add (GogObject *parent, GogObject *child)
 {
 	GogSeries *series = GOG_SERIES (parent);
-	gog_styled_object_set_style (GOG_STYLED_OBJECT (child),
-		gog_styled_object_get_style (GOG_STYLED_OBJECT (parent)));
+	go_styled_object_set_style (GO_STYLED_OBJECT (child),
+		go_styled_object_get_style (GO_STYLED_OBJECT (parent)));
 	series->overrides = g_list_insert_sorted (series->overrides, child,
 		(GCompareFunc) element_compare);
 }
@@ -446,7 +448,7 @@
 
 static void
 gog_series_populate_editor (GogObject *gobj,
-			    GogEditor *editor,
+			    GOEditor *editor,
 		   GogDataAllocator *dalloc,
 		   GOCmdContext *cc)
 {
@@ -521,11 +523,11 @@
 		0, 2, row, row+1, GTK_FILL, 0, 0, 0);
 	gtk_widget_show_all (GTK_WIDGET (table));
 
-	gog_editor_add_page (editor, GTK_WIDGET (table), _("Data"));
+	go_editor_add_page (editor, GTK_WIDGET (table), _("Data"));
 
 	(GOG_OBJECT_CLASS(series_parent_klass)->populate_editor) (gobj, editor, dalloc, cc);
 
-	box = gog_editor_get_registered_widget (editor, "line_box");
+	box = go_editor_get_registered_widget (editor, "line_box");
 	if (series_class->has_interpolation && box != NULL) {
 		GladeXML *gui;
 		GtkWidget *widget;
@@ -579,7 +581,7 @@
 		}
 	}
 
-	box = gog_editor_get_registered_widget (editor, "fill_extension_box");
+	box = go_editor_get_registered_widget (editor, "fill_extension_box");
 	if (series_class->has_fill_type && box != NULL) {
 		GladeXML *gui;
 		GtkWidget *widget;
@@ -601,7 +603,7 @@
 		}
 	}
 
-	gog_editor_set_store_page (editor, &series_pref_page);
+	go_editor_set_store_page (editor, &series_pref_page);
 }
 #endif
 
@@ -613,7 +615,7 @@
 }
 
 static void
-gog_series_init_style (GogStyledObject *gso, GogStyle *style)
+gog_series_init_style (GogStyledObject *gso, GOStyle *style)
 {
 	GogSeries const *series = (GogSeries const *)gso;
 	style->interesting_fields = series->plot->desc.series.style_fields;
@@ -919,8 +921,8 @@
 		return;
 
 	series->index = ind;
-	gog_styled_object_apply_theme (&series->base, series->base.style);
-	gog_styled_object_style_changed (GOG_STYLED_OBJECT (series));
+	go_styled_object_apply_theme (GO_STYLED_OBJECT (series), series->base.style);
+	go_styled_object_style_changed (GO_STYLED_OBJECT (series));
 }
 
 /**

Modified: trunk/goffice/graph/gog-smoothed-curve.c
==============================================================================
--- trunk/goffice/graph/gog-smoothed-curve.c	(original)
+++ trunk/goffice/graph/gog-smoothed-curve.c	Fri Apr 10 15:00:10 2009
@@ -27,7 +27,7 @@
 #include <goffice/graph/gog-renderer.h>
 #include <goffice/graph/gog-chart-map.h>
 #include <goffice/graph/gog-series-impl.h>
-#include <goffice/graph/gog-style.h>
+#include <goffice/utils/go-style.h>
 #include <goffice/graph/gog-theme.h>
 #include <goffice/graph/gog-view.h>
 #include <gsf/gsf-impl-utils.h>
@@ -38,9 +38,9 @@
 static GObjectClass *smoothed_curve_parent_klass;
 
 static void
-gog_smoothed_curve_init_style (GogStyledObject *gso, GogStyle *style)
+gog_smoothed_curve_init_style (GogStyledObject *gso, GOStyle *style)
 {
-	style->interesting_fields = GOG_STYLE_LINE;
+	style->interesting_fields = GO_STYLE_LINE;
 	gog_theme_fillin_style (gog_object_get_theme (GOG_OBJECT (gso)),
 		style, GOG_OBJECT (gso), 0, FALSE);
 }
@@ -104,7 +104,7 @@
 	GogPlot *plot = series->plot;
 	GogChart *chart = GOG_CHART (GOG_OBJECT (plot)->parent);
 	GogChartMap *chart_map;
-	GogStyle *style;
+	GOStyle *style;
 	GOPath *path;
 
 	if (curve->nb == 0 || curve->x == NULL || curve->y == NULL)

Modified: trunk/goffice/graph/gog-styled-object.c
==============================================================================
--- trunk/goffice/graph/gog-styled-object.c	(original)
+++ trunk/goffice/graph/gog-styled-object.c	Fri Apr 10 15:00:10 2009
@@ -21,11 +21,13 @@
 
 #include <goffice/goffice-config.h>
 #include <goffice/graph/gog-styled-object.h>
-#include <goffice/graph/gog-style.h>
 #include <goffice/graph/gog-theme.h>
 #include <goffice/graph/gog-graph.h>
 #include <goffice/app/go-doc.h>
 #include <goffice/utils/go-persist.h>
+#include <goffice/graph/goffice-graph.h>
+#include <goffice/utils/go-style.h>
+#include <goffice/utils/go-styled-object.h>
 
 #include <glib/gi18n-lib.h>
 #include <gsf/gsf-impl-utils.h>
@@ -41,7 +43,16 @@
 	LAST_SIGNAL
 };
 
-void gog_styled_object_style_changed (GogStyledObject *obj);
+/* GogStyle object: this is a mere copy of GOStyle but is needed for file
+ format compatibility */
+typedef GOStyle GogStyle;
+typedef GObjectClass GogStyleClass;
+GType gog_style_get_type (void);
+GSF_CLASS (GogStyle, gog_style,
+	   NULL, NULL,
+	   GO_TYPE_STYLE);
+
+static void gog_styled_object_style_changed (GOStyledObject *obj);
 	
 static gulong gog_styled_object_signals [LAST_SIGNAL] = { 0, };
 static GObjectClass *parent_klass;
@@ -50,9 +61,9 @@
 gog_styled_object_document_changed (GogObject *obj, GODoc *doc)
 {
 	GogStyledObject *gso = GOG_STYLED_OBJECT (obj);
-	GogStyle *style = gso->style;
-	if ((style->interesting_fields & GOG_STYLE_FILL) &&
-	    (style->fill.type == GOG_FILL_STYLE_IMAGE) &&
+	GOStyle *style = gso->style;
+	if ((style->interesting_fields & GO_STYLE_FILL) &&
+	    (style->fill.type == GO_STYLE_FILL_IMAGE) &&
 	    (style->fill.image.image != NULL)) {
 		GOImage *image;
 		char *id = g_strdup (go_image_get_name (style->fill.image.image));
@@ -82,8 +93,8 @@
 	switch (param_id) {
 
 	case STYLED_OBJECT_PROP_STYLE :
-		resize = gog_styled_object_set_style (gso, 
-	      		g_value_get_object (value));
+		resize = go_styled_object_set_style (GO_STYLED_OBJECT (gso), 
+	      			g_value_get_object (value));
 		break;
 
 	default: G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, param_id, pspec);
@@ -123,16 +134,16 @@
 
 static void
 styled_object_populate_editor (GogObject *gobj, 
-			       GogEditor *editor,
+			       GOEditor *editor,
 			       GogDataAllocator *dalloc,
 		      GOCmdContext *cc)
 {
-	GogStyledObject *gso = GOG_STYLED_OBJECT (gobj);
-	GogStyle *style = gog_style_dup (gog_styled_object_get_style (gso));
+	GOStyledObject *gso = GO_STYLED_OBJECT (gobj);
+	GOStyle *style = go_style_dup (go_styled_object_get_style (gso));
 
 	if (style->interesting_fields != 0) {
-		GogStyle *default_style = gog_styled_object_get_auto_style (gso);
-		gog_style_populate_editor (style, editor, default_style, cc, G_OBJECT (gso), TRUE);
+		GOStyle *default_style = go_styled_object_get_auto_style (gso);
+		go_style_populate_editor (style, editor, default_style, cc, G_OBJECT (gso), TRUE);
 		g_object_unref (default_style);
 	}
 	g_object_unref (style);
@@ -148,15 +159,15 @@
 		GogStyledObject *gso = GOG_STYLED_OBJECT (obj);
 		gog_theme_fillin_style (gog_object_get_theme (GOG_OBJECT (gso)),
 			gso->style, GOG_OBJECT (gso), 0, TRUE);
-		gog_styled_object_apply_theme (gso, gso->style);
+		go_styled_object_apply_theme (GO_STYLED_OBJECT (gso), gso->style);
 	}
 	gog_object_klass->parent_changed (obj, was_set);
 }
 
 static void
-gog_styled_object_init_style (GogStyledObject *gso, GogStyle *style)
+gog_styled_object_init_style (GogStyledObject *gso, GOStyle *style)
 {
-	style->interesting_fields = GOG_STYLE_OUTLINE | GOG_STYLE_FILL; /* default */
+	style->interesting_fields = GO_STYLE_OUTLINE | GO_STYLE_FILL; /* default */
 	gog_theme_fillin_style (gog_object_get_theme (GOG_OBJECT (gso)),
 		style, GOG_OBJECT (gso), 0, FALSE);
 }
@@ -189,117 +200,95 @@
 	g_object_class_install_property (gobject_klass, STYLED_OBJECT_PROP_STYLE,
 		g_param_spec_object ("style", 
 			_("Style"),
-			_("A pointer to the GogStyle object"),
-			GOG_TYPE_STYLE, 
+			_("A pointer to the GOStyle object"),
+			gog_style_get_type (), 
 			GSF_PARAM_STATIC | G_PARAM_READWRITE | GO_PARAM_PERSISTENT));
 }
 
 static void
 gog_styled_object_init (GogStyledObject *gso)
 {
-	gso->style = gog_style_new (); /* use the defaults */
+	gso->style = GO_STYLE (g_object_new (gog_style_get_type (), NULL)); /* use the defaults */
 }
 
-GSF_CLASS (GogStyledObject, gog_styled_object,
-	   gog_styled_object_class_init, gog_styled_object_init,
-	   GOG_TYPE_OBJECT)
-
-/**
- * gog_styled_object_set_style:
- * @gso: a #GogStyledObject
- * @style: a #GogStyle
- *
- * Sets a new style for @gso, and emits "style-changed" signal. This function
- * does not take ownership of @style.
- *
- * return value: %TRUE if new style may lead to change of object size, which
- * happens when changing font size for example. 
- **/
-gboolean
-gog_styled_object_set_style (GogStyledObject *gso,
-			     GogStyle *style)
+static gboolean
+gog_styled_object_set_style (GOStyledObject *gso,
+			     GOStyle *style)
 {
 	gboolean resize;
+	GogStyledObject *ggso;
 
-	g_return_val_if_fail (GOG_IS_STYLED_OBJECT (gso), FALSE);
-
-	if (gso->style == style)
+	g_return_val_if_fail (GO_IS_STYLED_OBJECT (gso), FALSE);
+	ggso = GOG_STYLED_OBJECT (gso);
+	if (ggso->style == style)
 		return FALSE;
-	style = gog_style_dup (style);
+	style = go_style_dup (style);
 
 	/* which fields are we interested in for this object */
-	gog_styled_object_apply_theme (gso, style);
-	resize = gog_style_is_different_size (gso->style, style);
-	if (gso->style != NULL)
-		g_object_unref (gso->style);
-	gso->style = style;
-	gog_styled_object_style_changed (gso);
+	go_styled_object_apply_theme (gso, style);
+	resize = go_style_is_different_size (ggso->style, style);
+	if (ggso->style != NULL)
+		g_object_unref (ggso->style);
+	ggso->style = style;
+	go_styled_object_style_changed (gso);
 
 	return resize;
 }
 
-/**
- * gog_styled_object_get_style:
- * @gso: a #GogStyledObject
- *
- * Simply an accessor function that returns @gso->style, without referencing it.
- * 
- * return value: the styled object's #GogStyle
- **/
-GogStyle *
-gog_styled_object_get_style (GogStyledObject *gso)
-{
-	g_return_val_if_fail (GOG_IS_STYLED_OBJECT (gso), NULL);
-	return gso->style;
-}
-
-/**
- * gog_styled_object_get_auto_style:
- * @gso: a #GogStyledObject
- *
- * This function returns a new style that is initialized with the auto values for @gso.
- * Caller is responsible for the result.
- *
- * return value: a new #GogStyle
- **/
-GogStyle *
-gog_styled_object_get_auto_style (GogStyledObject *gso)
-{
-	GogStyle *res = gog_style_dup (gso->style);
-	gog_style_force_auto (res);
-	gog_styled_object_apply_theme (gso, res);
+static GOStyle *
+gog_styled_object_get_style (GOStyledObject *gso)
+{
+	g_return_val_if_fail (GO_IS_STYLED_OBJECT (gso), NULL);
+	return GOG_STYLED_OBJECT (gso)->style;
+}
+
+static GOStyle *
+gog_styled_object_get_auto_style (GOStyledObject *gso)
+{
+	GOStyle *res = go_style_dup (GOG_STYLED_OBJECT (gso)->style);
+	go_style_force_auto (res);
+	go_styled_object_apply_theme (gso, res);
 	return res;
 }
 
-/**
- * gog_styled_object_apply_theme:
- * @gso: a #GogStyledObject
- * @style: a #GogStyle that will be themed
- *
- * Apply theme of @gso's parent graph to @style, i.e. properties with 
- * auto flag set to %TRUE are changed to default theme value.
- *
- **/
-void
-gog_styled_object_apply_theme (GogStyledObject *gso, GogStyle *style)
+static void
+gog_styled_object_apply_theme (GOStyledObject *gso, GOStyle *style)
 {
 	GogGraph const *graph = gog_object_get_graph (GOG_OBJECT (gso));
 	if (graph != NULL) {
 		GogStyledObjectClass *klass = GOG_STYLED_OBJECT_GET_CLASS (gso);
-		(klass->init_style) (gso, style);
+		(klass->init_style) (GOG_STYLED_OBJECT (gso), style);
 	}
 }
 
-/**
- * gog_styled_object_style_changed:
- * @gso: a #GogStyledObject
- *
- * Emits the "style-changed" signal.
- *
- **/
-void
-gog_styled_object_style_changed (GogStyledObject *gso)
+static void
+gog_styled_object_style_changed (GOStyledObject *gso)
 {
 	g_signal_emit (G_OBJECT (gso),
-		gog_styled_object_signals [STYLE_CHANGED], 0, gso->style);
+		gog_styled_object_signals [STYLE_CHANGED], 0, GOG_STYLED_OBJECT (gso)->style);
 }
+
+static GODoc*
+gog_styled_object_get_document (GOStyledObject *gso)
+{
+	GODoc *doc = NULL;
+	GogGraph *graph = gog_object_get_graph (GOG_OBJECT (gso));
+	g_object_get (graph, "document", &doc, NULL);
+	return doc;
+}
+
+static void
+gog_styled_object_so_init (GOStyledObjectClass *iface)
+{
+	iface->set_style = gog_styled_object_set_style;
+	iface->get_style = gog_styled_object_get_style;
+	iface->get_auto_style = gog_styled_object_get_auto_style;
+	iface->style_changed = gog_styled_object_style_changed;
+	iface->apply_theme = gog_styled_object_apply_theme;
+	iface->get_document = gog_styled_object_get_document;
+}
+
+GSF_CLASS_FULL (GogStyledObject, gog_styled_object, NULL, NULL,
+	   gog_styled_object_class_init, NULL, gog_styled_object_init,
+	   GOG_TYPE_OBJECT, 0,
+	   GSF_INTERFACE (gog_styled_object_so_init, GO_TYPE_STYLED_OBJECT))

Modified: trunk/goffice/graph/gog-styled-object.h
==============================================================================
--- trunk/goffice/graph/gog-styled-object.h	(original)
+++ trunk/goffice/graph/gog-styled-object.h	Fri Apr 10 15:00:10 2009
@@ -23,23 +23,24 @@
 
 #include <goffice/graph/goffice-graph.h>
 #include <goffice/graph/gog-object.h>
+#include <goffice/utils/goffice-utils.h>
 
 G_BEGIN_DECLS
 
 struct _GogStyledObject {
 	GogObject	base;
 
-	GogStyle	*style;
+	GOStyle	*style;
 };
 
 typedef struct {
 	GogObjectClass base;
 
 	/* virtual */
-	void	  (*init_style)     	(GogStyledObject *obj, GogStyle *style);
+	void	  (*init_style)     	(GogStyledObject *obj, GOStyle *style);
 
 	/* signal */
-	void (*style_changed) (GogStyledObject *obj, GogStyle const *new_style);
+	void (*style_changed) (GogStyledObject *obj, GOStyle const *new_style);
 } GogStyledObjectClass;
 
 #define GOG_TYPE_STYLED_OBJECT	(gog_styled_object_get_type ())
@@ -49,12 +50,6 @@
 
 GType     gog_styled_object_get_type (void);
 
-gboolean  gog_styled_object_set_style 	   (GogStyledObject *gso, GogStyle *style);
-GogStyle *gog_styled_object_get_style	   (GogStyledObject *gso);
-GogStyle *gog_styled_object_get_auto_style (GogStyledObject *gso);
-void	  gog_styled_object_style_changed  (GogStyledObject *gso);
-void	  gog_styled_object_apply_theme	   (GogStyledObject *gso, GogStyle *style);
-
 G_END_DECLS
 
 #endif /* GOG_STYLED_OBJECT_H */

Modified: trunk/goffice/graph/gog-theme.c
==============================================================================
--- trunk/goffice/graph/gog-theme.c	(original)
+++ trunk/goffice/graph/gog-theme.c	Fri Apr 10 15:00:10 2009
@@ -21,7 +21,6 @@
 
 #include <goffice/goffice-config.h>
 #include <goffice/graph/gog-theme.h>
-#include <goffice/graph/gog-style.h>
 #include <goffice/graph/gog-object.h>
 #include <goffice/utils/go-color.h>
 #include <goffice/utils/go-gradient.h>
@@ -32,14 +31,14 @@
 #include <glib/gi18n-lib.h>
 #include <string.h>
 
-typedef void (*GogThemeStyleMap) (GogStyle *style, unsigned ind);
+typedef void (*GogThemeStyleMap) (GOStyle *style, unsigned ind);
 
 typedef struct {
 	/* If role is non-null, klass_name specifies the container class,
 	 * If role is null, klass_name specifies object type */
 	char const 	 *klass_name;
 	char const 	 *role_id;
-	GogStyle   	 *style;
+	GOStyle   	 *style;
 	GogThemeStyleMap  map;
 } GogThemeElement;
 
@@ -51,7 +50,7 @@
 	GHashTable	*elem_hash_by_role;
 	GHashTable	*elem_hash_by_class;
 	GHashTable	*class_aliases;
-	GogStyle	*default_style;
+	GOStyle	*default_style;
 };
 
 typedef GObjectClass GogThemeClass;
@@ -202,7 +201,7 @@
 /**
  * gog_theme_fillin_style :
  * @theme: #GogTheme
- * @style: #GogStyle to initialize
+ * @style: #GOStyle to initialize
  * @obj: #GogObject The object associated with @style
  * @ind: an optional index
  * @complete_overwrite: boolean
@@ -213,7 +212,7 @@
  **/
 void
 gog_theme_fillin_style (GogTheme const *theme, 
-			GogStyle *style,
+			GOStyle *style,
 			GogObject const *obj, 
 			int ind, 
 			gboolean complete_overwrite)
@@ -223,9 +222,9 @@
 	g_return_if_fail (elem != NULL);
 
 	if (complete_overwrite)
-		gog_style_assign (style, elem->style);
+		go_style_assign (style, elem->style);
 	else
-		gog_style_apply_theme (style, elem->style);
+		go_style_apply_theme (style, elem->style);
 
 /* FIXME FIXME FIXME we should handle the applicability here not in the map */
 	if (ind >= 0 && elem->map)
@@ -264,7 +263,7 @@
 #endif
 
 static void
-gog_theme_add_element (GogTheme *theme, GogStyle *style,
+gog_theme_add_element (GogTheme *theme, GOStyle *style,
 		       GogThemeStyleMap	map,
 		       char const *klass_name, char const *role_id)
 {
@@ -303,7 +302,7 @@
 /**************************************************************************/
 
 static void
-map_marker (GogStyleMark *mark, unsigned shape, unsigned palette_index,
+map_marker (GOStyleMark *mark, unsigned shape, unsigned palette_index,
 	    GOColor const *palette)
 {
 	static GOMarkerShape const shape_palette [] = {
@@ -336,7 +335,7 @@
 }
 
 static void
-map_area_series_solid_default (GogStyle *style, unsigned ind)
+map_area_series_solid_default (GOStyle *style, unsigned ind)
 {
 	static GOColor const palette [] = {
 		0x9c9cffff, 0x9c3163ff, 0xffffceff, 0xceffffff, 0x630063ff,
@@ -359,23 +358,23 @@
 		style->fill.pattern.back = palette [palette_index];
 
 		/* force the brightness to reinterpolate */
-		if (style->fill.type == GOG_FILL_STYLE_GRADIENT &&
+		if (style->fill.type == GO_STYLE_FILL_GRADIENT &&
 		    style->fill.gradient.brightness >= 0)
-			gog_style_set_fill_brightness (style,
+			go_style_set_fill_brightness (style,
 				style->fill.gradient.brightness);
 	}
 
 	palette_index += 8;
 	if (palette_index >= G_N_ELEMENTS (palette))
 		palette_index -= G_N_ELEMENTS (palette);
-	if (style->line.auto_color && !(style->disable_theming & GOG_STYLE_LINE))
+	if (style->line.auto_color && !(style->disable_theming & GO_STYLE_LINE))
 		style->line.color = palette [palette_index];
-	if (!(style->disable_theming & GOG_STYLE_MARKER))
+	if (!(style->disable_theming & GO_STYLE_MARKER))
 		map_marker (&style->marker, ind, palette_index, palette);
 }
 
 static void
-map_area_series_solid_guppi (GogStyle *style, unsigned ind)
+map_area_series_solid_guppi (GOStyle *style, unsigned ind)
 {
 	static GOColor const palette[] = {
 		0xff3000ff, 0x80ff00ff, 0x00ffcfff, 0x2000ffff,
@@ -393,15 +392,15 @@
 		palette_index %= G_N_ELEMENTS (palette);
 	if (style->fill.auto_back) {
 		style->fill.pattern.back = palette [palette_index];
-		if (style->fill.type == GOG_FILL_STYLE_GRADIENT &&
+		if (style->fill.type == GO_STYLE_FILL_GRADIENT &&
 		    style->fill.gradient.brightness >= 0)
 			/* force the brightness to reinterpolate */
-			gog_style_set_fill_brightness (style,
+			go_style_set_fill_brightness (style,
 				style->fill.gradient.brightness);
 	}
-	if (style->line.auto_color && !(style->disable_theming & GOG_STYLE_LINE))
+	if (style->line.auto_color && !(style->disable_theming & GO_STYLE_LINE))
 		style->line.color = palette [palette_index];
-	if (!(style->disable_theming & GOG_STYLE_MARKER))
+	if (!(style->disable_theming & GO_STYLE_MARKER))
 		map_marker (&style->marker, ind, palette_index, palette);
 }
 
@@ -482,7 +481,7 @@
 gog_themes_init	(void)
 {
 	GogTheme *theme;
-	GogStyle *style;
+	GOStyle *style;
 
 	if (NULL == global_class_aliases) {
 		global_class_aliases = g_hash_table_new (
@@ -496,47 +495,47 @@
 	gog_theme_registry_add (theme, TRUE);
 
 	/* graph */
-	style = gog_style_new ();
+	style = go_style_new ();
 	style->outline.dash_type = GO_LINE_NONE;
 	style->outline.width = 0;
 	style->outline.color = RGBA_BLACK;
-	style->fill.type = GOG_FILL_STYLE_NONE;
+	style->fill.type = GO_STYLE_FILL_NONE;
 	go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
 	gog_theme_add_element (theme, style, NULL, "GogGraph", NULL);
 
 	/* chart */
-	style = gog_style_new ();
+	style = go_style_new ();
 	style->outline.dash_type = GO_LINE_SOLID;
 	style->outline.width = 0; /* hairline */
 	style->outline.color = RGBA_BLACK;
-	style->fill.type = GOG_FILL_STYLE_PATTERN;
+	style->fill.type = GO_STYLE_FILL_PATTERN;
 	go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
 	gog_theme_add_element (theme, style, NULL, "GogChart", NULL);
 
 	/* Legend */
-	style = gog_style_new ();
+	style = go_style_new ();
 	style->outline.dash_type = GO_LINE_SOLID;
 	style->outline.width = 0; /* hairline */
 	style->outline.color = RGBA_BLACK;
-	style->fill.type = GOG_FILL_STYLE_PATTERN;
+	style->fill.type = GO_STYLE_FILL_PATTERN;
 	go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
 	gog_theme_add_element (theme, style, NULL, "GogLegend", NULL);
 
 	/* Axis */
-	style = gog_style_new ();
+	style = go_style_new ();
 	style->line.width = 0; /* hairline */
 	style->line.color = RGBA_BLACK;
 	gog_theme_add_element (theme, style, NULL, "GogAxis", NULL);
 
 	/* AxisLine */
-	style = gog_style_new ();
+	style = go_style_new ();
 	style->line.width = 0; /* hairline */
 	style->line.color = RGBA_BLACK;
 	gog_theme_add_element (theme, style, NULL, "GogAxisLine", NULL);
 
 	/* Grid */
-	style = gog_style_new ();
-	style->fill.type  = GOG_FILL_STYLE_PATTERN;
+	style = go_style_new ();
+	style->fill.type  = GO_STYLE_FILL_PATTERN;
 	style->outline.dash_type = GO_LINE_SOLID;
 	style->outline.width = 1.;
 	style->outline.color = 0X848284ff;
@@ -544,86 +543,86 @@
 	gog_theme_add_element (theme, style, NULL, "GogGrid", NULL);
 
 	/* GridLine */
-	style = gog_style_new ();
+	style = go_style_new ();
 	style->outline.dash_type = GO_LINE_SOLID;
 	style->line.width = 0.4; 
 	style->line.color = RGBA_BLACK;
 	go_pattern_set_solid (&style->fill.pattern, RGBA_TO_UINT (0xE0, 0xE0, 0xE0, 0xE0));
-	style->fill.type = GOG_FILL_STYLE_NONE;
+	style->fill.type = GO_STYLE_FILL_NONE;
 	gog_theme_add_element (theme, style, NULL, NULL, "MajorGrid");
-	style = gog_style_new ();
+	style = go_style_new ();
 	style->outline.dash_type = GO_LINE_SOLID;
 	style->line.width = 0.2; 
 	style->line.color = RGBA_BLACK; 
 	go_pattern_set_solid (&style->fill.pattern, RGBA_TO_UINT (0xE0, 0xE0, 0xE0, 0xE0));
-	style->fill.type = GOG_FILL_STYLE_NONE;
+	style->fill.type = GO_STYLE_FILL_NONE;
 	gog_theme_add_element (theme, style, NULL, NULL, "MinorGrid");
 	
 	/* Series */
-	style = gog_style_new ();
+	style = go_style_new ();
 	style->outline.dash_type = GO_LINE_SOLID;
 	style->outline.width = 0; /* hairline */
 	style->outline.color = RGBA_BLACK;
-	style->fill.type = GOG_FILL_STYLE_PATTERN;
+	style->fill.type = GO_STYLE_FILL_PATTERN;
 	/* FIXME : not really true, will want to split area from line */
 	gog_theme_add_element (theme, style,
 		map_area_series_solid_default, "GogSeries", NULL);
 
 	/* Chart titles */
-	style = gog_style_new ();
+	style = go_style_new ();
 	style->outline.dash_type = GO_LINE_NONE;
 	style->outline.width = 0.;
 	style->outline.color = RGBA_BLACK;
-	style->fill.type = GOG_FILL_STYLE_NONE;
+	style->fill.type = GO_STYLE_FILL_NONE;
 	go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
-	gog_style_set_font_desc (style, pango_font_description_from_string ("Sans Bold 12"));
+	go_style_set_font_desc (style, pango_font_description_from_string ("Sans Bold 12"));
 	gog_theme_add_element (theme, style, NULL, "GogChart", "Title");
 
 	/* labels */
-	style = gog_style_new ();
+	style = go_style_new ();
 	style->outline.dash_type = GO_LINE_NONE;
 	style->outline.width = 0.;
 	style->outline.color = RGBA_BLACK;
-	style->fill.type = GOG_FILL_STYLE_NONE;
+	style->fill.type = GO_STYLE_FILL_NONE;
 	go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
-	gog_style_set_font_desc (style, pango_font_description_from_string ("Sans 10"));
+	go_style_set_font_desc (style, pango_font_description_from_string ("Sans 10"));
 	gog_theme_add_element (theme, style, NULL, "GogLabel", NULL);
 
 	/* regression curves */
-	style = gog_style_new ();
+	style = go_style_new ();
 	style->line.dash_type = GO_LINE_SOLID;
 	style->line.width = 1;
 	style->line.color = RGBA_BLACK;
 	go_pattern_set_solid (&style->fill.pattern, RGBA_TO_UINT (0x00, 0x00, 0x00, 0x20));
-	style->fill.type = GOG_FILL_STYLE_NONE;
+	style->fill.type = GO_STYLE_FILL_NONE;
 	gog_theme_add_element (theme, style,
 		NULL, "GogTrendLine", NULL);
 
 	/* regression equations */
-	style = gog_style_new ();
+	style = go_style_new ();
 	style->outline.dash_type = GO_LINE_SOLID;
 	style->outline.width = 0; /* hairline */
 	style->outline.color = RGBA_BLACK;
-	style->fill.type = GOG_FILL_STYLE_PATTERN;
+	style->fill.type = GO_STYLE_FILL_PATTERN;
 	go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
 	gog_theme_add_element (theme, style,
 		NULL, "GogRegEqn", NULL);
 
 #ifdef GOFFICE_WITH_GMATHML
 	/* Equations */
-	style = gog_style_new ();
+	style = go_style_new ();
 	style->outline.dash_type = GO_LINE_NONE;
 	style->outline.width = 0; /* hairline */
 	style->outline.color = RGBA_BLACK;
-	style->fill.type = GOG_FILL_STYLE_NONE;
+	style->fill.type = GO_STYLE_FILL_NONE;
 	go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
-	gog_style_set_font_desc (style, pango_font_description_from_string ("Sans 10"));
+	go_style_set_font_desc (style, pango_font_description_from_string ("Sans 10"));
 	gog_theme_add_element (theme, style,
 		NULL, "GogEquation", NULL);
 #endif
 
 	/* series lines */
-	style = gog_style_new ();
+	style = go_style_new ();
 	gog_theme_add_element (theme, style,
 		map_area_series_solid_default, "GogSeriesLines", NULL);
 
@@ -632,51 +631,51 @@
 	gog_theme_registry_add (theme, FALSE);
 
 	/* graph */
-	style = gog_style_new ();
+	style = go_style_new ();
 	style->outline.dash_type = GO_LINE_NONE;
 	style->outline.width = 0; 
 	style->outline.color = RGBA_BLACK; 
-	style->fill.type = GOG_FILL_STYLE_GRADIENT;
+	style->fill.type = GO_STYLE_FILL_GRADIENT;
 	style->fill.gradient.dir   = GO_GRADIENT_N_TO_S;
 	style->fill.pattern.fore = RGBA_BLUE;
 	style->fill.pattern.back = RGBA_BLACK;
 	gog_theme_add_element (theme, style, NULL, "GogGraph", NULL);
 
 	/* chart */
-	style = gog_style_new ();
+	style = go_style_new ();
 	style->outline.dash_type = GO_LINE_SOLID;
 	style->outline.width = 0; /* hairline */
 	style->outline.color = RGBA_BLACK;
-	style->fill.type = GOG_FILL_STYLE_PATTERN;
+	style->fill.type = GO_STYLE_FILL_PATTERN;
 	go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
 	gog_theme_add_element (theme, style, NULL, "GogChart", NULL);
 
 	/* legend */
-	style = gog_style_new ();
+	style = go_style_new ();
 	style->outline.dash_type = GO_LINE_SOLID;
 	style->outline.width = 0; /* hairline */
 	style->outline.color = RGBA_BLACK;
-	style->fill.type = GOG_FILL_STYLE_PATTERN;
+	style->fill.type = GO_STYLE_FILL_PATTERN;
 	go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
 	gog_theme_add_element (theme, style, NULL, "GogLegend", NULL);
 
 	/* Axis */
-	style = gog_style_new ();
+	style = go_style_new ();
 	style->line.dash_type = GO_LINE_SOLID;
 	style->line.width = 0.; /* hairline */
 	style->line.color = RGBA_GREY (0x20);
 	gog_theme_add_element (theme, style, NULL, "GogAxis", NULL);
 	
 	/* AxisLine */
-	style = gog_style_new ();
+	style = go_style_new ();
 	style->line.dash_type = GO_LINE_SOLID;
 	style->line.width = 0.; /* hairline */
 	style->line.color = RGBA_GREY (0x20);
 	gog_theme_add_element (theme, style, NULL, "GogAxisLine", NULL);
 
 	/* Grid */
-	style = gog_style_new ();
-	style->fill.type  = GOG_FILL_STYLE_PATTERN;
+	style = go_style_new ();
+	style->fill.type  = GO_STYLE_FILL_PATTERN;
 	style->outline.dash_type = GO_LINE_NONE;
 	style->outline.color = RGBA_BLACK;
 	style->outline.width = 0;
@@ -684,76 +683,76 @@
 	gog_theme_add_element (theme, style, NULL, "GogGrid", NULL);
 
 	/* GridLine */
-	style = gog_style_new ();
+	style = go_style_new ();
 	style->line.dash_type = GO_LINE_SOLID;
 	style->line.width = 0.; /* hairline */
 	style->line.color = RGBA_GREY (0x96);
 	go_pattern_set_solid (&style->fill.pattern, RGBA_TO_UINT (0xE0, 0xE0, 0xE0, 0xE0));
-	style->fill.type = GOG_FILL_STYLE_NONE;
+	style->fill.type = GO_STYLE_FILL_NONE;
 	gog_theme_add_element (theme, style, NULL, NULL, "MajorGrid");
-	style = gog_style_new ();
+	style = go_style_new ();
 	style->line.dash_type = GO_LINE_SOLID;
 	style->line.width = 0.; /* hairline */
 	style->line.color = RGBA_GREY (0xC0);
 	go_pattern_set_solid (&style->fill.pattern, RGBA_TO_UINT (0xE0, 0xE0, 0xE0, 0xE0));
-	style->fill.type = GOG_FILL_STYLE_NONE;
+	style->fill.type = GO_STYLE_FILL_NONE;
 	gog_theme_add_element (theme, style, NULL, NULL, "MinorGrid");
 	
 	/* series */
-	style = gog_style_new ();
+	style = go_style_new ();
 	style->outline.dash_type = GO_LINE_SOLID;
 	style->outline.width = 0.; /* hairline */
 	style->outline.color = RGBA_BLACK;
-	style->fill.type = GOG_FILL_STYLE_PATTERN;
+	style->fill.type = GO_STYLE_FILL_PATTERN;
 	go_pattern_set_solid (&style->fill.pattern, RGBA_GREY (0x20));
 	/* FIXME : not really true, will want to split area from line */
 	gog_theme_add_element (theme, style,
 		map_area_series_solid_guppi, "GogSeries", NULL);
 
 	/* labels */
-	style = gog_style_new ();
+	style = go_style_new ();
 	style->outline.dash_type = GO_LINE_NONE;
 	style->outline.width = 0; /* none */
 	style->outline.color = RGBA_BLACK;
-	style->fill.type = GOG_FILL_STYLE_NONE;
+	style->fill.type = GO_STYLE_FILL_NONE;
 	go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
 	gog_theme_add_element (theme, style, NULL, "GogLabel", NULL);
 
 	/* trend lines */
-	style = gog_style_new ();
+	style = go_style_new ();
 	style->line.dash_type = GO_LINE_SOLID;
 	style->line.width = 1;
 	style->line.color = RGBA_BLACK;
 	go_pattern_set_solid (&style->fill.pattern, RGBA_TO_UINT (0x00, 0x00, 0x00, 0x20));
-	style->fill.type = GOG_FILL_STYLE_NONE;
+	style->fill.type = GO_STYLE_FILL_NONE;
 	gog_theme_add_element (theme, style,
 		NULL, "GogTrendLine", NULL);
 
 	/* regression equations */
-	style = gog_style_new ();
+	style = go_style_new ();
 	style->outline.dash_type = GO_LINE_SOLID;
 	style->outline.width = 0; /* hairline */
 	style->outline.color = RGBA_BLACK;
-	style->fill.type = GOG_FILL_STYLE_PATTERN;
+	style->fill.type = GO_STYLE_FILL_PATTERN;
 	go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
 	gog_theme_add_element (theme, style,
 		NULL, "GogRegEqn", NULL);
 
 #ifdef GOFFICE_WITH_GMATHML
 	/* Equations */
-	style = gog_style_new ();
+	style = go_style_new ();
 	style->outline.dash_type = GO_LINE_NONE;
 	style->outline.width = 0; /* hairline */
 	style->outline.color = RGBA_BLACK;
-	style->fill.type = GOG_FILL_STYLE_NONE;
+	style->fill.type = GO_STYLE_FILL_NONE;
 	go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
-	gog_style_set_font_desc (style, pango_font_description_from_string ("Sans 10"));
+	go_style_set_font_desc (style, pango_font_description_from_string ("Sans 10"));
 	gog_theme_add_element (theme, style,
 		NULL, "GogEquation", NULL);
 #endif
 
 	/* series lines */
-	style = gog_style_new ();
+	style = go_style_new ();
 	gog_theme_add_element (theme, style,
 		NULL, "GogSeriesLines", NULL);
 }

Modified: trunk/goffice/graph/gog-theme.h
==============================================================================
--- trunk/goffice/graph/gog-theme.h	(original)
+++ trunk/goffice/graph/gog-theme.h	Fri Apr 10 15:00:10 2009
@@ -22,6 +22,8 @@
 #define GOG_THEME_H
 
 #include <goffice/graph/goffice-graph.h>
+#include <goffice/graph/goffice-graph.h>
+#include <goffice/utils/go-style.h>
 #include <glib-object.h>
 
 G_BEGIN_DECLS
@@ -35,7 +37,7 @@
 GogTheme   *gog_theme_new        	(char const *name);
 GogTheme   *gog_theme_new_from_file     (char const *name, char const *file);
 char const *gog_theme_get_name 		(GogTheme const *theme);
-void 	    gog_theme_fillin_style    	(GogTheme const *theme, GogStyle *style,
+void 	    gog_theme_fillin_style    	(GogTheme const *theme, GOStyle *style,
 				         GogObject const *obj, int ind,
 				         gboolean complete_overwrite);
 

Modified: trunk/goffice/graph/gog-trend-line.c
==============================================================================
--- trunk/goffice/graph/gog-trend-line.c	(original)
+++ trunk/goffice/graph/gog-trend-line.c	Fri Apr 10 15:00:10 2009
@@ -21,16 +21,17 @@
 
 #include <goffice/goffice-config.h>
 #include "gog-trend-line.h"
+#include <goffice/graph/gog-object-xml.h>
 #include <goffice/graph/gog-plot-engine.h>
-#include <goffice/graph/gog-style.h>
 #include <goffice/graph/gog-theme.h>
+#include <goffice/utils/go-style.h>
 #include <gsf/gsf-impl-utils.h>
 #include <glib/gi18n-lib.h>
 
 static void
-gog_trend_line_init_style (GogStyledObject *gso, GogStyle *style)
+gog_trend_line_init_style (GogStyledObject *gso, GOStyle *style)
 {
-	style->interesting_fields = GOG_STYLE_LINE;
+	style->interesting_fields = GO_STYLE_LINE;
 	gog_theme_fillin_style (gog_object_get_theme (GOG_OBJECT (gso)),
 		style, GOG_OBJECT (gso), 0, FALSE);
 }

Modified: trunk/goffice/graph/gog-view.c
==============================================================================
--- trunk/goffice/graph/gog-view.c	(original)
+++ trunk/goffice/graph/gog-view.c	Fri Apr 10 15:00:10 2009
@@ -24,8 +24,8 @@
 #include <goffice/graph/gog-view.h>
 #include <goffice/graph/gog-object.h>
 #include <goffice/graph/gog-renderer.h>
-#include <goffice/graph/gog-styled-object.h>
-#include <goffice/graph/gog-style.h>
+#include <goffice/utils/go-styled-object.h>
+#include <goffice/utils/go-style.h>
 
 #include <goffice/utils/go-color.h>
 
@@ -48,7 +48,7 @@
 gog_tool_select_object_render (GogView *view)
 {
 	GogViewAllocation rect = view->allocation;
-	GogStyle *style = gog_styled_object_get_style (GOG_STYLED_OBJECT (view->model));
+	GOStyle *style = go_styled_object_get_style (GO_STYLED_OBJECT (view->model));
 	double line_width = gog_renderer_line_size (view->renderer, style->line.width);
 
 	rect.x -= line_width / 2.0;

Modified: trunk/goffice/math/go-R.h
==============================================================================
--- trunk/goffice/math/go-R.h	(original)
+++ trunk/goffice/math/go-R.h	Fri Apr 10 15:00:10 2009
@@ -23,6 +23,8 @@
 #ifndef GO_R_H
 #define GO_R_H
 
+G_BEGIN_DECLS
+
 double go_trunc (double);
 double go_dnorm (double x, double mu, double sigma, gboolean give_log);
 double go_pnorm (double x, double mu, double sigma, gboolean lower_tail, gboolean log_p);
@@ -57,4 +59,6 @@
 
 #endif
 
+G_END_DECLS
+
 #endif /* GO_R_H */

Modified: trunk/goffice/math/go-matrix3x3.h
==============================================================================
--- trunk/goffice/math/go-matrix3x3.h	(original)
+++ trunk/goffice/math/go-matrix3x3.h	Fri Apr 10 15:00:10 2009
@@ -25,6 +25,8 @@
 
 #include <glib.h>
 
+G_BEGIN_DECLS
+
 typedef struct {
 	gdouble a11, a12, a13, a21, a22, a23, a31, a32, a33;
 } GOMatrix3x3;
@@ -45,4 +47,6 @@
 void go_matrix3x3_multiply (GOMatrix3x3 *dest,
 				GOMatrix3x3 const *src1, GOMatrix3x3 const *src2);
 
+G_END_DECLS
+
 #endif /* GO_MATRIX3X3_H */

Modified: trunk/goffice/utils/Makefile.am
==============================================================================
--- trunk/goffice/utils/Makefile.am	(original)
+++ trunk/goffice/utils/Makefile.am	Fri Apr 10 15:00:10 2009
@@ -28,7 +28,10 @@
 	go-libxml-extras.c	\
 	go-pango-extras.c	\
 	go-persist.c	\
-	go-bezier.c
+	go-bezier.c		\
+	go-editor.c		\
+	go-style.c		\
+	go-styled-object.c
 
 libgoffice_utils_ladir = $(goffice_include_dir)/utils
 libgoffice_utils_la_HEADERS = 	\
@@ -54,7 +57,14 @@
 	go-libxml-extras.h	\
 	go-pango-extras.h	\
 	go-persist.h	\
-	go-bezier.h
+	go-bezier.h		\
+	go-editor.h		\
+	go-style.h		\
+	go-styled-object.h
+
+gladedir = $(goffice_datadir)/glade
+dist_glade_DATA = \
+	go-style-prefs.glade
 
 CLEANFILES =			\
 	go-marshalers.h		\

Added: trunk/goffice/utils/go-editor.c
==============================================================================
--- (empty file)
+++ trunk/goffice/utils/go-editor.c	Fri Apr 10 15:00:10 2009
@@ -0,0 +1,188 @@
+/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * go-editor.c : 
+ *
+ * Copyright (C) 2003-2009 Jody Goldberg (jody gnome org)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
+ * USA
+ */
+
+/*****************************************************************************/
+
+#include <goffice/goffice-config.h>
+#include <go-editor.h>
+
+/**
+ * go_editor_new:
+ *
+ * Returns: a new GOEditor object, which is used to store a collection of
+ * 	property edition widgets (pages). The returned object must be freed
+ * 	using @go_editor_free.
+ **/
+GOEditor *
+go_editor_new (void)
+{
+	GOEditor *editor = g_new (GOEditor, 1);
+
+	editor->store_page = NULL;
+	editor->pages = NULL;
+	g_datalist_init (&editor->registered_widgets);
+
+	return editor;
+}
+
+/**
+ * go_editor_free:
+ * @editor: a #GOEditor
+ *
+ * Frees a GOEditor object.
+ **/
+
+void
+go_editor_free (GOEditor *editor)
+{
+	g_slist_foreach (editor->pages, (GFunc) g_free, NULL);
+	g_slist_free (editor->pages);
+	g_datalist_clear (&editor->registered_widgets);
+
+	g_free (editor);
+}
+
+/**
+ * go_editor_add_page:
+ * @editor: a #GOEditor
+ * @widget: property edition widget
+ * @label: a label identifying the widget
+ *
+ * Adds a page to @editor.
+ */
+
+void
+go_editor_add_page (GOEditor *editor, gpointer widget, char const *label)
+{
+	GOEditorPage *page;
+
+	g_return_if_fail (editor != NULL);
+	page = g_new (GOEditorPage, 1);
+
+	page->widget = widget;
+	page->label = label;
+
+	editor->pages = g_slist_prepend (editor->pages, page);
+}
+
+/**
+ * go_editor_set_store_page:
+ * @editor: a #GOEditor
+ * @store_page: placeholder for the last selected page
+ *
+ * Sets a placeholder for storing the last active editor page.
+ **/
+
+void
+go_editor_set_store_page (GOEditor *editor, unsigned *store_page)
+{
+	g_return_if_fail (editor != NULL);
+
+	editor->store_page = store_page;
+}
+
+#ifdef GOFFICE_WITH_GTK
+
+/**
+ * go_editor_register_widget:
+ * @editor: a #GOEditor
+ * @widget: a #GtkWidget
+ * 
+ * Registers a widget that then can be retrieved later using 
+ * @go_editor_get_registered_widget. The main use of this function is to 
+ * provide the ability to extend a page.
+ **/
+void
+go_editor_register_widget (GOEditor *editor, GtkWidget *widget)
+{
+	g_return_if_fail (editor != NULL);
+	g_return_if_fail (GTK_IS_WIDGET (widget));
+
+	g_datalist_set_data (&editor->registered_widgets, gtk_widget_get_name (widget), widget);
+}
+
+/**
+ * go_editor_get_registered_widget:
+ * @editor: a #GOEditor
+ * @name: the name of the registered widget
+ *
+ * Returns: a widget previously registered using @go_editor_register_widget.
+ **/
+GtkWidget *
+go_editor_get_registered_widget (GOEditor *editor, char const *name)
+{
+	g_return_val_if_fail (editor != NULL, NULL);
+
+	return g_datalist_get_data (&editor->registered_widgets, name);
+}
+
+static void
+cb_switch_page (G_GNUC_UNUSED GtkNotebook *n, G_GNUC_UNUSED GtkNotebookPage *p,
+		guint page_num, guint *store_page)
+{
+		*store_page = page_num;
+}
+
+/**
+ * go_editor_get_notebook:
+ * @editor: a #GOEditor
+ *
+ * Returns: a GtkNotebook from the widget collection stored in @editor.
+ **/
+GtkWidget *
+go_editor_get_notebook (GOEditor *editor)
+{
+	GtkWidget *notebook;
+	GOEditorPage *page;
+	GSList *ptr;
+	unsigned page_count = 0;
+
+	notebook = gtk_notebook_new ();
+	if (editor->pages != NULL) {
+		for (ptr = editor->pages; ptr != NULL; ptr = ptr->next) {
+			page = (GOEditorPage *) ptr->data;
+			gtk_notebook_prepend_page (GTK_NOTEBOOK (notebook),
+						   GTK_WIDGET (page->widget),
+						   gtk_label_new (page->label));
+			gtk_widget_show (page->widget);
+			page_count ++;
+		}
+	} else {
+		/* Display a blank page */
+		GtkWidget *label =  gtk_label_new (NULL);
+		gtk_notebook_prepend_page (GTK_NOTEBOOK (notebook),
+					   label, NULL);
+		gtk_widget_show (label);
+		page_count = 1;
+	}
+
+	if (editor->store_page != NULL) {
+		gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), *editor->store_page);
+		g_signal_connect (G_OBJECT (notebook),
+				  "switch_page",
+				  G_CALLBACK (cb_switch_page), editor->store_page);
+	} else
+		gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), 0);
+
+	return notebook;
+}
+
+#endif

Added: trunk/goffice/utils/go-editor.h
==============================================================================
--- (empty file)
+++ trunk/goffice/utils/go-editor.h	Fri Apr 10 15:00:10 2009
@@ -0,0 +1,57 @@
+/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * go-editor.h : 
+ *
+ * Copyright (C) 2003-2009 Jody Goldberg (jody gnome org)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
+ * USA
+ */
+ 
+#ifndef GO_EDITOR_H
+#define GO_EDITOR_H
+
+#ifdef GOFFICE_WITH_GTK
+#   include <gtk/gtk.h>
+#else
+#   include <glib.h>
+#endif
+
+G_BEGIN_DECLS
+
+typedef struct {
+	char const	*label;		/* label for notebook page */
+	gpointer 	 widget;	/* GtkWidget* */	
+} GOEditorPage;
+
+typedef struct {
+	unsigned	*store_page;		/* pointer to a place for storing last edited page */
+	GSList		*pages;			/* GOEditorPage */
+	GData		*registered_widgets;
+} GOEditor;
+
+GOEditor	*go_editor_new 		  (void);
+void 		 go_editor_free 		  (GOEditor *editor);
+void		 go_editor_add_page 		  (GOEditor *editor, gpointer widget, char const *label);
+void 		 go_editor_set_store_page  	  (GOEditor *editor, unsigned *store_page);
+#ifdef GOFFICE_WITH_GTK
+void 		 go_editor_register_widget 	  (GOEditor *editor, GtkWidget *widget);
+GtkWidget  	*go_editor_get_registered_widget (GOEditor *editor, char const *name);
+GtkWidget 	*go_editor_get_notebook 	  (GOEditor *editor);
+#endif
+
+G_END_DECLS
+
+#endif
+

Modified: trunk/goffice/utils/go-libxml-extras.c
==============================================================================
--- trunk/goffice/utils/go-libxml-extras.c	(original)
+++ trunk/goffice/utils/go-libxml-extras.c	Fri Apr 10 15:00:10 2009
@@ -304,3 +304,11 @@
 
 	return best_node;
 }
+
+void
+go_xml_out_add_color (GsfXMLOut *output, char const *id, GOColor c)
+{
+	char *str = go_color_as_str (c);
+	gsf_xml_out_add_cstr_unchecked (output, id, str);
+	g_free (str);
+}

Modified: trunk/goffice/utils/go-libxml-extras.h
==============================================================================
--- trunk/goffice/utils/go-libxml-extras.h	(original)
+++ trunk/goffice/utils/go-libxml-extras.h	Fri Apr 10 15:00:10 2009
@@ -25,6 +25,7 @@
 #include <glib-object.h>
 #include <goffice/utils/goffice-utils.h>
 #include <libxml/tree.h>
+#include <gsf/gsf-libxml.h>
 
 G_BEGIN_DECLS
 
@@ -47,6 +48,8 @@
 xmlNode *e_xml_get_child_by_name_no_lang (xmlNode const *tree, char const *name);
 xmlNode *e_xml_get_child_by_name_by_lang (xmlNode const *tree, char const *name);
 
+void	   go_xml_out_add_color (GsfXMLOut *out, char const *id, GOColor c);
+
 G_END_DECLS
 
 #endif /* GO_LIBXML_EXTRAS_H */

Copied: trunk/goffice/utils/go-style-prefs.glade (from r2366, /trunk/goffice/graph/gog-style-prefs.glade)
==============================================================================
--- /trunk/goffice/graph/gog-style-prefs.glade	(original)
+++ trunk/goffice/utils/go-style-prefs.glade	Fri Apr 10 15:00:10 2009
@@ -1,1468 +1,874 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd";>
-
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--*- mode: xml -*-->
 <glade-interface>
-
-<widget class="GtkWindow" id="gog_style_prefs_window">
-  <property name="title" translatable="yes"></property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-
-  <child>
-    <widget class="GtkHBox" id="gog_style_prefs">
-      <property name="border_width">12</property>
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">24</property>
-
-      <child>
-	<widget class="GtkVBox" id="outline_box">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">False</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkLabel" id="outline_label">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">&lt;b&gt;Outline&lt;/b&gt;</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">True</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment5">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">6</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">18</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkTable" id="outline_table">
-		  <property name="visible">True</property>
-		  <property name="n_rows">3</property>
-		  <property name="n_columns">3</property>
-		  <property name="homogeneous">False</property>
-		  <property name="row_spacing">6</property>
-		  <property name="column_spacing">12</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="outline_size_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">_Size:</property>
-		      <property name="use_underline">True</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="mnemonic_widget">outline_size_spin</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="outline_size_spin">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">1</property>
-		      <property name="digits">1</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0 0 30 0.1 1 0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label35">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">pts</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="outline_color_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Co_lor:</property>
-		      <property name="use_underline">True</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label37">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">St_yle:</property>
-		      <property name="use_underline">True</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkVBox" id="line_box">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">False</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkLabel" id="line_label">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">&lt;b&gt;Line&lt;/b&gt;</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">True</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment6">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">6</property>
-	      <property name="bottom_padding">10</property>
-	      <property name="left_padding">18</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkTable" id="line_table">
-		  <property name="visible">True</property>
-		  <property name="n_rows">3</property>
-		  <property name="n_columns">3</property>
-		  <property name="homogeneous">False</property>
-		  <property name="row_spacing">6</property>
-		  <property name="column_spacing">12</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="line_color_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Co_lor:</property>
-		      <property name="use_underline">True</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="line_size_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">_Size:</property>
-		      <property name="use_underline">True</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="mnemonic_widget">line_size_spin</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label34">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">pts</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label36">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">St_yle:</property>
-		      <property name="use_underline">True</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="line_size_spin">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">1</property>
-		      <property name="digits">1</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0 0 30 0.1 1 0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkVBox" id="fill_box">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">False</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkLabel" id="fill_label">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">&lt;b&gt;Fill&lt;/b&gt;</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">True</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment4">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">6</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">18</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkVBox" id="vbox1">
-		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">6</property>
-
-		  <child>
-		    <widget class="GtkHBox" id="hbox2">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">12</property>
-
-		      <child>
-			<widget class="GtkLabel" id="fill_type_label">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">_Type:</property>
-			  <property name="use_underline">True</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="mnemonic_widget">fill_type_menu</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkComboBox" id="fill_type_menu">
-			  <property name="visible">True</property>
-			  <property name="items" translatable="yes">None
+  <widget class="GtkWindow" id="go_style_prefs_window">
+    <child>
+      <widget class="GtkHBox" id="go_style_prefs">
+        <property name="visible">True</property>
+        <property name="border_width">12</property>
+        <property name="spacing">24</property>
+        <child>
+          <widget class="GtkVBox" id="outline_box">
+            <property name="visible">True</property>
+            <child>
+              <widget class="GtkLabel" id="outline_label">
+                <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">&lt;b&gt;Outline&lt;/b&gt;</property>
+                <property name="use_markup">True</property>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkAlignment" id="alignment5">
+                <property name="visible">True</property>
+                <property name="top_padding">6</property>
+                <property name="left_padding">18</property>
+                <child>
+                  <widget class="GtkTable" id="outline_table">
+                    <property name="visible">True</property>
+                    <property name="n_rows">3</property>
+                    <property name="n_columns">3</property>
+                    <property name="column_spacing">12</property>
+                    <property name="row_spacing">6</property>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label37">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">St_yle:</property>
+                        <property name="use_underline">True</property>
+                      </widget>
+                      <packing>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="outline_color_label">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Co_lor:</property>
+                        <property name="use_underline">True</property>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label35">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">pts</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">2</property>
+                        <property name="right_attach">3</property>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkSpinButton" id="outline_size_spin">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="adjustment">0 0 30 0.10000000000000001 1 0</property>
+                        <property name="climb_rate">1</property>
+                        <property name="digits">1</property>
+                        <property name="numeric">True</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="outline_size_label">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">_Size:</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">outline_size_spin</property>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkVBox" id="line_box">
+            <property name="visible">True</property>
+            <child>
+              <widget class="GtkLabel" id="line_label">
+                <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">&lt;b&gt;Line&lt;/b&gt;</property>
+                <property name="use_markup">True</property>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkAlignment" id="alignment6">
+                <property name="visible">True</property>
+                <property name="top_padding">6</property>
+                <property name="bottom_padding">10</property>
+                <property name="left_padding">18</property>
+                <child>
+                  <widget class="GtkTable" id="line_table">
+                    <property name="visible">True</property>
+                    <property name="n_rows">3</property>
+                    <property name="n_columns">3</property>
+                    <property name="column_spacing">12</property>
+                    <property name="row_spacing">6</property>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <widget class="GtkSpinButton" id="line_size_spin">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="adjustment">0 0 30 0.10000000000000001 1 0</property>
+                        <property name="climb_rate">1</property>
+                        <property name="digits">1</property>
+                        <property name="numeric">True</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label36">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">St_yle:</property>
+                        <property name="use_underline">True</property>
+                      </widget>
+                      <packing>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label34">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">pts</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">2</property>
+                        <property name="right_attach">3</property>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="line_size_label">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">_Size:</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">line_size_spin</property>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="line_color_label">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Co_lor:</property>
+                        <property name="use_underline">True</property>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkVBox" id="fill_box">
+            <property name="visible">True</property>
+            <child>
+              <widget class="GtkLabel" id="fill_label">
+                <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">&lt;b&gt;Fill&lt;/b&gt;</property>
+                <property name="use_markup">True</property>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkAlignment" id="alignment4">
+                <property name="visible">True</property>
+                <property name="top_padding">6</property>
+                <property name="left_padding">18</property>
+                <child>
+                  <widget class="GtkVBox" id="vbox1">
+                    <property name="visible">True</property>
+                    <property name="spacing">6</property>
+                    <child>
+                      <widget class="GtkHBox" id="hbox2">
+                        <property name="visible">True</property>
+                        <property name="spacing">12</property>
+                        <child>
+                          <widget class="GtkLabel" id="fill_type_label">
+                            <property name="visible">True</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">_Type:</property>
+                            <property name="use_underline">True</property>
+                            <property name="mnemonic_widget">fill_type_menu</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkComboBox" id="fill_type_menu">
+                            <property name="visible">True</property>
+                            <property name="items" translatable="yes">None
 Pattern
 Bicolor gradient
 Unicolor gradient
 Image</property>
-			  <property name="add_tearoffs">False</property>
-			  <property name="focus_on_click">True</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">True</property>
-			</packing>
-		      </child>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">True</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkHBox" id="fill_extension_box">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">0</property>
-
-		      <child>
-			<placeholder/>
-		      </child>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">True</property>
-		      <property name="fill">True</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkNotebook" id="fill_notebook">
-		      <property name="visible">True</property>
-		      <property name="show_tabs">False</property>
-		      <property name="show_border">False</property>
-		      <property name="tab_pos">GTK_POS_TOP</property>
-		      <property name="scrollable">False</property>
-		      <property name="enable_popup">False</property>
-
-		      <child>
-			<widget class="GtkLabel" id="label31">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes"></property>
-			  <property name="use_underline">False</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="tab_expand">False</property>
-			  <property name="tab_fill">True</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label16">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes"></property>
-			  <property name="use_underline">False</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="type">tab</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkVBox" id="vbox3">
-			  <property name="visible">True</property>
-			  <property name="homogeneous">False</property>
-			  <property name="spacing">6</property>
-
-			  <child>
-			    <widget class="GtkHBox" id="fill_gradient_box">
-			      <property name="visible">True</property>
-			      <property name="homogeneous">False</property>
-			      <property name="spacing">12</property>
-
-			      <child>
-				<widget class="GtkLabel" id="fill_gradient_label">
-				  <property name="visible">True</property>
-				  <property name="label" translatable="yes">_Direction:</property>
-				  <property name="use_underline">True</property>
-				  <property name="use_markup">False</property>
-				  <property name="justify">GTK_JUSTIFY_LEFT</property>
-				  <property name="wrap">False</property>
-				  <property name="selectable">False</property>
-				  <property name="xalign">0</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">0</property>
-				  <property name="ypad">0</property>
-				  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-				  <property name="width_chars">-1</property>
-				  <property name="single_line_mode">False</property>
-				  <property name="angle">0</property>
-				</widget>
-				<packing>
-				  <property name="padding">0</property>
-				  <property name="expand">False</property>
-				  <property name="fill">False</property>
-				</packing>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkHBox" id="fill_pattern_box">
-			      <property name="visible">True</property>
-			      <property name="homogeneous">False</property>
-			      <property name="spacing">12</property>
-
-			      <child>
-				<widget class="GtkLabel" id="fill_pattern_label">
-				  <property name="visible">True</property>
-				  <property name="label" translatable="yes">_Pattern:</property>
-				  <property name="use_underline">True</property>
-				  <property name="use_markup">False</property>
-				  <property name="justify">GTK_JUSTIFY_LEFT</property>
-				  <property name="wrap">False</property>
-				  <property name="selectable">False</property>
-				  <property name="xalign">0</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">0</property>
-				  <property name="ypad">0</property>
-				  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-				  <property name="width_chars">-1</property>
-				  <property name="single_line_mode">False</property>
-				  <property name="angle">0</property>
-				</widget>
-				<packing>
-				  <property name="padding">0</property>
-				  <property name="expand">False</property>
-				  <property name="fill">False</property>
-				</packing>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkHBox" id="fill_foreground_box">
-			      <property name="visible">True</property>
-			      <property name="homogeneous">False</property>
-			      <property name="spacing">12</property>
-
-			      <child>
-				<widget class="GtkLabel" id="fill_foreground_label">
-				  <property name="visible">True</property>
-				  <property name="label" translatable="yes">_Foreground:</property>
-				  <property name="use_underline">True</property>
-				  <property name="use_markup">False</property>
-				  <property name="justify">GTK_JUSTIFY_LEFT</property>
-				  <property name="wrap">False</property>
-				  <property name="selectable">False</property>
-				  <property name="xalign">0</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">0</property>
-				  <property name="ypad">0</property>
-				  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-				  <property name="width_chars">-1</property>
-				  <property name="single_line_mode">False</property>
-				  <property name="angle">0</property>
-				</widget>
-				<packing>
-				  <property name="padding">0</property>
-				  <property name="expand">False</property>
-				  <property name="fill">False</property>
-				</packing>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkHBox" id="fill_background_box">
-			      <property name="visible">True</property>
-			      <property name="homogeneous">False</property>
-			      <property name="spacing">12</property>
-
-			      <child>
-				<widget class="GtkLabel" id="fill_background_label">
-				  <property name="visible">True</property>
-				  <property name="label" translatable="yes">_Background:</property>
-				  <property name="use_underline">True</property>
-				  <property name="use_markup">False</property>
-				  <property name="justify">GTK_JUSTIFY_LEFT</property>
-				  <property name="wrap">False</property>
-				  <property name="selectable">False</property>
-				  <property name="xalign">0</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">0</property>
-				  <property name="ypad">0</property>
-				  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-				  <property name="width_chars">-1</property>
-				  <property name="single_line_mode">False</property>
-				  <property name="angle">0</property>
-				</widget>
-				<packing>
-				  <property name="padding">0</property>
-				  <property name="expand">False</property>
-				  <property name="fill">False</property>
-				</packing>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkHBox" id="fill_brightness_box">
-			      <property name="visible">True</property>
-			      <property name="homogeneous">False</property>
-			      <property name="spacing">12</property>
-
-			      <child>
-				<widget class="GtkLabel" id="fill_brightness_label">
-				  <property name="visible">True</property>
-				  <property name="label" translatable="yes">B_rightness:</property>
-				  <property name="use_underline">True</property>
-				  <property name="use_markup">False</property>
-				  <property name="justify">GTK_JUSTIFY_LEFT</property>
-				  <property name="wrap">False</property>
-				  <property name="selectable">False</property>
-				  <property name="xalign">0</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">0</property>
-				  <property name="ypad">0</property>
-				  <property name="mnemonic_widget">fill_brightness_scale</property>
-				  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-				  <property name="width_chars">-1</property>
-				  <property name="single_line_mode">False</property>
-				  <property name="angle">0</property>
-				</widget>
-				<packing>
-				  <property name="padding">0</property>
-				  <property name="expand">False</property>
-				  <property name="fill">False</property>
-				</packing>
-			      </child>
-
-			      <child>
-				<widget class="GtkHScale" id="fill_brightness_scale">
-				  <property name="visible">True</property>
-				  <property name="can_focus">True</property>
-				  <property name="draw_value">False</property>
-				  <property name="value_pos">GTK_POS_TOP</property>
-				  <property name="digits">1</property>
-				  <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
-				  <property name="inverted">True</property>
-				  <property name="adjustment">0 0 100 10 0 0</property>
-				</widget>
-				<packing>
-				  <property name="padding">0</property>
-				  <property name="expand">True</property>
-				  <property name="fill">True</property>
-				</packing>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="tab_expand">False</property>
-			  <property name="tab_fill">True</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label18">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes"></property>
-			  <property name="use_underline">False</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="type">tab</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkTable" id="fill_image_table">
-			  <property name="visible">True</property>
-			  <property name="n_rows">3</property>
-			  <property name="n_columns">3</property>
-			  <property name="homogeneous">False</property>
-			  <property name="row_spacing">6</property>
-			  <property name="column_spacing">12</property>
-
-			  <child>
-			    <widget class="GtkLabel" id="fill_image_fit_label">
-			      <property name="visible">True</property>
-			      <property name="label" translatable="yes">_Fit:</property>
-			      <property name="use_underline">True</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			      <property name="mnemonic_widget">fill_image_fit</property>
-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			      <property name="width_chars">-1</property>
-			      <property name="single_line_mode">False</property>
-			      <property name="angle">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">0</property>
-			      <property name="right_attach">1</property>
-			      <property name="top_attach">0</property>
-			      <property name="bottom_attach">1</property>
-			      <property name="x_options">shrink|fill</property>
-			      <property name="y_options">shrink</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkComboBox" id="fill_image_fit">
-			      <property name="visible">True</property>
-			      <property name="items" translatable="yes">stretched
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkHBox" id="fill_extension_box">
+                        <property name="visible">True</property>
+                        <child>
+                          <placeholder/>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkNotebook" id="fill_notebook">
+                        <property name="visible">True</property>
+                        <property name="show_tabs">False</property>
+                        <property name="show_border">False</property>
+                        <child>
+                          <widget class="GtkLabel" id="label31">
+                            <property name="visible">True</property>
+                          </widget>
+                        </child>
+                        <child>
+                          <widget class="GtkLabel" id="label16">
+                            <property name="visible">True</property>
+                          </widget>
+                          <packing>
+                            <property name="type">tab</property>
+                            <property name="tab_fill">False</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkVBox" id="vbox3">
+                            <property name="visible">True</property>
+                            <property name="spacing">6</property>
+                            <child>
+                              <widget class="GtkHBox" id="fill_gradient_box">
+                                <property name="visible">True</property>
+                                <property name="spacing">12</property>
+                                <child>
+                                  <widget class="GtkLabel" id="fill_gradient_label">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">_Direction:</property>
+                                    <property name="use_underline">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkHBox" id="fill_pattern_box">
+                                <property name="visible">True</property>
+                                <property name="spacing">12</property>
+                                <child>
+                                  <widget class="GtkLabel" id="fill_pattern_label">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">_Pattern:</property>
+                                    <property name="use_underline">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkHBox" id="fill_foreground_box">
+                                <property name="visible">True</property>
+                                <property name="spacing">12</property>
+                                <child>
+                                  <widget class="GtkLabel" id="fill_foreground_label">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">_Foreground:</property>
+                                    <property name="use_underline">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkHBox" id="fill_background_box">
+                                <property name="visible">True</property>
+                                <property name="spacing">12</property>
+                                <child>
+                                  <widget class="GtkLabel" id="fill_background_label">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">_Background:</property>
+                                    <property name="use_underline">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">3</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkHBox" id="fill_brightness_box">
+                                <property name="visible">True</property>
+                                <property name="spacing">12</property>
+                                <child>
+                                  <widget class="GtkLabel" id="fill_brightness_label">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">B_rightness:</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="mnemonic_widget">fill_brightness_scale</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkHScale" id="fill_brightness_scale">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="adjustment">0 0 100 10 0 0</property>
+                                    <property name="inverted">True</property>
+                                    <property name="draw_value">False</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">4</property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkLabel" id="label18">
+                            <property name="visible">True</property>
+                          </widget>
+                          <packing>
+                            <property name="type">tab</property>
+                            <property name="position">1</property>
+                            <property name="tab_fill">False</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkTable" id="fill_image_table">
+                            <property name="visible">True</property>
+                            <property name="n_rows">3</property>
+                            <property name="n_columns">3</property>
+                            <property name="column_spacing">12</property>
+                            <property name="row_spacing">6</property>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <widget class="GtkVBox" id="vbox2">
+                                <property name="visible">True</property>
+                                <child>
+                                  <widget class="GtkImage" id="fill_image_sample">
+                                    <property name="width_request">100</property>
+                                    <property name="height_request">60</property>
+                                    <property name="visible">True</property>
+                                    <property name="stock">gtk-missing-image</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkLabel" id="image-size-label">
+                                    <property name="visible">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">2</property>
+                                <property name="right_attach">3</property>
+                                <property name="bottom_attach">3</property>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="y_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label33">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                              </widget>
+                              <packing>
+                                <property name="top_attach">2</property>
+                                <property name="bottom_attach">3</property>
+                                <property name="x_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkButton" id="fill_image_select_picture">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="response_id">0</property>
+                                <child>
+                                  <widget class="GtkAlignment" id="alignment2">
+                                    <property name="visible">True</property>
+                                    <property name="xscale">0</property>
+                                    <property name="yscale">0</property>
+                                    <child>
+                                      <widget class="GtkHBox" id="hbox4">
+                                        <property name="visible">True</property>
+                                        <property name="spacing">2</property>
+                                        <child>
+                                          <widget class="GtkImage" id="image1">
+                                            <property name="visible">True</property>
+                                            <property name="stock">gtk-open</property>
+                                          </widget>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <widget class="GtkLabel" id="label32">
+                                            <property name="visible">True</property>
+                                            <property name="label" translatable="yes">_Select...</property>
+                                            <property name="use_underline">True</property>
+                                          </widget>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">1</property>
+                                          </packing>
+                                        </child>
+                                      </widget>
+                                    </child>
+                                  </widget>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                                <property name="x_options">GTK_SHRINK | GTK_FILL</property>
+                                <property name="y_options">GTK_SHRINK</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkComboBox" id="fill_image_fit">
+                                <property name="visible">True</property>
+                                <property name="items" translatable="yes">stretched
 wallpaper</property>
-			      <property name="add_tearoffs">False</property>
-			      <property name="focus_on_click">True</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">1</property>
-			      <property name="right_attach">2</property>
-			      <property name="top_attach">0</property>
-			      <property name="bottom_attach">1</property>
-			      <property name="x_options">shrink|fill</property>
-			      <property name="y_options">shrink</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkButton" id="fill_image_select_picture">
-			      <property name="visible">True</property>
-			      <property name="can_focus">True</property>
-			      <property name="relief">GTK_RELIEF_NORMAL</property>
-			      <property name="focus_on_click">True</property>
-
-			      <child>
-				<widget class="GtkAlignment" id="alignment2">
-				  <property name="visible">True</property>
-				  <property name="xalign">0.5</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xscale">0</property>
-				  <property name="yscale">0</property>
-				  <property name="top_padding">0</property>
-				  <property name="bottom_padding">0</property>
-				  <property name="left_padding">0</property>
-				  <property name="right_padding">0</property>
-
-				  <child>
-				    <widget class="GtkHBox" id="hbox4">
-				      <property name="visible">True</property>
-				      <property name="homogeneous">False</property>
-				      <property name="spacing">2</property>
-
-				      <child>
-					<widget class="GtkImage" id="image1">
-					  <property name="visible">True</property>
-					  <property name="stock">gtk-open</property>
-					  <property name="icon_size">4</property>
-					  <property name="xalign">0.5</property>
-					  <property name="yalign">0.5</property>
-					  <property name="xpad">0</property>
-					  <property name="ypad">0</property>
-					</widget>
-					<packing>
-					  <property name="padding">0</property>
-					  <property name="expand">False</property>
-					  <property name="fill">False</property>
-					</packing>
-				      </child>
-
-				      <child>
-					<widget class="GtkLabel" id="label32">
-					  <property name="visible">True</property>
-					  <property name="label" translatable="yes">_Select...</property>
-					  <property name="use_underline">True</property>
-					  <property name="use_markup">False</property>
-					  <property name="justify">GTK_JUSTIFY_LEFT</property>
-					  <property name="wrap">False</property>
-					  <property name="selectable">False</property>
-					  <property name="xalign">0.5</property>
-					  <property name="yalign">0.5</property>
-					  <property name="xpad">0</property>
-					  <property name="ypad">0</property>
-					  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-					  <property name="width_chars">-1</property>
-					  <property name="single_line_mode">False</property>
-					  <property name="angle">0</property>
-					</widget>
-					<packing>
-					  <property name="padding">0</property>
-					  <property name="expand">False</property>
-					  <property name="fill">False</property>
-					</packing>
-				      </child>
-				    </widget>
-				  </child>
-				</widget>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">0</property>
-			      <property name="right_attach">2</property>
-			      <property name="top_attach">1</property>
-			      <property name="bottom_attach">2</property>
-			      <property name="x_options">shrink|fill</property>
-			      <property name="y_options">shrink</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="label33">
-			      <property name="visible">True</property>
-			      <property name="label" translatable="yes"></property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			      <property name="width_chars">-1</property>
-			      <property name="single_line_mode">False</property>
-			      <property name="angle">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">0</property>
-			      <property name="right_attach">1</property>
-			      <property name="top_attach">2</property>
-			      <property name="bottom_attach">3</property>
-			      <property name="x_options">fill</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkVBox" id="vbox2">
-			      <property name="visible">True</property>
-			      <property name="homogeneous">False</property>
-			      <property name="spacing">0</property>
-
-			      <child>
-				<widget class="GtkImage" id="fill_image_sample">
-				  <property name="width_request">100</property>
-				  <property name="height_request">60</property>
-				  <property name="visible">True</property>
-				  <property name="xalign">0.5</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">0</property>
-				  <property name="ypad">0</property>
-				</widget>
-				<packing>
-				  <property name="padding">0</property>
-				  <property name="expand">False</property>
-				  <property name="fill">True</property>
-				</packing>
-			      </child>
-
-			      <child>
-				<widget class="GtkLabel" id="image-size-label">
-				  <property name="visible">True</property>
-				  <property name="label" translatable="yes"></property>
-				  <property name="use_underline">False</property>
-				  <property name="use_markup">False</property>
-				  <property name="justify">GTK_JUSTIFY_LEFT</property>
-				  <property name="wrap">False</property>
-				  <property name="selectable">False</property>
-				  <property name="xalign">0.5</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">0</property>
-				  <property name="ypad">0</property>
-				  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-				  <property name="width_chars">-1</property>
-				  <property name="single_line_mode">False</property>
-				  <property name="angle">0</property>
-				</widget>
-				<packing>
-				  <property name="padding">0</property>
-				  <property name="expand">False</property>
-				  <property name="fill">False</property>
-				</packing>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">2</property>
-			      <property name="right_attach">3</property>
-			      <property name="top_attach">0</property>
-			      <property name="bottom_attach">3</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options">fill</property>
-			    </packing>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="tab_expand">False</property>
-			  <property name="tab_fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label19">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes"></property>
-			  <property name="use_underline">False</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="type">tab</property>
-			</packing>
-		      </child>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkWindow" id="gog_style_font_prefs_window">
-  <property name="visible">True</property>
-  <property name="title" translatable="yes"></property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-
-  <child>
-    <widget class="GtkVBox" id="gog_style_font_prefs">
-      <property name="border_width">12</property>
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">12</property>
-
-      <child>
-	<widget class="GtkHBox" id="hbox5">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">False</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkHBox" id="color_box">
-	      <property name="visible">True</property>
-	      <property name="homogeneous">False</property>
-	      <property name="spacing">12</property>
-
-	      <child>
-		<widget class="GtkLabel" id="font_color_label">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Co_lor:</property>
-		  <property name="use_underline">True</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<placeholder/>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkWindow" id="gog_style_marker_prefs_window">
-  <property name="title" translatable="yes"></property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-
-  <child>
-    <widget class="GtkAlignment" id="gog_style_marker_prefs">
-      <property name="visible">True</property>
-      <property name="xalign">0</property>
-      <property name="yalign">0</property>
-      <property name="xscale">0</property>
-      <property name="yscale">0</property>
-      <property name="top_padding">12</property>
-      <property name="bottom_padding">12</property>
-      <property name="left_padding">12</property>
-      <property name="right_padding">12</property>
-
-      <child>
-	<widget class="GtkVBox" id="marker_box">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">False</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkLabel" id="marker_label">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">&lt;b&gt;Marker&lt;/b&gt;</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">True</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment7">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">6</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">18</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkTable" id="marker_table">
-		  <property name="visible">True</property>
-		  <property name="n_rows">4</property>
-		  <property name="n_columns">3</property>
-		  <property name="homogeneous">False</property>
-		  <property name="row_spacing">6</property>
-		  <property name="column_spacing">12</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="marker_shape_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Sha_pe:</property>
-		      <property name="use_underline">True</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="marker_size_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Si_ze:</property>
-		      <property name="use_underline">True</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="mnemonic_widget">marker_size_spin</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="marker_size_spin">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">1</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">5 1 200 1 10 0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label7">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">pts</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="marker_outline_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">O_utline:</property>
-		      <property name="use_underline">True</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="marker_fill_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">_Fill:</property>
-		      <property name="use_underline">True</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-	</widget>
-      </child>
-    </widget>
-  </child>
-</widget>
-
+                              </widget>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="x_options">GTK_SHRINK | GTK_FILL</property>
+                                <property name="y_options">GTK_SHRINK</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="fill_image_fit_label">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">_Fit:</property>
+                                <property name="use_underline">True</property>
+                                <property name="mnemonic_widget">fill_image_fit</property>
+                              </widget>
+                              <packing>
+                                <property name="x_options">GTK_SHRINK | GTK_FILL</property>
+                                <property name="y_options">GTK_SHRINK</property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="position">2</property>
+                            <property name="tab_fill">False</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkLabel" id="label19">
+                            <property name="visible">True</property>
+                          </widget>
+                          <packing>
+                            <property name="type">tab</property>
+                            <property name="position">2</property>
+                            <property name="tab_fill">False</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+  <widget class="GtkWindow" id="go_style_font_prefs_window">
+    <property name="visible">True</property>
+    <child>
+      <widget class="GtkVBox" id="go_style_font_prefs">
+        <property name="visible">True</property>
+        <property name="border_width">12</property>
+        <property name="spacing">12</property>
+        <child>
+          <widget class="GtkHBox" id="hbox5">
+            <property name="visible">True</property>
+            <child>
+              <widget class="GtkHBox" id="color_box">
+                <property name="visible">True</property>
+                <property name="spacing">12</property>
+                <child>
+                  <widget class="GtkLabel" id="font_color_label">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">Co_lor:</property>
+                    <property name="use_underline">True</property>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+  <widget class="GtkWindow" id="go_style_marker_prefs_window">
+    <child>
+      <widget class="GtkAlignment" id="go_style_marker_prefs">
+        <property name="visible">True</property>
+        <property name="xalign">0</property>
+        <property name="yalign">0</property>
+        <property name="xscale">0</property>
+        <property name="yscale">0</property>
+        <property name="top_padding">12</property>
+        <property name="bottom_padding">12</property>
+        <property name="left_padding">12</property>
+        <property name="right_padding">12</property>
+        <child>
+          <widget class="GtkVBox" id="marker_box">
+            <property name="visible">True</property>
+            <child>
+              <widget class="GtkLabel" id="marker_label">
+                <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">&lt;b&gt;Marker&lt;/b&gt;</property>
+                <property name="use_markup">True</property>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkAlignment" id="alignment7">
+                <property name="visible">True</property>
+                <property name="top_padding">6</property>
+                <property name="left_padding">18</property>
+                <child>
+                  <widget class="GtkTable" id="marker_table">
+                    <property name="visible">True</property>
+                    <property name="n_rows">4</property>
+                    <property name="n_columns">3</property>
+                    <property name="column_spacing">12</property>
+                    <property name="row_spacing">6</property>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="marker_fill_label">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">_Fill:</property>
+                        <property name="use_underline">True</property>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="marker_outline_label">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">O_utline:</property>
+                        <property name="use_underline">True</property>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label7">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">pts</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">2</property>
+                        <property name="right_attach">3</property>
+                        <property name="top_attach">3</property>
+                        <property name="bottom_attach">4</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkSpinButton" id="marker_size_spin">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="adjustment">5 1 200 1 10 0</property>
+                        <property name="climb_rate">1</property>
+                        <property name="numeric">True</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">3</property>
+                        <property name="bottom_attach">4</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="marker_size_label">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Si_ze:</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">marker_size_spin</property>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">3</property>
+                        <property name="bottom_attach">4</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="marker_shape_label">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Sha_pe:</property>
+                        <property name="use_underline">True</property>
+                      </widget>
+                      <packing>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+        </child>
+      </widget>
+    </child>
+  </widget>
 </glade-interface>

Copied: trunk/goffice/utils/go-style.c (from r2366, /trunk/goffice/graph/gog-style.c)
==============================================================================
--- /trunk/goffice/graph/gog-style.c	(original)
+++ trunk/goffice/utils/go-style.c	Fri Apr 10 15:00:10 2009
@@ -1,6 +1,6 @@
 /* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
 /*
- * gog-style.c :
+ * go-style.c :
  *
  * Copyright (C) 2003-2004 Jody Goldberg (jody gnome org)
  * Copyright (C) 2006-2007 Emmanuel Pacaud (emmanuel pacaud lapp in2p3 fr)
@@ -22,16 +22,17 @@
 
 #include <goffice/goffice-config.h>
 #include <goffice/app/go-doc.h>
-#include <goffice/graph/gog-style.h>
-#include <goffice/graph/gog-styled-object.h>
 #include <goffice/math/go-math.h>
 #include <goffice/utils/go-color.h>
 #include <goffice/utils/go-font.h>
 #include <goffice/utils/go-file.h>
 #include <goffice/utils/go-image.h>
+#include <goffice/utils/go-libxml-extras.h>
 #include <goffice/utils/go-line.h>
 #include <goffice/utils/go-marker.h>
 #include <goffice/utils/go-persist.h>
+#include <goffice/utils/go-style.h>
+#include <goffice/utils/go-styled-object.h>
 
 #ifdef GOFFICE_WITH_GTK
 #include <goffice/gtk/goffice-gtk.h>
@@ -58,13 +59,13 @@
 #define HSCALE 100
 #define VSCALE 120
 
-typedef GObjectClass GogStyleClass;
+typedef GObjectClass GOStyleClass;
 
 static GObjectClass *parent_klass;
 
 /*
  * I would have liked to do this differently and have a tighter binding between theme element and style
- * 	eg gog_style_new (theme_element)
+ * 	eg go_style_new (theme_element)
  * However that will not work easily in the context of xls import where we do
  * not know what the type is destined for until later.  This structure melds
  * smoothly with both approaches at the expense of a bit of power.
@@ -76,8 +77,8 @@
 typedef struct {
 	GladeXML  	*gui;
 	GladeXML  	*font_gui;
-	GogStyle  	*style;
-	GogStyle  	*default_style;
+	GOStyle  	*style;
+	GOStyle  	*default_style;
 	GObject		*object_with_style;
 	gboolean   	 enable_edit;
 	gulong     	 style_changed_handler;
@@ -112,7 +113,7 @@
 } StylePrefState;
 
 static void
-cb_style_changed (GogStyledObject *obj, GogStyle *style, StylePrefState *state)
+cb_style_changed (GOStyledObject *obj, GOStyle *style, StylePrefState *state)
 {
 }
 
@@ -145,7 +146,7 @@
 }
 
 static void
-gog_style_set_image_preview (GOImage *pix, StylePrefState *state)
+go_style_set_image_preview (GOImage *pix, StylePrefState *state)
 {
 	GdkPixbuf *scaled;
 	int width, height;
@@ -182,7 +183,7 @@
 static void
 cb_outline_dash_type_changed (GOSelector *selector, StylePrefState const *state)
 {
-	GogStyleLine *line = &state->style->outline;
+	GOStyleLine *line = &state->style->outline;
 
 	line->dash_type = go_selector_get_active (selector, &line->auto_dash);
 	set_style (state);
@@ -191,7 +192,7 @@
 static void
 cb_outline_size_changed (GtkAdjustment *adj, StylePrefState *state)
 {
-	GogStyle *style = state->style;
+	GOStyle *style = state->style;
 
 	g_return_if_fail (style != NULL);
 
@@ -203,7 +204,7 @@
 cb_outline_color_changed (GOSelector *selector,
 			  StylePrefState *state)
 {
-	GogStyle *style = state->style;
+	GOStyle *style = state->style;
 
 	g_return_if_fail (style != NULL);
 
@@ -213,10 +214,10 @@
 }
 
 static void
-outline_init (StylePrefState *state, gboolean enable, GogEditor *editor)
+outline_init (StylePrefState *state, gboolean enable, GOEditor *editor)
 {
-	GogStyle *style = state->style;
-	GogStyle *default_style = state->default_style;
+	GOStyle *style = state->style;
+	GOStyle *default_style = state->default_style;
 	GtkWidget *w, *table;
 
 	w = glade_xml_get_widget (state->gui, "outline_box");
@@ -225,7 +226,7 @@
 		return;
 	}
 
-	gog_editor_register_widget (editor, w);
+	go_editor_register_widget (editor, w);
 
 	table = glade_xml_get_widget (state->gui, "outline_table");
 
@@ -257,7 +258,7 @@
 static void
 cb_line_dash_type_changed (GOSelector *palette, StylePrefState const *state)
 {
-	GogStyleLine *line = &state->style->line;
+	GOStyleLine *line = &state->style->line;
 
 	line->dash_type = go_selector_get_active (palette, &line->auto_dash);
 	set_style (state);
@@ -266,7 +267,7 @@
 static void
 cb_line_size_changed (GtkAdjustment *adj, StylePrefState const *state)
 {
-	GogStyle *style = state->style;
+	GOStyle *style = state->style;
 
 	g_return_if_fail (style != NULL);
 
@@ -278,7 +279,7 @@
 cb_line_color_changed (GOSelector *selector,
 		       StylePrefState *state)
 {
-	GogStyle *style = state->style;
+	GOStyle *style = state->style;
 
 	g_return_if_fail (style != NULL);
 
@@ -287,10 +288,10 @@
 }
 
 static void
-line_init (StylePrefState *state, gboolean enable, GogEditor *editor)
+line_init (StylePrefState *state, gboolean enable, GOEditor *editor)
 {
-	GogStyle *style = state->style;
-	GogStyle *default_style = state->default_style;
+	GOStyle *style = state->style;
+	GOStyle *default_style = state->default_style;
 	GtkWidget *w, *table;
 
 	w = glade_xml_get_widget (state->gui, "line_box");
@@ -299,7 +300,7 @@
 		return;
 	}
 
-	gog_editor_register_widget (editor, w);
+	go_editor_register_widget (editor, w);
 
 	table = glade_xml_get_widget (state->gui, "line_table");
 
@@ -333,7 +334,7 @@
 static void
 fill_update_selectors (StylePrefState const *state)
 {
-	GogStyle *style = state->style;
+	GOStyle *style = state->style;
 
 	go_pattern_selector_set_colors (GO_SELECTOR (state->fill.pattern.selector),
 				        style->fill.pattern.fore,
@@ -363,7 +364,7 @@
 static void
 cb_pattern_type_activate (GtkWidget *selector, StylePrefState const *state)
 {
-	GogStyle *style = state->style;
+	GOStyle *style = state->style;
 	gboolean is_auto;
 
 	style->fill.pattern.pattern = go_selector_get_active (GO_SELECTOR (selector), &is_auto);
@@ -373,8 +374,8 @@
 static void
 fill_pattern_init (StylePrefState *state)
 {
-	GogStyle *style = state->style;
-	GogStyle *default_style = state->default_style;
+	GOStyle *style = state->style;
+	GOStyle *default_style = state->default_style;
 	GtkWidget *selector;
 	GtkWidget *label;
        
@@ -400,9 +401,9 @@
 static void
 cb_brightness_changed (GtkRange *range, StylePrefState *state)
 {
-	GogStyle *style = state->style;
+	GOStyle *style = state->style;
 
-	gog_style_set_fill_brightness (style, gtk_range_get_value (range));
+	go_style_set_fill_brightness (style, gtk_range_get_value (range));
 	set_style (state);
 	fill_update_selectors (state);
 }
@@ -410,7 +411,7 @@
 static void
 cb_gradient_type_changed (GOSelector *selector, StylePrefState const *state)
 {
-	GogStyle *style = state->style;
+	GOStyle *style = state->style;
 	style->fill.gradient.dir = go_selector_get_active (selector, NULL);
 	set_style (state);
 }
@@ -418,7 +419,7 @@
 static void
 fill_gradient_init (StylePrefState *state)
 {
-	GogStyle *style = state->style;
+	GOStyle *style = state->style;
 	GtkWidget *selector;
 	GtkWidget *brightness;
 	GtkWidget *label;
@@ -455,7 +456,7 @@
 static void
 cb_fill_background_color (GOSelector *selector, StylePrefState *state)
 {
-	GogStyle *style = state->style;
+	GOStyle *style = state->style;
 
 	style->fill.pattern.back = go_color_selector_get_color (selector, 
 								&style->fill.auto_back);
@@ -466,7 +467,7 @@
 static void
 cb_fill_foreground_color (GOSelector *selector, StylePrefState *state)
 {
-	GogStyle *style = state->style;
+	GOStyle *style = state->style;
 
 	style->fill.pattern.fore = go_color_selector_get_color (selector,
 								&style->fill.auto_fore);
@@ -478,8 +479,8 @@
 static void
 fill_color_init (StylePrefState *state)
 {
-	GogStyle *style = state->style;
-	GogStyle *default_style = state->default_style;
+	GOStyle *style = state->style;
+	GOStyle *default_style = state->default_style;
 	GtkWidget *w;
 
 	state->fill.background = w = create_go_combo_color (state,
@@ -510,26 +511,26 @@
 static void
 cb_image_select (GtkWidget *cc, StylePrefState *state)
 {
-	GogStyle *style = state->style;
+	GOStyle *style = state->style;
 	GtkWidget *w;
 
 	g_return_if_fail (style != NULL);
-	g_return_if_fail (GOG_FILL_STYLE_IMAGE == style->fill.type);
+	g_return_if_fail (GO_STYLE_FILL_IMAGE == style->fill.type);
 
 	w = go_image_sel_new (state->doc, NULL, &style->fill.image.image);
 	gtk_window_set_transient_for (GTK_WINDOW (w), GTK_WINDOW (gtk_widget_get_toplevel (cc)));
 	gtk_dialog_run (GTK_DIALOG (w));
 
-	gog_style_set_image_preview (style->fill.image.image, state);
+	go_style_set_image_preview (style->fill.image.image, state);
 	set_style (state);
 }
 
 static void
 cb_image_style_changed (GtkWidget *w, StylePrefState *state)
 {
-	GogStyle *style = state->style;
+	GOStyle *style = state->style;
 	g_return_if_fail (style != NULL);
-	g_return_if_fail (GOG_FILL_STYLE_IMAGE == style->fill.type);
+	g_return_if_fail (GO_STYLE_FILL_IMAGE == style->fill.type);
 	style->fill.image.type = gtk_combo_box_get_active (GTK_COMBO_BOX (w));
 	set_style (state);
 }
@@ -538,7 +539,7 @@
 fill_image_init (StylePrefState *state)
 {
 	GtkWidget *w, *sample, *type;
-	GogStyle *style = state->style;
+	GOStyle *style = state->style;
 
 	w = glade_xml_get_widget (state->gui, "fill_image_select_picture");
 	g_signal_connect (G_OBJECT (w),
@@ -551,10 +552,10 @@
 
 	state->fill.image.image = NULL;
 
-	if (GOG_FILL_STYLE_IMAGE == style->fill.type) {
+	if (GO_STYLE_FILL_IMAGE == style->fill.type) {
 		gtk_combo_box_set_active (GTK_COMBO_BOX (type),
 			style->fill.image.type);
-		gog_style_set_image_preview (style->fill.image.image, state);
+		go_style_set_image_preview (style->fill.image.image, state);
 		state->fill.image.image = style->fill.image.image;
 		if (state->fill.image.image)
 			g_object_ref (state->fill.image.image);
@@ -576,17 +577,17 @@
 } FillType;
 
 static struct {
-	GogFillStyle 	type;
+	GOStyleFill 	type;
 	int		page;
 	gboolean	show_pattern;
 	gboolean	show_gradient;
 	gboolean	show_brightness;
 } fill_infos[] = {
-	{GOG_FILL_STYLE_NONE,		0, FALSE, FALSE, FALSE},
-	{GOG_FILL_STYLE_PATTERN,	1, TRUE,  FALSE, FALSE},
-	{GOG_FILL_STYLE_GRADIENT,	1, FALSE, TRUE,  FALSE},
-	{GOG_FILL_STYLE_GRADIENT,	1, FALSE, TRUE,  TRUE},
-	{GOG_FILL_STYLE_IMAGE,		2, FALSE, FALSE, FALSE}
+	{GO_STYLE_FILL_NONE,		0, FALSE, FALSE, FALSE},
+	{GO_STYLE_FILL_PATTERN,	1, TRUE,  FALSE, FALSE},
+	{GO_STYLE_FILL_GRADIENT,	1, FALSE, TRUE,  FALSE},
+	{GO_STYLE_FILL_GRADIENT,	1, FALSE, TRUE,  TRUE},
+	{GO_STYLE_FILL_IMAGE,		2, FALSE, FALSE, FALSE}
 };
 
 static void
@@ -626,7 +627,7 @@
 }
 
 static void
-fill_init (StylePrefState *state, gboolean enable, GogEditor *editor)
+fill_init (StylePrefState *state, gboolean enable, GOEditor *editor)
 {
 	GtkWidget *w;
 	FillType type;
@@ -637,7 +638,7 @@
 	}
 
 	state->fill.extension_box = glade_xml_get_widget (state->gui, "fill_extension_box");
-	gog_editor_register_widget (editor, state->fill.extension_box);
+	go_editor_register_widget (editor, state->fill.extension_box);
 
 	state->fill.size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
 
@@ -651,22 +652,22 @@
 	state->fill.notebook = glade_xml_get_widget (state->gui, "fill_notebook");
 
 	switch (state->style->fill.type) {
-		case GOG_FILL_STYLE_PATTERN:
+		case GO_STYLE_FILL_PATTERN:
 			type = FILL_TYPE_PATTERN;
 			break;
-		case GOG_FILL_STYLE_GRADIENT:
+		case GO_STYLE_FILL_GRADIENT:
 			if (state->style->fill.gradient.brightness >= 0)
 				type = FILL_TYPE_GRADIENT_UNICOLOR;
 			else
 				type = FILL_TYPE_GRADIENT_BICOLOR;
 			break;
-		case GOG_FILL_STYLE_IMAGE:
+		case GO_STYLE_FILL_IMAGE:
 			if (state->doc != NULL) {
 				type = FILL_TYPE_IMAGE;
 				break;
 			} else
-				state->style->fill.type = GOG_FILL_STYLE_NONE;
-		case GOG_FILL_STYLE_NONE:
+				state->style->fill.type = GO_STYLE_FILL_NONE;
+		case GO_STYLE_FILL_NONE:
 		default:
 			type = FILL_TYPE_NONE;
 			break;
@@ -690,7 +691,7 @@
 static void
 cb_marker_shape_changed (GOSelector *selector, StylePrefState const *state)
 {
-	GogStyle *style = state->style;
+	GOStyle *style = state->style;
 	GOMarkerShape shape;
 	gboolean is_auto;
 
@@ -704,7 +705,7 @@
 cb_marker_outline_color_changed (GOSelector *selector,
 				 StylePrefState *state)
 {
-	GogStyle *style = state->style;
+	GOStyle *style = state->style;
 	GOColor color;
 	gboolean is_auto;
 
@@ -722,7 +723,7 @@
 cb_marker_fill_color_changed (GOSelector *selector,
 			      StylePrefState *state)
 {
-	GogStyle *style = state->style;
+	GOStyle *style = state->style;
 	GOColor color;
 	gboolean is_auto;
 
@@ -743,13 +744,13 @@
 	set_style (state);
 }
 
-static void gog_style_pref_state_free (StylePrefState *state);
+static void go_style_pref_state_free (StylePrefState *state);
 
 static void
-marker_init (StylePrefState *state, gboolean enable, GogEditor *editor, GOCmdContext *cc)
+marker_init (StylePrefState *state, gboolean enable, GOEditor *editor, GOCmdContext *cc)
 {
-	GogStyle *style = state->style;
-	GogStyle *default_style = state->default_style;
+	GOStyle *style = state->style;
+	GOStyle *default_style = state->default_style;
 	GtkWidget *table, *w;
 	GtkWidget *selector;
 	GladeXML *gui;
@@ -757,7 +758,7 @@
 	if (!enable)
 		return;
 
-	gui = go_libglade_new ("gog-style-prefs.glade", "gog_style_marker_prefs", GETTEXT_PACKAGE, cc);
+	gui = go_libglade_new ("go-style-prefs.glade", "go_style_marker_prefs", GETTEXT_PACKAGE, cc);
 	if (gui == NULL)
 		return;
 
@@ -766,7 +767,7 @@
 	state->marker.selector = selector = 
 		go_marker_selector_new (go_marker_get_shape (style->marker.mark),
 					go_marker_get_shape (state->default_style->marker.mark));
-	if ((style->interesting_fields & GOG_STYLE_MARKER_NO_COLOR )== 0)
+	if ((style->interesting_fields & GO_STYLE_MARKER_NO_COLOR )== 0)
 		go_marker_selector_set_colors (GO_SELECTOR (selector), 
 					       go_marker_get_outline_color (style->marker.mark),
 					       go_marker_get_fill_color (style->marker.mark));
@@ -780,7 +781,7 @@
 			  G_CALLBACK (cb_marker_shape_changed), state);
 	gtk_widget_show (selector);
 
-	if ((style->interesting_fields & GOG_STYLE_MARKER_NO_COLOR ) == 0)
+	if ((style->interesting_fields & GO_STYLE_MARKER_NO_COLOR ) == 0)
 		w = create_go_combo_color (state,
 			go_marker_get_fill_color (style->marker.mark),
 			go_marker_get_fill_color (default_style->marker.mark),
@@ -795,7 +796,7 @@
 	}
 	gtk_table_attach (GTK_TABLE (table), w, 1, 2, 1, 2, GTK_FILL, GTK_FILL, 0, 0);
 	
-	if ((style->interesting_fields & GOG_STYLE_MARKER_NO_COLOR ) == 0)
+	if ((style->interesting_fields & GO_STYLE_MARKER_NO_COLOR ) == 0)
 		w = create_go_combo_color (state,
 			go_marker_get_outline_color (style->marker.mark),
 			go_marker_get_outline_color (default_style->marker.mark),
@@ -819,13 +820,13 @@
 
 	gtk_widget_show_all (table);
 
-	w = glade_xml_get_widget (gui, "gog_style_marker_prefs");
+	w = glade_xml_get_widget (gui, "go_style_marker_prefs");
 
-	gog_editor_add_page (editor, w, _("Markers"));
+	go_editor_add_page (editor, w, _("Markers"));
 	g_object_unref (gui);
 	if (state->gui == NULL)
 		g_object_set_data_full (G_OBJECT (w),
-			"state", state, (GDestroyNotify) gog_style_pref_state_free);
+			"state", state, (GDestroyNotify) go_style_pref_state_free);
 }
 
 /************************************************************************/
@@ -844,7 +845,7 @@
 	g_slist_foreach (extra_attrs, (GFunc)pango_attribute_destroy, NULL);
 	g_slist_free (extra_attrs);
 	pango_attr_iterator_destroy (iter);
-	gog_style_set_font (state->style, font);
+	go_style_set_font (state->style, font);
 	set_style (state);
 }
 
@@ -852,16 +853,16 @@
 cb_font_color_changed (GOSelector *selector,
 		       StylePrefState *state)
 {
-	GogStyle *style = state->style;
+	GOStyle *style = state->style;
 	
 	style->font.color = go_color_selector_get_color (selector, NULL);
 	set_style (state);
 }
 
 static void
-font_init (StylePrefState *state, guint32 enable, GogEditor *editor, GOCmdContext *cc)
+font_init (StylePrefState *state, guint32 enable, GOEditor *editor, GOCmdContext *cc)
 {
-	GogStyle *style = state->style;
+	GOStyle *style = state->style;
 	GtkWidget *w, *box;
 	GladeXML *gui;
 
@@ -870,7 +871,7 @@
 
 	g_return_if_fail (style->font.font != NULL);
 
-	gui = go_libglade_new ("gog-style-prefs.glade", "gog_style_font_prefs", GETTEXT_PACKAGE, cc);
+	gui = go_libglade_new ("go-style-prefs.glade", "go_style_font_prefs", GETTEXT_PACKAGE, cc);
 	if (gui == NULL)
 		return;
 
@@ -889,10 +890,10 @@
 			  G_CALLBACK (cb_font_changed), state);
 	gtk_widget_show (w);
 
- 	box = glade_xml_get_widget (gui, "gog_style_font_prefs");
+ 	box = glade_xml_get_widget (gui, "go_style_font_prefs");
 	gtk_box_pack_end (GTK_BOX (box), w, TRUE, TRUE, 0);
 	
-	gog_editor_add_page (editor, box, _("Font"));
+	go_editor_add_page (editor, box, _("Font"));
 }
 
 /************************************************************************/
@@ -900,14 +901,14 @@
 static void
 cb_angle_changed (GORotationSel *grs, int angle, StylePrefState *state)
 {
-	gog_style_set_text_angle (state->style, angle);
+	go_style_set_text_angle (state->style, angle);
 	set_style (state);
 }
 
 static void
-text_layout_init (StylePrefState *state, guint32 enable, GogEditor *editor, GOCmdContext *cc)
+text_layout_init (StylePrefState *state, guint32 enable, GOEditor *editor, GOCmdContext *cc)
 {
-	GogStyle *style = state->style;
+	GOStyle *style = state->style;
 	GtkWidget *w, *box;
 
 	if (!enable)
@@ -921,7 +922,7 @@
 	box = gtk_vbox_new (FALSE, 6);
 	gtk_box_pack_start (GTK_BOX (box), w, TRUE, TRUE, 0);
 	gtk_container_set_border_width (GTK_CONTAINER (box), 12);
-	gog_editor_add_page (editor, box, _("Text"));
+	go_editor_add_page (editor, box, _("Text"));
 }
 
 /************************************************************************/
@@ -934,7 +935,7 @@
 }
 
 static void
-gog_style_pref_state_free (StylePrefState *state)
+go_style_pref_state_free (StylePrefState *state)
 {
 	if (state->style_changed_handler) {
 		g_signal_handler_disconnect (state->object_with_style,
@@ -956,18 +957,17 @@
 }
 
 void
-gog_style_populate_editor (GogStyle *style,
-			   GogEditor *editor,
-			   GogStyle *default_style,
+go_style_populate_editor (GOStyle *style,
+			   GOEditor *editor,
+			   GOStyle *default_style,
 			   GOCmdContext *cc,
 			   GObject	*object_with_style,
 			   gboolean   watch_for_external_change)
 {
-	GogStyleFlag enable;
+	GOStyleFlag enable;
 	GtkWidget *w;
 	GladeXML *gui;
 	StylePrefState *state;
-	GogGraph *graph;
 
 	g_return_if_fail (style != NULL);
 	g_return_if_fail (default_style != NULL);
@@ -985,28 +985,28 @@
 	state->object_with_style = object_with_style;
 	state->enable_edit = FALSE;
 
-	graph = gog_object_get_graph (GOG_OBJECT (object_with_style));
-	g_object_get (graph, "document", &state->doc, NULL);
+	state->doc = (GO_IS_STYLED_OBJECT (object_with_style))?
+		go_styled_object_get_document (GO_STYLED_OBJECT (object_with_style)): NULL;
 
-	if ((enable & (GOG_STYLE_OUTLINE | GOG_STYLE_LINE | GOG_STYLE_FILL)) != 0) {
-		gui = go_libglade_new ("gog-style-prefs.glade", "gog_style_prefs", GETTEXT_PACKAGE, cc);
+	if ((enable & (GO_STYLE_OUTLINE | GO_STYLE_LINE | GO_STYLE_FILL)) != 0) {
+		gui = go_libglade_new ("go-style-prefs.glade", "go_style_prefs", GETTEXT_PACKAGE, cc);
 		if (gui == NULL) {
 			g_free (state);
 			return;
 		}
 		state->gui = gui;
-		w = glade_xml_get_widget (gui, "gog_style_prefs");
+		w = glade_xml_get_widget (gui, "go_style_prefs");
 		g_object_set_data_full (G_OBJECT (w),
-			"state", state, (GDestroyNotify) gog_style_pref_state_free);
-		gog_editor_add_page (editor, w, _("Style"));
+			"state", state, (GDestroyNotify) go_style_pref_state_free);
+		go_editor_add_page (editor, w, _("Style"));
 
-		outline_init 	 (state, enable & GOG_STYLE_OUTLINE, editor);
-		line_init    	 (state, enable & GOG_STYLE_LINE, editor);
-		fill_init    	 (state, enable & GOG_STYLE_FILL, editor);
-	}
-	marker_init  	 (state, enable & GOG_STYLE_MARKER, editor, cc);
-	font_init    	 (state, enable & GOG_STYLE_FONT, editor, cc);
-	text_layout_init (state, enable & GOG_STYLE_TEXT_LAYOUT, editor, cc);
+		outline_init 	 (state, enable & GO_STYLE_OUTLINE, editor);
+		line_init    	 (state, enable & GO_STYLE_LINE, editor);
+		fill_init    	 (state, enable & GO_STYLE_FILL, editor);
+	}
+	marker_init  	 (state, enable & GO_STYLE_MARKER, editor, cc);
+	font_init    	 (state, enable & GO_STYLE_FONT, editor, cc);
+	text_layout_init (state, enable & GO_STYLE_TEXT_LAYOUT, editor, cc);
 
 	state->enable_edit = TRUE;
 
@@ -1020,19 +1020,21 @@
 }
 
 gpointer
-gog_style_get_editor (GogStyle *style,
-		  GogStyle *default_style,
+go_style_get_editor (GOStyle *style,
+		  GOStyle *default_style,
 		  GOCmdContext *cc,
 		  GObject *object_with_style)
 {
 	GtkWidget *notebook;
-	GogEditor *editor = gog_editor_new ();
+	GOEditor *editor = go_editor_new ();
 
-	gog_style_populate_editor (style, editor, default_style, cc, 
+printf("editor=%p\n",editor);
+	go_style_populate_editor (style, editor, default_style, cc, 
 				   object_with_style, FALSE);
 
-	notebook = gog_editor_get_notebook (editor);
-	gog_editor_free (editor);
+	notebook = go_editor_get_notebook (editor);
+printf("notebook=%p\n",notebook);
+	go_editor_free (editor);
 	gtk_widget_show (notebook);
 	return notebook;
 }
@@ -1040,45 +1042,46 @@
 
 /*****************************************************************************/
 
-GogStyle *
-gog_style_new (void)
+GOStyle *
+go_style_new (void)
 {
-	return g_object_new (GOG_TYPE_STYLE, NULL);
+	return g_object_new (GO_TYPE_STYLE, NULL);
 }
 
 /**
- * gog_style_dup:
- * @style : a source #GogStyle
+ * go_style_dup:
+ * @style : a source #GOStyle
  *
  * Duplicates @style.
  *
- * return value: a new #GogStyle
+ * return value: a new #GOStyle
  **/
-GogStyle *
-gog_style_dup (GogStyle const *src)
+GOStyle *
+go_style_dup (GOStyle const *src)
 {
-	GogStyle *dst;
+	GOStyle *dst;
 
-	g_return_val_if_fail (GOG_IS_STYLE (src), NULL);
+	g_return_val_if_fail (GO_IS_STYLE (src), NULL);
 
-	dst = gog_style_new ();
-	gog_style_assign (dst, src);
+	/* the source style might be a derived object, so use its type for duplication */
+	dst = GO_STYLE (g_object_new (G_OBJECT_TYPE (src), NULL));
+	go_style_assign (dst, src);
 	return dst;
 }
 
 void
-gog_style_assign (GogStyle *dst, GogStyle const *src)
+go_style_assign (GOStyle *dst, GOStyle const *src)
 {
 	if (src == dst)
 		return;
 
-	g_return_if_fail (GOG_IS_STYLE (src));
-	g_return_if_fail (GOG_IS_STYLE (dst));
+	g_return_if_fail (GO_IS_STYLE (src));
+	g_return_if_fail (GO_IS_STYLE (dst));
 
-	if (GOG_FILL_STYLE_IMAGE == src->fill.type &&
+	if (GO_STYLE_FILL_IMAGE == src->fill.type &&
 	    src->fill.image.image != NULL)
 		g_object_ref (src->fill.image.image);
-	if (GOG_FILL_STYLE_IMAGE == dst->fill.type) {
+	if (GO_STYLE_FILL_IMAGE == dst->fill.type) {
 		if (dst->fill.image.image != NULL)
 			g_object_unref (dst->fill.image.image);
 	}
@@ -1097,7 +1100,7 @@
 	dst->marker.mark = go_marker_dup (src->marker.mark);
 	dst->font    = src->font;
 
-	if (GOG_FILL_STYLE_IMAGE == dst->fill.type && src->fill.image.image)
+	if (GO_STYLE_FILL_IMAGE == dst->fill.type && src->fill.image.image)
 		dst->fill.image.image = g_object_ref (src->fill.image.image);
 
 	dst->text_layout = src->text_layout;
@@ -1107,21 +1110,21 @@
 }
 
 /**
- * gog_style_apply_theme :
- * @dst : #GogStyle
- * @src :  #GogStyle
+ * go_style_apply_theme :
+ * @dst : #GOStyle
+ * @src :  #GOStyle
  *
  * Merge the attributes from @src onto the elements of @dst that were not user
  * assigned (is_auto)
  **/
 void
-gog_style_apply_theme (GogStyle *dst, GogStyle const *src)
+go_style_apply_theme (GOStyle *dst, GOStyle const *src)
 {
 	if (src == dst)
 		return;
 
-	g_return_if_fail (GOG_IS_STYLE (src));
-	g_return_if_fail (GOG_IS_STYLE (dst));
+	g_return_if_fail (GO_IS_STYLE (src));
+	g_return_if_fail (GO_IS_STYLE (dst));
 
 	if (dst->outline.auto_dash)
 		dst->outline.dash_type = src->outline.dash_type;
@@ -1161,11 +1164,11 @@
 }
 
 static void
-gog_style_finalize (GObject *obj)
+go_style_finalize (GObject *obj)
 {
-	GogStyle *style = GOG_STYLE (obj);
+	GOStyle *style = GO_STYLE (obj);
 
-	if (GOG_FILL_STYLE_IMAGE == style->fill.type &&
+	if (GO_STYLE_FILL_IMAGE == style->fill.type &&
 	    style->fill.image.image != NULL)
 		g_object_unref (style->fill.image.image);
 
@@ -1183,23 +1186,23 @@
 }
 
 static void
-gog_style_class_init (GogStyleClass *klass)
+go_style_class_init (GOStyleClass *klass)
 {
 	GObjectClass *gobject_klass = (GObjectClass *)klass;
 	parent_klass = g_type_class_peek_parent (klass);
-	gobject_klass->finalize	= gog_style_finalize;
+	gobject_klass->finalize	= go_style_finalize;
 }
 
 static void
-gog_style_init (GogStyle *style)
+go_style_init (GOStyle *style)
 {
-	style->interesting_fields = GOG_STYLE_ALL;
+	style->interesting_fields = GO_STYLE_ALL;
 	style->disable_theming = 0;
-	gog_style_force_auto (style);
+	go_style_force_auto (style);
 	style->line.dash_type = GO_LINE_SOLID;
 	style->outline.dash_type = GO_LINE_SOLID;
 	style->outline.width = 0;
-	style->fill.type = GOG_FILL_STYLE_NONE;
+	style->fill.type = GO_STYLE_FILL_NONE;
 	style->fill.gradient.brightness = -1.;
 	go_pattern_set_solid (&style->fill.pattern, RGBA_BLACK);
 	style->font.font = go_font_new_by_index (0);
@@ -1208,22 +1211,22 @@
 }
 
 static struct {
-	GogFillStyle fstyle;
+	GOStyleFill fstyle;
 	char const *name;
 } fill_names[] = {
-	{ GOG_FILL_STYLE_NONE,     "none" },
-	{ GOG_FILL_STYLE_PATTERN,  "pattern" },
-	{ GOG_FILL_STYLE_GRADIENT, "gradient" },
-	{ GOG_FILL_STYLE_IMAGE,    "image" }
+	{ GO_STYLE_FILL_NONE,     "none" },
+	{ GO_STYLE_FILL_PATTERN,  "pattern" },
+	{ GO_STYLE_FILL_GRADIENT, "gradient" },
+	{ GO_STYLE_FILL_IMAGE,    "image" }
 };
 
 static struct {
-	GogImageType fstyle;
+	GOImageType fstyle;
 	char const *name;
 } image_tiling_names[] = {
-	{ GOG_IMAGE_CENTERED,     "centered" },
-	{ GOG_IMAGE_STRETCHED,    "stretched" },
-	{ GOG_IMAGE_WALLPAPER,    "wallpaper" },
+	{ GO_IMAGE_CENTERED,     "centered" },
+	{ GO_IMAGE_STRETCHED,    "stretched" },
+	{ GO_IMAGE_WALLPAPER,    "wallpaper" },
 };
 
 static gboolean
@@ -1253,18 +1256,18 @@
 }
 
 
-static GogFillStyle
+static GOStyleFill
 str_as_fill_style (char const *name)
 {
 	unsigned i;
 	for (i = 0; i < G_N_ELEMENTS (fill_names); i++)
 		if (strcmp (fill_names[i].name, name) == 0)
 			return fill_names[i].fstyle;
-	return GOG_FILL_STYLE_PATTERN;
+	return GO_STYLE_FILL_PATTERN;
 }
 
 static char const *
-fill_style_as_str (GogFillStyle fstyle)
+fill_style_as_str (GOStyleFill fstyle)
 {
 	unsigned i;
 	for (i = 0; i < G_N_ELEMENTS (fill_names); i++)
@@ -1273,18 +1276,18 @@
 	return "pattern";
 }
 
-static GogImageType
+static GOImageType
 str_as_image_tiling (char const *name)
 {
 	unsigned i;
 	for (i = 0; i < G_N_ELEMENTS (image_tiling_names); i++)
 		if (strcmp (image_tiling_names[i].name, name) == 0)
 			return image_tiling_names[i].fstyle;
-	return GOG_IMAGE_STRETCHED;
+	return GO_IMAGE_STRETCHED;
 }
 
 static char const *
-image_tiling_as_str (GogImageType fstyle)
+image_tiling_as_str (GOImageType fstyle)
 {
 	unsigned i;
 	for (i = 0; i < G_N_ELEMENTS (image_tiling_names); i++)
@@ -1294,7 +1297,7 @@
 }
 
 static void
-gog_style_line_load (xmlNode *node, GogStyleLine *line)
+go_style_line_load (xmlNode *node, GOStyleLine *line)
 {
 	char *str;
 	gboolean tmp;
@@ -1327,8 +1330,8 @@
 }
 
 static void
-gog_style_line_sax_save (GsfXMLOut *output, char const *name,
-			 GogStyleLine const *line)
+go_style_line_sax_save (GsfXMLOut *output, char const *name,
+			 GOStyleLine const *line)
 {
 	gsf_xml_out_start_element (output, name);
 	gsf_xml_out_add_cstr_unchecked (output, "dash",
@@ -1341,7 +1344,7 @@
 }
 
 static void
-gog_style_gradient_sax_save (GsfXMLOut *output, GogStyle const *style)
+go_style_gradient_sax_save (GsfXMLOut *output, GOStyle const *style)
 {
 	gsf_xml_out_start_element (output, "gradient");
 	gsf_xml_out_add_cstr_unchecked (output, "direction",
@@ -1358,7 +1361,7 @@
 }
 
 static void
-gog_style_fill_sax_save (GsfXMLOut *output, GogStyle const *style)
+go_style_fill_sax_save (GsfXMLOut *output, GOStyle const *style)
 {
 	gsf_xml_out_start_element (output, "fill");
 	gsf_xml_out_add_cstr_unchecked (output, "type",
@@ -1371,8 +1374,8 @@
 		style->fill.auto_fore);
 
 	switch (style->fill.type) {
-	case GOG_FILL_STYLE_NONE: break;
-	case GOG_FILL_STYLE_PATTERN:
+	case GO_STYLE_FILL_NONE: break;
+	case GO_STYLE_FILL_PATTERN:
 		gsf_xml_out_start_element (output, "pattern");
 		gsf_xml_out_add_cstr_unchecked (output, "type",
 			go_pattern_as_str (style->fill.pattern.pattern));
@@ -1383,10 +1386,10 @@
 		gsf_xml_out_end_element (output);
 		break;
 
-	case GOG_FILL_STYLE_GRADIENT:
-		gog_style_gradient_sax_save (output, style);
+	case GO_STYLE_FILL_GRADIENT:
+		go_style_gradient_sax_save (output, style);
 		break;
-	case GOG_FILL_STYLE_IMAGE:
+	case GO_STYLE_FILL_IMAGE:
 		if (NULL == style->fill.image.image) {
 			g_warning ("droping fill with missing image");
 			break;
@@ -1407,7 +1410,7 @@
 }
 
 static void
-gog_style_gradient_load (xmlNode *node, GogStyle *style)
+go_style_gradient_load (xmlNode *node, GOStyle *style)
 {
 	char    *str = xmlGetProp (node, "direction");
 	if (str != NULL) {
@@ -1422,7 +1425,7 @@
 	}
 	str = xmlGetProp (node, "brightness");
 	if (str != NULL) {
-		gog_style_set_fill_brightness (style, g_strtod (str, NULL));
+		go_style_set_fill_brightness (style, g_strtod (str, NULL));
 		xmlFree (str);
 	} else {
 		str = xmlGetProp (node, "end-color");
@@ -1434,7 +1437,7 @@
 }
 
 static void
-gog_style_image_load (xmlNode *node, GogStyle *style)
+go_style_image_load (xmlNode *node, GOStyle *style)
 {
 	char *str = xmlGetProp (node, "type");
 	if (str != NULL) {
@@ -1445,7 +1448,7 @@
 }
 
 static void
-gog_style_fill_load (xmlNode *node, GogStyle *style)
+go_style_fill_load (xmlNode *node, GOStyle *style)
 {
 	xmlNode *ptr;
 	gboolean tmp;
@@ -1466,7 +1469,7 @@
 		style->fill.auto_fore = tmp;
 
 	switch (style->fill.type) {
-	case GOG_FILL_STYLE_PATTERN:
+	case GO_STYLE_FILL_PATTERN:
 		for (ptr = node->xmlChildrenNode ;
 		     ptr != NULL ; ptr = ptr->next) {
 			if (xmlIsBlankNode (ptr) || ptr->name == NULL)
@@ -1491,22 +1494,22 @@
 			}
 		}
 		break;
-	case GOG_FILL_STYLE_GRADIENT:
+	case GO_STYLE_FILL_GRADIENT:
 		for (ptr = node->xmlChildrenNode ;
 		     ptr != NULL ; ptr = ptr->next) {
 			if (xmlIsBlankNode (ptr) || ptr->name == NULL)
 				continue;
 			if (strcmp (ptr->name, "gradient") == 0)
-				gog_style_gradient_load (ptr, style);
+				go_style_gradient_load (ptr, style);
 		}
 		break;
-	case GOG_FILL_STYLE_IMAGE:
+	case GO_STYLE_FILL_IMAGE:
 		for (ptr = node->xmlChildrenNode ;
 		     ptr != NULL ; ptr = ptr->next) {
 			if (xmlIsBlankNode (ptr) || ptr->name == NULL)
 				continue;
 			if (strcmp (ptr->name, "image") == 0) {
-				gog_style_image_load (ptr, style);
+				go_style_image_load (ptr, style);
 			}
 		}
 		break;
@@ -1516,7 +1519,7 @@
 }
 
 static void
-gog_style_marker_load (xmlNode *node, GogStyle *style)
+go_style_marker_load (xmlNode *node, GOStyle *style)
 {
 	char *str;
 	GOColor c;
@@ -1550,11 +1553,11 @@
 		go_marker_set_size (marker, g_strtod (str, NULL));
 		xmlFree (str);
 	}
-	gog_style_set_marker (style, marker);
+	go_style_set_marker (style, marker);
 }
 
 static void
-gog_style_marker_sax_save (GsfXMLOut *output, GogStyle const *style)
+go_style_marker_sax_save (GsfXMLOut *output, GOStyle const *style)
 {
 	gsf_xml_out_start_element (output, "marker");
 	gsf_xml_out_add_bool (output, "auto-shape", style->marker.auto_shape);
@@ -1573,7 +1576,7 @@
 }
 
 static void
-gog_style_font_load (xmlNode *node, GogStyle *style)
+go_style_font_load (xmlNode *node, GOStyle *style)
 {
 	char *str;
 	gboolean tmp;
@@ -1589,7 +1592,7 @@
 
 		desc = pango_font_description_from_string (str);
 		if (desc != NULL)
-			gog_style_set_font_desc (style, desc);
+			go_style_set_font_desc (style, desc);
 		xmlFree (str);
 	}
 	if (bool_prop (node, "auto-scale", &tmp))
@@ -1597,7 +1600,7 @@
 }
 
 static void
-gog_style_font_sax_save (GsfXMLOut *output, GogStyle const *style)
+go_style_font_sax_save (GsfXMLOut *output, GOStyle const *style)
 {
 	char *str;
 	gsf_xml_out_start_element (output, "font");
@@ -1610,19 +1613,19 @@
 }
 
 static void
-gog_style_text_layout_load (xmlNode *node, GogStyle *style)
+go_style_text_layout_load (xmlNode *node, GOStyle *style)
 {
 	char *str;
 
 	str = xmlGetProp (node, "angle");
 	if (str != NULL) {
-		gog_style_set_text_angle (style, g_strtod (str, NULL));
+		go_style_set_text_angle (style, g_strtod (str, NULL));
 		xmlFree (str);
 	}
 }
 
 static void
-gog_style_text_layout_sax_save (GsfXMLOut *output, GogStyle const *style)
+go_style_text_layout_sax_save (GsfXMLOut *output, GOStyle const *style)
 {
 	gsf_xml_out_start_element (output, "text_layout");
 	if (!style->text_layout.auto_angle)
@@ -1631,9 +1634,9 @@
 }
 
 static gboolean
-gog_style_persist_dom_load (GOPersist *gp, xmlNode *node)
+go_style_persist_dom_load (GOPersist *gp, xmlNode *node)
 {
-	GogStyle *style = GOG_STYLE (gp);
+	GOStyle *style = GO_STYLE (gp);
 	xmlNode *ptr;
 
 	/* while reloading no need to reapply settings */
@@ -1641,26 +1644,26 @@
 		if (xmlIsBlankNode (ptr) || ptr->name == NULL)
 			continue;
 		if (strcmp (ptr->name, "outline") == 0)
-			gog_style_line_load (ptr, &style->outline);
+			go_style_line_load (ptr, &style->outline);
 		else if (strcmp (ptr->name, "line") == 0)
-			gog_style_line_load (ptr, &style->line);
+			go_style_line_load (ptr, &style->line);
 		else if (strcmp (ptr->name, "fill") == 0)
-			gog_style_fill_load (ptr, style);
+			go_style_fill_load (ptr, style);
 		else if (strcmp (ptr->name, "marker") == 0)
-			gog_style_marker_load (ptr, style);
+			go_style_marker_load (ptr, style);
 		else if (strcmp (ptr->name, "font") == 0)
-			gog_style_font_load (ptr, style);
+			go_style_font_load (ptr, style);
 		else if (strcmp (ptr->name, "text_layout") == 0)
-			gog_style_text_layout_load (ptr, style);
+			go_style_text_layout_load (ptr, style);
 	}
 	return TRUE;
 }
 
 static void
-gog_style_sax_load_line (GsfXMLIn *xin, xmlChar const **attrs)
+go_style_sax_load_line (GsfXMLIn *xin, xmlChar const **attrs)
 {
-	GogStyle *style = GOG_STYLE (xin->user_state);
-	GogStyleLine *line = xin->node->user_data.v_int ? &style->outline : &style->line;
+	GOStyle *style = GO_STYLE (xin->user_state);
+	GOStyleLine *line = xin->node->user_data.v_int ? &style->outline : &style->line;
 
 	for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
 		if (0 == strcmp (attrs[0], "dash"))
@@ -1682,10 +1685,10 @@
 }
 
 static void
-gog_style_sax_load_fill_pattern (GsfXMLIn *xin, xmlChar const **attrs)
+go_style_sax_load_fill_pattern (GsfXMLIn *xin, xmlChar const **attrs)
 {
-	GogStyle *style = GOG_STYLE (xin->user_state);
-	g_return_if_fail (style->fill.type == GOG_FILL_STYLE_PATTERN);
+	GOStyle *style = GO_STYLE (xin->user_state);
+	g_return_if_fail (style->fill.type == GO_STYLE_FILL_PATTERN);
 	for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
 		if (0 == strcmp (attrs[0], "type"))
 			style->fill.pattern.pattern = go_pattern_from_str (attrs[1]);
@@ -1696,10 +1699,10 @@
 }
 
 static void
-gog_style_sax_load_fill_gradient (GsfXMLIn *xin, xmlChar const **attrs)
+go_style_sax_load_fill_gradient (GsfXMLIn *xin, xmlChar const **attrs)
 {
-	GogStyle *style = GOG_STYLE (xin->user_state);
-	g_return_if_fail (style->fill.type == GOG_FILL_STYLE_GRADIENT);
+	GOStyle *style = GO_STYLE (xin->user_state);
+	g_return_if_fail (style->fill.type == GO_STYLE_FILL_GRADIENT);
 	for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
 		if (0 == strcmp (attrs[0], "direction"))
 			style->fill.gradient.dir = go_gradient_dir_from_str (attrs[1]);
@@ -1708,15 +1711,15 @@
 		else if (0 == strcmp (attrs[0], "end-color"))
 			go_color_from_str (attrs[1], &style->fill.pattern.fore);
 		else if (0 == strcmp (attrs[0], "brightness"))
-			gog_style_set_fill_brightness (style, g_strtod (attrs[1], NULL));
+			go_style_set_fill_brightness (style, g_strtod (attrs[1], NULL));
 }
 
 static void
-gog_style_sax_load_fill_image (GsfXMLIn *xin, xmlChar const **attrs)
+go_style_sax_load_fill_image (GsfXMLIn *xin, xmlChar const **attrs)
 {
-	GogStyle *style = GOG_STYLE (xin->user_state);
+	GOStyle *style = GO_STYLE (xin->user_state);
 	GODoc *doc = (GODoc *) g_object_get_data (G_OBJECT (gsf_xml_in_get_input (xin)), "document");
-	g_return_if_fail (style->fill.type == GOG_FILL_STYLE_IMAGE);
+	g_return_if_fail (style->fill.type == GO_STYLE_FILL_IMAGE);
 	g_return_if_fail (GO_IS_DOC (doc));
 	/* TODO: load the pixels */
 	for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
@@ -1727,9 +1730,9 @@
 }
 
 static void
-gog_style_sax_load_fill (GsfXMLIn *xin, xmlChar const **attrs)
+go_style_sax_load_fill (GsfXMLIn *xin, xmlChar const **attrs)
 {
-	GogStyle *style = GOG_STYLE (xin->user_state);
+	GOStyle *style = GO_STYLE (xin->user_state);
 	style->fill.auto_type = FALSE;
 	for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
 		if (0 == strcmp (attrs[0], "type"))
@@ -1742,9 +1745,9 @@
 			;
 }
 static void
-gog_style_sax_load_marker (GsfXMLIn *xin, xmlChar const **attrs)
+go_style_sax_load_marker (GsfXMLIn *xin, xmlChar const **attrs)
 {
-	GogStyle *style = GOG_STYLE (xin->user_state);
+	GOStyle *style = GO_STYLE (xin->user_state);
 	GOMarker *marker = go_marker_dup (style->marker.mark);
 	GOColor c;
 
@@ -1766,13 +1769,13 @@
 		} else if (0 == strcmp (attrs[0], "size"))
 			go_marker_set_size (marker, g_strtod (attrs[1], NULL));
 
-	gog_style_set_marker (style, marker);
+	go_style_set_marker (style, marker);
 }
 
 static void
-gog_style_sax_load_font (GsfXMLIn *xin, xmlChar const **attrs)
+go_style_sax_load_font (GsfXMLIn *xin, xmlChar const **attrs)
 {
-	GogStyle *style = GOG_STYLE (xin->user_state);
+	GOStyle *style = GO_STYLE (xin->user_state);
 	for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
 		if (0 == strcmp (attrs[0], "color"))
 			go_color_from_str (attrs[1], &style->font.color);
@@ -1781,44 +1784,44 @@
 			if (desc != NULL) {
 				if (pango_font_description_get_family (desc) == NULL)
 					pango_font_description_set_family_static (desc, "Sans");
-				gog_style_set_font_desc (style, desc);
+				go_style_set_font_desc (style, desc);
 			}
 		} else if (bool_sax_prop ("auto-scale", attrs[0], attrs[1], &style->font.auto_scale))
 			;
 }
 static void
-gog_style_sax_load_text_layout (GsfXMLIn *xin, xmlChar const **attrs)
+go_style_sax_load_text_layout (GsfXMLIn *xin, xmlChar const **attrs)
 {
-	GogStyle *style = GOG_STYLE (xin->user_state);
+	GOStyle *style = GO_STYLE (xin->user_state);
 	for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
 		if (0 == strcmp (attrs[0], "angle"))
-			gog_style_set_text_angle (style, g_strtod (attrs[1], NULL));
+			go_style_set_text_angle (style, g_strtod (attrs[1], NULL));
 }
 
 static void
-gog_style_persist_sax_save (GOPersist const *gp, GsfXMLOut *output)
+go_style_persist_sax_save (GOPersist const *gp, GsfXMLOut *output)
 {
-	GogStyle const *style = GOG_STYLE (gp);
+	GOStyle const *style = GO_STYLE (gp);
 
 	gsf_xml_out_add_cstr_unchecked (output, "type",
 		G_OBJECT_TYPE_NAME (style));
 
-	if (style->interesting_fields & GOG_STYLE_OUTLINE)
-		gog_style_line_sax_save (output, "outline", &style->outline);
-	if (style->interesting_fields & GOG_STYLE_LINE)
-		gog_style_line_sax_save (output, "line", &style->line);
-	if (style->interesting_fields & GOG_STYLE_FILL)
-		gog_style_fill_sax_save (output, style);
-	if (style->interesting_fields & GOG_STYLE_MARKER)
-		gog_style_marker_sax_save (output, style);
-	if (style->interesting_fields & GOG_STYLE_FONT)
-		gog_style_font_sax_save (output, style);
-	if (style->interesting_fields & GOG_STYLE_TEXT_LAYOUT)
-		gog_style_text_layout_sax_save (output, style);
+	if (style->interesting_fields & GO_STYLE_OUTLINE)
+		go_style_line_sax_save (output, "outline", &style->outline);
+	if (style->interesting_fields & GO_STYLE_LINE)
+		go_style_line_sax_save (output, "line", &style->line);
+	if (style->interesting_fields & GO_STYLE_FILL)
+		go_style_fill_sax_save (output, style);
+	if (style->interesting_fields & GO_STYLE_MARKER)
+		go_style_marker_sax_save (output, style);
+	if (style->interesting_fields & GO_STYLE_FONT)
+		go_style_font_sax_save (output, style);
+	if (style->interesting_fields & GO_STYLE_TEXT_LAYOUT)
+		go_style_text_layout_sax_save (output, style);
 }
 
 static void
-gog_style_persist_prep_sax (GOPersist *gp, GsfXMLIn *xin, xmlChar const **attrs)
+go_style_persist_prep_sax (GOPersist *gp, GsfXMLIn *xin, xmlChar const **attrs)
 {
 	static GsfXMLInNode const dtd[] = {
 		GSF_XML_IN_NODE 	(STYLE, STYLE, 
@@ -1827,39 +1830,39 @@
 		GSF_XML_IN_NODE_FULL 	(STYLE, STYLE_LINE, 
 					 -1, "line", 
 					 GSF_XML_NO_CONTENT, FALSE, FALSE, 
-					 &gog_style_sax_load_line, NULL, 0),
+					 &go_style_sax_load_line, NULL, 0),
 		GSF_XML_IN_NODE_FULL 	(STYLE, STYLE_OUTLINE,	
 					 -1, "outline", 
 					 GSF_XML_NO_CONTENT, FALSE, FALSE, 
-					 &gog_style_sax_load_line, NULL, 1),
+					 &go_style_sax_load_line, NULL, 1),
 		GSF_XML_IN_NODE 	(STYLE, STYLE_FILL, 
 					 -1, "fill", 
 					 GSF_XML_NO_CONTENT, 
-					 &gog_style_sax_load_fill, NULL),
+					 &go_style_sax_load_fill, NULL),
 		GSF_XML_IN_NODE 	(STYLE_FILL, FILL_PATTERN,  
 					 -1, "pattern", 
 					 GSF_XML_NO_CONTENT, 
-					 &gog_style_sax_load_fill_pattern, NULL),
+					 &go_style_sax_load_fill_pattern, NULL),
 		GSF_XML_IN_NODE 	(STYLE_FILL, FILL_GRADIENT, 
 					 -1, "gradient", 
 					 GSF_XML_NO_CONTENT, 
-					 &gog_style_sax_load_fill_gradient, NULL),
+					 &go_style_sax_load_fill_gradient, NULL),
 		GSF_XML_IN_NODE 	(STYLE_FILL, FILL_IMAGE, 
 					 -1, "image", 
 					 GSF_XML_NO_CONTENT, 
-					 &gog_style_sax_load_fill_image, NULL),
+					 &go_style_sax_load_fill_image, NULL),
 		GSF_XML_IN_NODE 	(STYLE, STYLE_MARKER,	
 					 -1, "marker", 
 					 GSF_XML_NO_CONTENT, 
-					 &gog_style_sax_load_marker, NULL),
+					 &go_style_sax_load_marker, NULL),
 		GSF_XML_IN_NODE 	(STYLE, STYLE_FONT,
 			 		 -1, "font", 
 					 GSF_XML_NO_CONTENT, 
-					 &gog_style_sax_load_font, NULL),
+					 &go_style_sax_load_font, NULL),
 		GSF_XML_IN_NODE 	(STYLE, STYLE_ALIGNMENT,	
 					 -1, "text_layout", 
 					 GSF_XML_NO_CONTENT, 
-					 &gog_style_sax_load_text_layout, NULL),
+					 &go_style_sax_load_text_layout, NULL),
 		GSF_XML_IN_NODE_END
 	};
 	static GsfXMLInDoc *doc = NULL;
@@ -1870,20 +1873,20 @@
 }
 
 static void
-gog_style_persist_init (GOPersistClass *iface)
+go_style_persist_init (GOPersistClass *iface)
 {
-	iface->dom_load = gog_style_persist_dom_load;
-	iface->prep_sax = gog_style_persist_prep_sax;
-	iface->sax_save = gog_style_persist_sax_save;
+	iface->dom_load = go_style_persist_dom_load;
+	iface->prep_sax = go_style_persist_prep_sax;
+	iface->sax_save = go_style_persist_sax_save;
 }
 
-GSF_CLASS_FULL (GogStyle, gog_style,
-		NULL, NULL, gog_style_class_init, NULL,
-		gog_style_init, G_TYPE_OBJECT, 0,
-		GSF_INTERFACE (gog_style_persist_init, GO_TYPE_PERSIST))
+GSF_CLASS_FULL (GOStyle, go_style,
+		NULL, NULL, go_style_class_init, NULL,
+		go_style_init, G_TYPE_OBJECT, 0,
+		GSF_INTERFACE (go_style_persist_init, GO_TYPE_PERSIST))
 
 gboolean
-gog_style_is_different_size (GogStyle const *a, GogStyle const *b)
+go_style_is_different_size (GOStyle const *a, GOStyle const *b)
 {
 	if (a == NULL || b == NULL)
 		return TRUE;
@@ -1896,19 +1899,19 @@
 }
 
 gboolean
-gog_style_is_marker_visible (GogStyle const *style)
+go_style_is_marker_visible (GOStyle const *style)
 {
-	g_return_val_if_fail (GOG_IS_STYLE (style), FALSE);
+	g_return_val_if_fail (GO_IS_STYLE (style), FALSE);
 
 	/* FIXME FIXME FIXME TODO : make this smarter */
-	return (style->interesting_fields & GOG_STYLE_MARKER) &&
+	return (style->interesting_fields & GO_STYLE_MARKER) &&
 		go_marker_get_shape (style->marker.mark) != GO_MARKER_NONE;
 }
 
 gboolean
-gog_style_is_outline_visible (GogStyle const *style)
+go_style_is_outline_visible (GOStyle const *style)
 {
-	g_return_val_if_fail (GOG_IS_STYLE (style), FALSE);
+	g_return_val_if_fail (GO_IS_STYLE (style), FALSE);
 
 	/* FIXME FIXME FIXME make this smarter */
 	return UINT_RGBA_A (style->outline.color) > 0 && 
@@ -1916,9 +1919,9 @@
 }
 
 gboolean
-gog_style_is_line_visible (GogStyle const *style)
+go_style_is_line_visible (GOStyle const *style)
 {
-	g_return_val_if_fail (GOG_IS_STYLE (style), FALSE);
+	g_return_val_if_fail (GO_IS_STYLE (style), FALSE);
 
 	/* FIXME FIXME FIXME TODO : make this smarter */
 	return UINT_RGBA_A (style->line.color) > 0 && 
@@ -1926,17 +1929,17 @@
 }
 
 gboolean 
-gog_style_is_fill_visible (const GogStyle *style)
+go_style_is_fill_visible (const GOStyle *style)
 {
-	g_return_val_if_fail (GOG_IS_STYLE (style), FALSE);
+	g_return_val_if_fail (GO_IS_STYLE (style), FALSE);
 
-	return (style->fill.type != GOG_FILL_STYLE_NONE);
+	return (style->fill.type != GO_STYLE_FILL_NONE);
 }
 
 void
-gog_style_force_auto (GogStyle *style)
+go_style_force_auto (GOStyle *style)
 {
-	g_return_if_fail (GOG_IS_STYLE (style));
+	g_return_if_fail (GO_IS_STYLE (style));
 
 	if (style->marker.mark != NULL)
 		g_object_unref (G_OBJECT (style->marker.mark));
@@ -1956,16 +1959,16 @@
 }
 
 /**
- * gog_style_set_marker :
- * @style : #GogStyle
+ * go_style_set_marker :
+ * @style : #GOStyle
  * @marker : #GOMarker
  *
  * Absorb a reference to @marker and assign it to @style.
  **/
 void
-gog_style_set_marker (GogStyle *style, GOMarker *marker)
+go_style_set_marker (GOStyle *style, GOMarker *marker)
 {
-	g_return_if_fail (GOG_IS_STYLE (style));
+	g_return_if_fail (GO_IS_STYLE (style));
 	g_return_if_fail (GO_IS_MARKER (marker));
 
 	if (style->marker.mark != marker) {
@@ -1976,27 +1979,27 @@
 }
 
 /**
- * gog_style_get_marker :
- * @style : #GogStyle
+ * go_style_get_marker :
+ * @style : #GOStyle
  *
  * Accessor for @style::marker, without referencing it. 
  *
  * return value: the style #GOMarker.
  **/
 GOMarker const *
-gog_style_get_marker (GogStyle *style) 
+go_style_get_marker (GOStyle *style) 
 {
-	g_return_val_if_fail (GOG_IS_STYLE (style), NULL);
+	g_return_val_if_fail (GO_IS_STYLE (style), NULL);
 
 	return style->marker.mark;
 }
 
 void
-gog_style_set_font_desc (GogStyle *style, PangoFontDescription *desc)
+go_style_set_font_desc (GOStyle *style, PangoFontDescription *desc)
 {
 	GOFont const *font;
 
-	g_return_if_fail (GOG_IS_STYLE (style));
+	g_return_if_fail (GO_IS_STYLE (style));
 
 	font = go_font_new_by_desc (desc);
 	if (font != NULL) {
@@ -2006,9 +2009,9 @@
 }
 
 void
-gog_style_set_font (GogStyle *style, GOFont const *font)
+go_style_set_font (GOStyle *style, GOFont const *font)
 {
-	g_return_if_fail (GOG_IS_STYLE (style));
+	g_return_if_fail (GO_IS_STYLE (style));
 
 	if (font != NULL) {
 		go_font_unref (style->font.font);
@@ -2017,10 +2020,10 @@
 }
 
 void
-gog_style_set_fill_brightness (GogStyle *style, float brightness)
+go_style_set_fill_brightness (GOStyle *style, float brightness)
 {
-	g_return_if_fail (GOG_IS_STYLE (style));
-	g_return_if_fail (style->fill.type == GOG_FILL_STYLE_GRADIENT);
+	g_return_if_fail (GO_IS_STYLE (style));
+	g_return_if_fail (style->fill.type == GO_STYLE_FILL_GRADIENT);
 
 	brightness = CLAMP (brightness, 0, 100.0);
 
@@ -2031,25 +2034,25 @@
 }
 
 /**
- * gog_style_set_text_angle:
- * @style : #GogStyle
+ * go_style_set_text_angle:
+ * @style : #GOStyle
  * @angle : text rotation in degrees
  *
  * Set text rotation angle in degrees. Valid values are in the range
  * [-180.0Â , 180.0Â].
  **/
 void
-gog_style_set_text_angle (GogStyle *style, double angle)
+go_style_set_text_angle (GOStyle *style, double angle)
 {
-	g_return_if_fail (GOG_IS_STYLE (style));
+	g_return_if_fail (GO_IS_STYLE (style));
 
 	style->text_layout.angle = CLAMP (angle, -180.0, 180.0);
 	style->text_layout.auto_angle = FALSE;
 }
 
 /**
- * gog_style_create_cairo_pattern:
- * @style : #GogStyle
+ * go_style_create_cairo_pattern:
+ * @style : #GOStyle
  * @cr: a cairo context
  *
  * Create a cairo_patern_t using the current style settings for filling.
@@ -2059,7 +2062,7 @@
  * return value: the pattern or NULL if it could not be created.
  **/
 cairo_pattern_t *
-gog_style_create_cairo_pattern (GogStyle const *style, cairo_t *cr)
+go_style_create_cairo_pattern (GOStyle const *style, cairo_t *cr)
 {
 	cairo_pattern_t *cr_pattern;
 	cairo_matrix_t cr_matrix;
@@ -2085,9 +2088,9 @@
 		{2, 2, 0, 1}
 	};
 
-	g_return_val_if_fail (GOG_IS_STYLE (style), NULL);
+	g_return_val_if_fail (GO_IS_STYLE (style), NULL);
 
-	if (style->fill.type == GOG_FILL_STYLE_NONE)
+	if (style->fill.type == GO_STYLE_FILL_NONE)
 		return NULL;
 
 	cairo_fill_extents (cr, &x[0], &y[0], &x[1], &y[1]);
@@ -2096,10 +2099,10 @@
 		return NULL;
 
 	switch (style->fill.type) {
-		case GOG_FILL_STYLE_PATTERN:
+		case GO_STYLE_FILL_PATTERN:
 			return go_pattern_create_cairo_pattern (&style->fill.pattern, cr);
 
-		case GOG_FILL_STYLE_GRADIENT:
+		case GO_STYLE_FILL_GRADIENT:
 			x[2] = (x[1] - x[0]) / 2.0 + x[0];
 			y[2] = (y[1] - y[0]) / 2.0 + y[0];
 			cr_pattern = cairo_pattern_create_linear (
@@ -2114,38 +2117,38 @@
 				GO_COLOR_TO_CAIRO (style->fill.pattern.fore));
 			return cr_pattern;
 
-		case GOG_FILL_STYLE_IMAGE:
+		case GO_STYLE_FILL_IMAGE:
 			if (style->fill.image.image == NULL)
 				return cairo_pattern_create_rgba (1, 1, 1, 1);
 
 			cr_pattern = go_image_create_cairo_pattern (style->fill.image.image);
 			if (cr_pattern == NULL) {
 				/* don't reference anymore an invalid image */
-				((GogStyle *) style)->fill.image.image = NULL;
+				((GOStyle *) style)->fill.image.image = NULL;
 				return cairo_pattern_create_rgba (1, 1, 1, 1);
 			}
 			g_object_get (style->fill.image.image, "width", &w, "height", &h, NULL);
 			cairo_pattern_set_extend (cr_pattern, CAIRO_EXTEND_REPEAT);
 			switch (style->fill.image.type) {
-				case GOG_IMAGE_CENTERED:
+				case GO_IMAGE_CENTERED:
 					cairo_matrix_init_translate (&cr_matrix,
 								     -(x[1] - x[0] - w) / 2 - x[0],
 								     -(y[1] - y[0] - h) / 2 - y[0]);
 					cairo_pattern_set_matrix (cr_pattern, &cr_matrix);
 					break;
-				case GOG_IMAGE_STRETCHED:
+				case GO_IMAGE_STRETCHED:
 					cairo_matrix_init_scale (&cr_matrix,
 								 w / (x[1] - x[0]),
 								 h / (y[1] - y[0]));
 					cairo_matrix_translate (&cr_matrix, -x[0], -y[0]);
 					cairo_pattern_set_matrix (cr_pattern, &cr_matrix);
 					break;
-				case GOG_IMAGE_WALLPAPER:
+				case GO_IMAGE_WALLPAPER:
 					break;
 			}
 			return cr_pattern;
 
-		case GOG_FILL_STYLE_NONE:
+		case GO_STYLE_FILL_NONE:
 			return NULL;
 	}
 

Copied: trunk/goffice/utils/go-style.h (from r2366, /trunk/goffice/graph/gog-style.h)
==============================================================================
--- /trunk/goffice/graph/gog-style.h	(original)
+++ trunk/goffice/utils/go-style.h	Fri Apr 10 15:00:10 2009
@@ -1,6 +1,6 @@
 /* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
 /*
- * gog-style.h : 
+ * go-style.h : 
  *
  * Copyright (C) 2003-2004 Jody Goldberg (jody gnome org)
  *
@@ -18,16 +18,13 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
  * USA
  */
-#ifndef GO_GRAPH_STYLE_H
-#define GO_GRAPH_STYLE_H
+#ifndef GO_UTILS_STYLE_H
+#define GO_UTILS_STYLE_H
 
-#include <goffice/graph/gog-object.h>
-#include <goffice/graph/gog-object-xml.h>
-#include <goffice/graph/gog-renderer.h>
-#include <goffice/graph/goffice-graph.h>
 #include <goffice/utils/goffice-utils.h>
 #include <goffice/app/goffice-app.h>
 #include <goffice/utils/go-font.h>
+#include <goffice/utils/go-editor.h>
 #include <goffice/utils/go-gradient.h>
 #include <goffice/utils/go-line.h>
 #include <goffice/utils/go-pattern.h>
@@ -36,36 +33,36 @@
 
 G_BEGIN_DECLS
 
-#define GOG_TYPE_STYLE	(gog_style_get_type ())
-#define GOG_STYLE(o)	(G_TYPE_CHECK_INSTANCE_CAST ((o), GOG_TYPE_STYLE, GogStyle))
-#define GOG_IS_STYLE(o)	(G_TYPE_CHECK_INSTANCE_TYPE ((o), GOG_TYPE_STYLE))
+#define GO_TYPE_STYLE	(go_style_get_type ())
+#define GO_STYLE(o)	(G_TYPE_CHECK_INSTANCE_CAST ((o), GO_TYPE_STYLE, GOStyle))
+#define GO_IS_STYLE(o)	(G_TYPE_CHECK_INSTANCE_TYPE ((o), GO_TYPE_STYLE))
 
-GType gog_style_get_type (void);
+GType go_style_get_type (void);
 
 typedef enum {
-	GOG_STYLE_OUTLINE	= 1 << 0,
-	GOG_STYLE_FILL		= 1 << 1,
-	GOG_STYLE_LINE		= 1 << 2,
-	GOG_STYLE_MARKER	= 1 << 3,
-	GOG_STYLE_FONT		= 1 << 4,
-	GOG_STYLE_TEXT_LAYOUT	= 1 << 5,
-	GOG_STYLE_INTERPOLATION	= 1 << 6,
-	GOG_STYLE_MARKER_NO_COLOR	= 1 << 7,
-	GOG_STYLE_ALL		= 0x1F
-} GogStyleFlag;
+	GO_STYLE_OUTLINE	= 1 << 0,
+	GO_STYLE_FILL		= 1 << 1,
+	GO_STYLE_LINE		= 1 << 2,
+	GO_STYLE_MARKER	= 1 << 3,
+	GO_STYLE_FONT		= 1 << 4,
+	GO_STYLE_TEXT_LAYOUT	= 1 << 5,
+	GO_STYLE_INTERPOLATION	= 1 << 6,
+	GO_STYLE_MARKER_NO_COLOR	= 1 << 7,
+	GO_STYLE_ALL		= 0x1F
+} GOStyleFlag;
 
 typedef enum {
-	GOG_FILL_STYLE_NONE	= 0,
-	GOG_FILL_STYLE_PATTERN	= 1,
-	GOG_FILL_STYLE_GRADIENT	= 2,
-	GOG_FILL_STYLE_IMAGE	= 3
-} GogFillStyle;
+	GO_STYLE_FILL_NONE	= 0,
+	GO_STYLE_FILL_PATTERN	= 1,
+	GO_STYLE_FILL_GRADIENT	= 2,
+	GO_STYLE_FILL_IMAGE	= 3
+} GOStyleFill;
 
 typedef enum {
-	GOG_IMAGE_STRETCHED,
-	GOG_IMAGE_WALLPAPER,
-	GOG_IMAGE_CENTERED
-} GogImageType;
+	GO_IMAGE_STRETCHED,
+	GO_IMAGE_WALLPAPER,
+	GO_IMAGE_CENTERED
+} GOImageType;
 
 typedef struct {
 	/* <0 == no outline,
@@ -78,24 +75,24 @@
 	gboolean 	 auto_color;
 	unsigned	 pattern_unimplemented_yet; /* TODO: implement. Not used
 				and must not be used before implementation */
-} GogStyleLine;
+} GOStyleLine;
 
 typedef struct {
 	GOMarker *mark;
 	gboolean auto_shape;
 	gboolean auto_outline_color;
 	gboolean auto_fill_color;
-} GogStyleMark;
+} GOStyleMark;
 
-struct _GogStyle {
+struct _GOStyle {
 	GObject	base;
 
-	GogStyleFlag	interesting_fields;
-	GogStyleFlag	disable_theming;
+	GOStyleFlag	interesting_fields;
+	GOStyleFlag	disable_theming;
 
-	GogStyleLine	outline, line;
+	GOStyleLine	outline, line;
 	struct {
-		GogFillStyle	type;
+		GOStyleFill	type;
 		gboolean	auto_type;
 		gboolean	auto_fore, auto_back;	/* share between pattern and gradient */
 		gboolean	invert_if_negative;	/* placeholder for XL */
@@ -107,11 +104,11 @@
 			float   brightness; /* < 0 => 2 color */
 		} gradient;
 		struct {
-			GogImageType	 type;
+			GOImageType	 type;
 			GOImage	 *image;
 		} image;
 	} fill;
-	GogStyleMark marker;
+	GOStyleMark marker;
 	struct {
 		GOColor		 color;
 		GOFont const 	*font;
@@ -123,40 +120,40 @@
 	} text_layout;	
 };
 
-GogStyle  *gog_style_new		(void);
-GogStyle  *gog_style_dup		(GogStyle const *style);
-void	   gog_style_assign		(GogStyle *dst, GogStyle const *src);
-void	   gog_style_apply_theme	(GogStyle *dst, GogStyle const *src);
+GOStyle  *go_style_new		(void);
+GOStyle  *go_style_dup		(GOStyle const *style);
+void	   go_style_assign		(GOStyle *dst, GOStyle const *src);
+void	   go_style_apply_theme	(GOStyle *dst, GOStyle const *src);
 
-GOMarker const *gog_style_get_marker 	(GogStyle *style);
-void            gog_style_set_marker 	(GogStyle *style, GOMarker *marker);
+GOMarker const *go_style_get_marker 	(GOStyle *style);
+void            go_style_set_marker 	(GOStyle *style, GOMarker *marker);
 
-void	   gog_style_set_font_desc		(GogStyle *style,
+void	   go_style_set_font_desc		(GOStyle *style,
 						 PangoFontDescription *desc);
-void	   gog_style_set_font			(GogStyle *style, GOFont const *font);
-void	   gog_style_set_fill_brightness	(GogStyle *style, float brightness);
-void	   gog_style_set_text_angle     	(GogStyle *style, double angle);
-
-gboolean   gog_style_is_different_size	(GogStyle const *a, GogStyle const *b);
-gboolean   gog_style_is_marker_visible	(GogStyle const *style);
-gboolean   gog_style_is_line_visible	(GogStyle const *style);
-gboolean   gog_style_is_outline_visible	(GogStyle const *style);
-gboolean   gog_style_is_fill_visible	(GogStyle const *style);
-void	   gog_style_force_auto		(GogStyle *style);
-
-void 	   gog_style_populate_editor 	(GogStyle *style,
-					 GogEditor *editor,
-					 GogStyle *default_style,
+void	   go_style_set_font			(GOStyle *style, GOFont const *font);
+void	   go_style_set_fill_brightness	(GOStyle *style, float brightness);
+void	   go_style_set_text_angle     	(GOStyle *style, double angle);
+
+gboolean   go_style_is_different_size	(GOStyle const *a, GOStyle const *b);
+gboolean   go_style_is_marker_visible	(GOStyle const *style);
+gboolean   go_style_is_line_visible	(GOStyle const *style);
+gboolean   go_style_is_outline_visible	(GOStyle const *style);
+gboolean   go_style_is_fill_visible	(GOStyle const *style);
+void	   go_style_force_auto		(GOStyle *style);
+
+void 	   go_style_populate_editor 	(GOStyle *style,
+					 GOEditor *editor,
+					 GOStyle *default_style,
 					 GOCmdContext *cc,
 					 GObject *object_with_style,
 					 gboolean watch_for_external_change);
-gpointer   gog_style_get_editor	     	(GogStyle *style,
-					 GogStyle *default_style,
+gpointer   go_style_get_editor	     	(GOStyle *style,
+					 GOStyle *default_style,
 					 GOCmdContext *cc,
 					 GObject *object_with_style);
 
-cairo_pattern_t *gog_style_create_cairo_pattern (GogStyle const *style, cairo_t *cr);
+cairo_pattern_t *go_style_create_cairo_pattern (GOStyle const *style, cairo_t *cr);
 
 G_END_DECLS
 
-#endif /* GO_GRAPH_STYLE_H */
+#endif /* GO_UTILS_STYLE_H */

Added: trunk/goffice/utils/go-styled-object.c
==============================================================================
--- (empty file)
+++ trunk/goffice/utils/go-styled-object.c	Fri Apr 10 15:00:10 2009
@@ -0,0 +1,141 @@
+/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * go-styled-object.c :  
+ *
+ * Copyright (C) 2009 JJean Brefort (jean brefort normalesup org)
+ *
+ * This program is free software; you can redistribute it and/or 
+ * modify it under the terms of the GNU General Public License as 
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
+ * USA
+ */
+
+#include <goffice/goffice-config.h>
+#include <goffice/utils/go-styled-object.h>
+
+GType
+go_styled_object_get_type (void)
+{
+	static GType go_styled_object_type = 0;
+
+	if (!go_styled_object_type) {
+		static GTypeInfo const go_styled_object_info = {
+			sizeof (GOStyledObjectClass),	/* class_size */
+			NULL,		/* base_init */
+			NULL,		/* base_finalize */
+		};
+
+		go_styled_object_type = g_type_register_static (G_TYPE_INTERFACE,
+			"GOStyledObject", &go_styled_object_info, 0);
+	}
+
+	return go_styled_object_type;
+}
+
+/**
+ * go_styled_object_set_style:
+ * @gso: a #GOStyledObject
+ * @style: a #GOStyle
+ *
+ * Sets a new style for @gso, and emits "style-changed" signal. This function
+ * does not take ownership of @style.
+ *
+ * return value: %TRUE if new style may lead to change of object size, which
+ * happens when changing font size for example. 
+ **/
+gboolean
+go_styled_object_set_style (GOStyledObject *gso, GOStyle *style)
+{
+	GOStyledObjectClass *klass = GO_STYLED_OBJECT_GET_CLASS (gso);
+	g_return_val_if_fail (klass != NULL, FALSE);
+	return (klass->set_style)?
+		klass->set_style (gso, style): FALSE;
+}
+
+/**
+ * go_styled_object_get_style:
+ * @gso: a #GOStyledObject
+ *
+ * Simply an accessor function that returns @gso->style, without referencing it.
+ * 
+ * return value: the styled object's #GOStyle
+ **/
+GOStyle*
+go_styled_object_get_style(GOStyledObject *gso)
+{
+	GOStyledObjectClass *klass = GO_STYLED_OBJECT_GET_CLASS (gso);
+	g_return_val_if_fail (klass != NULL, NULL);
+	return (klass->get_style)?
+		klass->get_style (gso): NULL;
+}
+
+/**
+ * go_styled_object_get_auto_style:
+ * @gso: a #GOStyledObject
+ *
+ * This function returns a new style that is initialized with the auto values for @gso.
+ * Caller is responsible for the result.
+ *
+ * return value: a new #GOStyle
+ **/
+GOStyle*
+go_styled_object_get_auto_style (GOStyledObject *gso)
+{
+	GOStyledObjectClass *klass = GO_STYLED_OBJECT_GET_CLASS (gso);
+	g_return_val_if_fail (klass != NULL, NULL);
+	return (klass->get_auto_style)?
+		klass->get_auto_style (gso): NULL;
+}
+
+/**
+ * go_styled_object_style_changed:
+ * @gso: a #GOStyledObject
+ *
+ * Called when the style changed. Might emit a signal if meaningful.
+ *
+ **/
+void
+go_styled_object_style_changed (GOStyledObject *gso)
+{
+	GOStyledObjectClass *klass = GO_STYLED_OBJECT_GET_CLASS (gso);
+	g_return_if_fail (klass != NULL);
+	if (klass->style_changed)
+		klass->style_changed (gso);
+}
+
+/**
+ * go_styled_object_apply_theme:
+ * @gso: a #GOStyledObject
+ * @style: a #GOStyle that will be themed
+ *
+ * Apply appropriate theme @style if meaningful, i.e. properties with 
+ * auto flag set to %TRUE should be changed to default theme value.
+ *
+ **/
+void
+go_styled_object_apply_theme (GOStyledObject *gso, GOStyle *style)
+{
+	GOStyledObjectClass *klass = GO_STYLED_OBJECT_GET_CLASS (gso);
+	g_return_if_fail (klass != NULL);
+	if (klass->apply_theme)
+		klass->apply_theme (gso, style);
+}
+
+GODoc*
+go_styled_object_get_document (GOStyledObject *gso)
+{
+	GOStyledObjectClass *klass = GO_STYLED_OBJECT_GET_CLASS (gso);
+	g_return_val_if_fail (klass != NULL, NULL);
+	return (klass->get_document)?
+		klass->get_document (gso): NULL;
+}

Added: trunk/goffice/utils/go-styled-object.h
==============================================================================
--- (empty file)
+++ trunk/goffice/utils/go-styled-object.h	Fri Apr 10 15:00:10 2009
@@ -0,0 +1,61 @@
+/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * go-styled-object.h :  
+ *
+ * Copyright (C) 2009 JJean Brefort (jean brefort normalesup org)
+ *
+ * This program is free software; you can redistribute it and/or 
+ * modify it under the terms of the GNU General Public License as 
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
+ * USA
+ */
+
+#ifndef GO_STYLED_OBJECT_H
+#define GO_STYLED_OBJECT_H
+
+#include <glib-object.h>
+#include <goffice/app/go-doc.h>
+
+G_BEGIN_DECLS
+
+typedef struct {
+	GTypeInterface		   base;
+
+	gboolean  (*set_style) 	    (GOStyledObject *gso, GOStyle *style);
+	GOStyle	 *(*get_style)	    (GOStyledObject *gso);
+	GOStyle	 *(*get_auto_style) (GOStyledObject *gso);
+	void	  (*style_changed)  (GOStyledObject *gso);
+	void	  (*apply_theme)	(GOStyledObject *gso, GOStyle *style);
+	GODoc    *(*get_document)   (GOStyledObject *gso);
+} GOStyledObjectClass;
+
+#define GO_TYPE_STYLED_OBJECT		(go_styled_object_get_type ())
+#define GO_STYLED_OBJECT(o)			(G_TYPE_CHECK_INSTANCE_CAST ((o), GO_TYPE_STYLED_OBJECT, GOStyledObject))
+#define GO_IS_STYLED_OBJECT(o)		(G_TYPE_CHECK_INSTANCE_TYPE ((o), GO_TYPE_STYLED_OBJECT))
+#define GO_STYLED_OBJECT_CLASS(k)		(G_TYPE_CHECK_CLASS_CAST ((k), GO_TYPE_STYLED_OBJECT, GOStyledObjectClass))
+#define GO_IS_STYLED_OBJECT_CLASS(k)		(G_TYPE_CHECK_CLASS_TYPE ((k), GO_TYPE_STYLED_OBJECT))
+#define GO_STYLED_OBJECT_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_INTERFACE ((o), GO_TYPE_STYLED_OBJECT, GOStyledObjectClass))
+
+GType go_styled_object_get_type (void);
+
+gboolean  go_styled_object_set_style 	   (GOStyledObject *gso, GOStyle *style);
+GOStyle	 *go_styled_object_get_style	   (GOStyledObject *gso);
+GOStyle	 *go_styled_object_get_auto_style  (GOStyledObject *gso);
+void	  go_styled_object_style_changed   (GOStyledObject *gso);
+void	  go_styled_object_apply_theme	   (GOStyledObject *gso, GOStyle *style);
+GODoc	 *go_styled_object_get_document	   (GOStyledObject *gso);
+G_END_DECLS
+
+#endif
+
+

Modified: trunk/goffice/utils/goffice-utils.h
==============================================================================
--- trunk/goffice/utils/goffice-utils.h	(original)
+++ trunk/goffice/utils/goffice-utils.h	Fri Apr 10 15:00:10 2009
@@ -26,14 +26,16 @@
 
 G_BEGIN_DECLS
 
-typedef guint32				GOColor;
+typedef guint32					GOColor;
 typedef struct _GOFont			GOFont;
-typedef struct _GOFontMetrics		GOFontMetrics;
+typedef struct _GOFontMetrics	GOFontMetrics;
 typedef struct _GOPattern		GOPattern;
 typedef struct _GOMarker		GOMarker;
 typedef struct _GOFormat		GOFormat;
 typedef struct _GODateConventions	GODateConventions;
-typedef struct _GOImage		GOImage;
+typedef struct _GOImage			GOImage;
+typedef struct _GOStyle			GOStyle;
+typedef struct _GOStyledObject	GOStyledObject;
 
 /* rename this */
 typedef struct _GOMemChunk		GOMemChunk;

Modified: trunk/plugins/plot_barcol/gog-1.5d.c
==============================================================================
--- trunk/plugins/plot_barcol/gog-1.5d.c	(original)
+++ trunk/plugins/plot_barcol/gog-1.5d.c	Fri Apr 10 15:00:10 2009
@@ -31,7 +31,7 @@
 #include <goffice/graph/gog-view.h>
 #include <goffice/graph/gog-renderer.h>
 #include <goffice/graph/gog-axis.h>
-#include <goffice/graph/gog-style.h>
+#include <goffice/utils/go-style.h>
 #include <goffice/data/go-data.h>
 #include <goffice/math/go-math.h>
 #include <goffice/utils/go-color.h>
@@ -559,7 +559,7 @@
 #include <gtk/gtk.h>
 static void 
 gog_series1_5d_populate_editor (GogObject *obj,
-				GogEditor *editor,
+				GOEditor *editor,
 				GogDataAllocator *dalloc,
 				GOCmdContext *cc)
 {
@@ -577,7 +577,7 @@
 	else
 		g_object_get (G_OBJECT (series->plot), "horizontal", &horizontal, NULL);
 	error_page = gog_error_bar_prefs (series, "errors", horizontal, dalloc, cc);
-	gog_editor_add_page (editor, error_page, _("Error bars"));
+	go_editor_add_page (editor, error_page, _("Error bars"));
 }
 #endif
 

Modified: trunk/plugins/plot_barcol/gog-barcol.c
==============================================================================
--- trunk/plugins/plot_barcol/gog-barcol.c	(original)
+++ trunk/plugins/plot_barcol/gog-barcol.c	Fri Apr 10 15:00:10 2009
@@ -26,12 +26,13 @@
 #include <goffice/graph/gog-chart-map.h>
 #include <goffice/graph/gog-renderer.h>
 #include <goffice/graph/gog-series-lines.h>
-#include <goffice/graph/gog-style.h>
 #include <goffice/graph/gog-view.h>
 #include <goffice/data/go-data.h>
 #include <goffice/math/go-math.h>
 #include <goffice/utils/go-color.h>
 #include <goffice/utils/go-persist.h>
+#include <goffice/utils/go-style.h>
+#include <goffice/utils/go-styled-object.h>
 
 #include <glib/gi18n-lib.h>
 #include <gsf/gsf-impl-utils.h>
@@ -140,11 +141,11 @@
 extern gpointer gog_barcol_plot_pref (GogBarColPlot *barcol, GOCmdContext *cc);
 static void
 gog_barcol_plot_populate_editor (GogObject *item,
-				 GogEditor *editor,
+				 GOEditor *editor,
 			G_GNUC_UNUSED GogDataAllocator *dalloc,
 			GOCmdContext *cc)
 {
-	gog_editor_add_page (editor,
+	go_editor_add_page (editor,
 			     gog_barcol_plot_pref (GOG_BARCOL_PLOT (item), cc),
 			     _("Properties"));
 	(GOG_OBJECT_CLASS(gog_barcol_parent_klass)->populate_editor) (item, editor, dalloc, cc);
@@ -259,7 +260,7 @@
 	gog_object_klass->populate_editor	= gog_barcol_plot_populate_editor;
 	gog_object_klass->view_type	= gog_barcol_view_get_type ();
 
-	plot_klass->desc.series.style_fields	= GOG_STYLE_OUTLINE | GOG_STYLE_FILL;
+	plot_klass->desc.series.style_fields	= GO_STYLE_OUTLINE | GO_STYLE_FILL;
 	plot_klass->series_type = gog_barcol_series_get_type ();
 	plot_klass->axis_get_bounds   		= gog_barcol_axis_get_bounds;
 
@@ -368,7 +369,7 @@
 	unsigned num_elements = gog_1_5d_model->num_elements;
 	unsigned num_series = gog_1_5d_model->num_series;
 	GogPlot1_5dType const type = gog_1_5d_model->type;
-	GogStyle **styles;
+	GOStyle **styles;
 	ErrorBarData **error_data;
 	GogErrorBar **errors;
 	GogSeriesLines **lines;
@@ -400,7 +401,7 @@
 
 	vals = g_alloca (num_series * sizeof (double *));
 	lengths = g_alloca (num_series * sizeof (unsigned));
-	styles = g_alloca (num_series * sizeof (GogStyle *));
+	styles = g_alloca (num_series * sizeof (GOStyle *));
 	errors = g_alloca (num_series * sizeof (GogErrorBar *));
 	error_data = g_alloca (num_series * sizeof (ErrorBarData *));
 	lines = g_alloca (num_series * sizeof (GogSeriesLines *));
@@ -495,8 +496,8 @@
 					gse = GOG_SERIES_ELEMENT (overrides[j]->data);
 					overrides[j] = overrides[j]->next;
 					gog_renderer_push_style (view->renderer,
-						gog_styled_object_get_style (
-							GOG_STYLED_OBJECT (gse)));
+						go_styled_object_get_style (
+							GO_STYLED_OBJECT (gse)));
 			} else
 				gog_renderer_push_style (view->renderer, styles[j]);
 			barcol_draw_rect (rend, is_vertical, x_map, y_map, &work);

Modified: trunk/plugins/plot_barcol/gog-dropbar.c
==============================================================================
--- trunk/plugins/plot_barcol/gog-dropbar.c	(original)
+++ trunk/plugins/plot_barcol/gog-dropbar.c	Fri Apr 10 15:00:10 2009
@@ -26,6 +26,7 @@
 #include <goffice/graph/gog-view.h>
 #include <goffice/graph/gog-renderer.h>
 #include <goffice/math/go-math.h>
+#include <goffice/utils/go-styled-object.h>
 
 #include <glib/gi18n-lib.h>
 #include <gsf/gsf-impl-utils.h>
@@ -177,7 +178,7 @@
 	unsigned num_series = gog_1_5d_model->num_series;
 	GSList *ptr;
 	unsigned n, tmp;
-	GogStyle *neg_style;
+	GOStyle *neg_style;
 	GOPath **path1, **path2;
 	GogObjectRole const *role = NULL;
 	GogSeriesLines **lines;
@@ -216,7 +217,7 @@
 		if (!gog_series_is_valid (GOG_SERIES (series)))
 			continue;
 		prec_valid = FALSE;
-		neg_style = gog_style_dup ((GOG_STYLED_OBJECT (series))->style);
+		neg_style = go_style_dup ((GOG_STYLED_OBJECT (series))->style);
 		neg_style->outline.color ^= 0xffffff00;
 		neg_style->fill.pattern.back ^= 0xffffff00;
 		neg_style->fill.pattern.fore ^= 0xffffff00;
@@ -299,7 +300,7 @@
 	for (j = 0; j < num_series; j++)
 		if (path1[j] != NULL) {
 			gog_renderer_push_style (view->renderer,
-				gog_styled_object_get_style (GOG_STYLED_OBJECT (lines[j])));
+				go_styled_object_get_style (GO_STYLED_OBJECT (lines[j])));
 			gog_series_lines_stroke (lines[j], view->renderer, bbox, path1[j], TRUE);
 			gog_series_lines_stroke (lines[j], view->renderer, bbox, path2[j], FALSE);
 			gog_renderer_pop_style (view->renderer);

Modified: trunk/plugins/plot_barcol/gog-line.c
==============================================================================
--- trunk/plugins/plot_barcol/gog-line.c	(original)
+++ trunk/plugins/plot_barcol/gog-line.c	Fri Apr 10 15:00:10 2009
@@ -26,7 +26,6 @@
 #include <goffice/graph/gog-view.h>
 #include <goffice/graph/gog-chart-map.h>
 #include <goffice/graph/gog-renderer.h>
-#include <goffice/graph/gog-style.h>
 #include <goffice/graph/gog-axis.h>
 #include <goffice/graph/gog-theme.h>
 #include <goffice/data/go-data.h>
@@ -34,6 +33,8 @@
 #include <goffice/utils/go-color.h>
 #include <goffice/utils/go-marker.h>
 #include <goffice/utils/go-persist.h>
+#include <goffice/utils/go-style.h>
+#include <goffice/utils/go-styled-object.h>
 
 #include <glib/gi18n-lib.h>
 #include <gsf/gsf-impl-utils.h>
@@ -61,13 +62,13 @@
 GType gog_line_series_element_get_type (void);
 
 static void
-gog_line_series_element_init_style (GogStyledObject *gso, GogStyle *style)
+gog_line_series_element_init_style (GogStyledObject *gso, GOStyle *style)
 {
 	GogSeries const *series = GOG_SERIES (GOG_OBJECT (gso)->parent);
 
 	g_return_if_fail (series != NULL);
 
-	style->interesting_fields = GOG_STYLE_MARKER;
+	style->interesting_fields = GO_STYLE_MARKER;
 	gog_theme_fillin_style (gog_object_get_theme (GOG_OBJECT (gso)),
 		style, GOG_OBJECT (gso), GOG_SERIES_ELEMENT (gso)->index, FALSE);
 }
@@ -138,7 +139,7 @@
 #define GOG_IS_LINE_SERIES(o)	(G_TYPE_CHECK_INSTANCE_TYPE ((o), GOG_TYPE_LINE_SERIES))
 
 static void
-gog_line_series_init_style (GogStyledObject *gso, GogStyle *style)
+gog_line_series_init_style (GogStyledObject *gso, GOStyle *style)
 {
 	GogSeries *series = GOG_SERIES (gso);
 	GogLinePlot const *plot;
@@ -150,11 +151,11 @@
 	plot = GOG_LINE_PLOT (series->plot);
 
 	if (!plot->default_style_has_markers) {
-		style->disable_theming |= GOG_STYLE_MARKER;
+		style->disable_theming |= GO_STYLE_MARKER;
 		if (style->marker.auto_shape) {
 			GOMarker *m = go_marker_new ();
 			go_marker_set_shape (m, GO_MARKER_NONE);
-			gog_style_set_marker (style, m);
+			go_style_set_marker (style, m);
 		}
 	}
 }
@@ -330,7 +331,7 @@
 	gog_klass->type_name	= gog_line_plot_type_name;
 	gog_klass->view_type	= gog_line_view_get_type ();
 
-	plot_klass->desc.series.style_fields = GOG_STYLE_LINE | GOG_STYLE_MARKER;
+	plot_klass->desc.series.style_fields = GO_STYLE_LINE | GO_STYLE_MARKER;
 	plot_klass->series_type = gog_line_series_get_type ();
 
 	gog_plot_1_5d_klass->update_stacked_and_percentage =
@@ -367,7 +368,7 @@
 {
 	GogPlotClass *plot_klass = (GogPlotClass *) gog_klass;
 
-	plot_klass->desc.series.style_fields = GOG_STYLE_OUTLINE | GOG_STYLE_FILL;
+	plot_klass->desc.series.style_fields = GO_STYLE_OUTLINE | GO_STYLE_FILL;
 	plot_klass->series_type = gog_series1_5d_get_type ();
 
 	gog_klass->type_name	= gog_area_plot_type_name;
@@ -418,7 +419,7 @@
 
 	double **vals;
 	ErrorBarData **error_data;
-	GogStyle **styles;
+	GOStyle **styles;
 	unsigned *lengths;
 	GOPath **paths;
 	GOPath **drop_paths;
@@ -468,7 +469,7 @@
 	vals    = g_alloca (num_series * sizeof (double *));
 	error_data = g_alloca (num_series * sizeof (ErrorBarData *));
 	lengths = g_alloca (num_series * sizeof (unsigned));
-	styles  = g_alloca (num_series * sizeof (GogStyle *));
+	styles  = g_alloca (num_series * sizeof (GOStyle *));
 	paths	= g_alloca (num_series * sizeof (GOPath *));
 	if (!is_area_plot)
 		points  = g_alloca (num_series * sizeof (Point *));
@@ -668,7 +669,7 @@
 	for (i = 0; i < num_series; i++)
 		if (lines[i] != NULL) {
 			gog_renderer_push_style (view->renderer,
-				gog_styled_object_get_style (GOG_STYLED_OBJECT (lines[i])));
+				go_styled_object_get_style (GO_STYLED_OBJECT (lines[i])));
 			gog_series_lines_stroke (lines[i], view->renderer, bbox, drop_paths[i], FALSE);
 			gog_renderer_pop_style (view->renderer);
 			go_path_free (drop_paths[i]);
@@ -714,8 +715,8 @@
 						gse = GOG_SERIES_ELEMENT (overrides->data);
 						overrides = overrides->next;
 						gog_renderer_push_style (view->renderer,
-							gog_styled_object_get_style (
-								GOG_STYLED_OBJECT (gse)));
+							go_styled_object_get_style (
+								GO_STYLED_OBJECT (gse)));
 				}
 				if (x_margin_min <= x && x <= x_margin_max &&
 				    y_margin_min <= y && y <= y_margin_max) 

Modified: trunk/plugins/plot_barcol/gog-minmax.c
==============================================================================
--- trunk/plugins/plot_barcol/gog-minmax.c	(original)
+++ trunk/plugins/plot_barcol/gog-minmax.c	Fri Apr 10 15:00:10 2009
@@ -28,6 +28,7 @@
 #include <goffice/utils/go-marker.h>
 #include <goffice/utils/go-path.h>
 #include <goffice/utils/go-persist.h>
+#include <goffice/utils/go-styled-object.h>
 #include <goffice/app/go-plugin.h>
 
 #include <glib/gi18n-lib.h>
@@ -54,7 +55,7 @@
 static GogStyledObjectClass *series_parent_klass;
 
 static void
-gog_minmax_series_init_style (GogStyledObject *gso, GogStyle *style)
+gog_minmax_series_init_style (GogStyledObject *gso, GOStyle *style)
 {
 	GogSeries *series = GOG_SERIES (gso);
 	GogMinMaxPlot const *plot;
@@ -65,11 +66,11 @@
 
 	plot = GOG_MINMAX_PLOT (series->plot);
 	if (!plot->default_style_has_markers) {
-		style->disable_theming |= GOG_STYLE_MARKER;
+		style->disable_theming |= GO_STYLE_MARKER;
 		if (style->marker.auto_shape) {
 			GOMarker *m = go_marker_new ();
 			go_marker_set_shape (m, GO_MARKER_NONE);
-			gog_style_set_marker (style, m);
+			go_style_set_marker (style, m);
 		}
 	}
 }
@@ -171,7 +172,7 @@
 
 static void
 gog_minmax_plot_populate_editor (GogObject *item,
-				 GogEditor *editor,
+				 GOEditor *editor,
 				 G_GNUC_UNUSED GogDataAllocator *dalloc,
 				 GOCmdContext *cc)
 {
@@ -196,7 +197,7 @@
 	g_object_set_data_full (G_OBJECT (w),
 		"state", gui, (GDestroyNotify)g_object_unref);
 
-	gog_editor_add_page (editor, w, _("Properties"));
+	go_editor_add_page (editor, w, _("Properties"));
 	(GOG_OBJECT_CLASS(gog_minmax_parent_klass)->populate_editor) (item, editor, dalloc, cc);
 }
 #endif
@@ -255,7 +256,7 @@
 		plot_klass->desc.series.dim = dimensions;
 		plot_klass->desc.series.num_dim = G_N_ELEMENTS (dimensions);
 	}
-	plot_klass->desc.series.style_fields = GOG_STYLE_LINE | GOG_STYLE_MARKER;
+	plot_klass->desc.series.style_fields = GO_STYLE_LINE | GO_STYLE_MARKER;
 	plot_klass->axis_get_bounds   		= gog_minmax_axis_get_bounds;
 	plot_klass->series_type = gog_minmax_series_get_type ();
 
@@ -319,7 +320,7 @@
 	GOPath *path, *Mpath, *mpath;
 	GogObjectRole const *role = NULL;
 	GogSeriesLines *lines;
-	GogStyle * style;
+	GOStyle * style;
 	gboolean prec_valid;
 
 	if (num_elements <= 0 || num_series <= 0)
@@ -347,7 +348,7 @@
 		series = ptr->data;
 		if (!gog_series_is_valid (GOG_SERIES (series)))
 			continue;
-		style = gog_styled_object_get_style (GOG_STYLED_OBJECT (series));
+		style = go_styled_object_get_style (GO_STYLED_OBJECT (series));
 		x = offset;
 		min_vals = go_data_vector_get_values (
 			GO_DATA_VECTOR (series->base.values[1].data));
@@ -420,12 +421,12 @@
 			lines = GOG_SERIES_LINES (
 					gog_object_get_child_by_role (GOG_OBJECT (series), role));
 			gog_renderer_push_style (view->renderer,
-				gog_styled_object_get_style (GOG_STYLED_OBJECT (lines)));
+				go_styled_object_get_style (GO_STYLED_OBJECT (lines)));
 			gog_series_lines_stroke (lines, view->renderer, bbox, mpath, TRUE);
 			gog_series_lines_stroke (lines, view->renderer, bbox, Mpath, FALSE);
 			gog_renderer_pop_style (view->renderer);
 		}
-		if (gog_style_is_marker_visible (style))
+		if (go_style_is_marker_visible (style))
 			for (i = 0; i < j; i++) {
 				go_path_interpret (mpath, GO_PATH_DIRECTION_FORWARD,
 						   path_move_to,

Modified: trunk/plugins/plot_distrib/gog-boxplot.c
==============================================================================
--- trunk/plugins/plot_distrib/gog-boxplot.c	(original)
+++ trunk/plugins/plot_distrib/gog-boxplot.c	Fri Apr 10 15:00:10 2009
@@ -25,7 +25,7 @@
 #include <goffice/graph/gog-series-impl.h>
 #include <goffice/graph/gog-view.h>
 #include <goffice/graph/gog-renderer.h>
-#include <goffice/graph/gog-style.h>
+#include <goffice/utils/go-style.h>
 #include <goffice/graph/gog-axis.h>
 #include <goffice/graph/gog-chart.h>
 #include <goffice/graph/gog-chart-map.h>
@@ -154,11 +154,11 @@
 
 static void
 gog_box_plot_populate_editor (GogObject *item,
-			      GogEditor *editor,
+			      GOEditor *editor,
 			      G_GNUC_UNUSED GogDataAllocator *dalloc,
 			      GOCmdContext *cc)
 {
-	gog_editor_add_page (editor, gog_box_plot_pref (item, dalloc, cc), _("Properties"));
+	go_editor_add_page (editor, gog_box_plot_pref (item, dalloc, cc), _("Properties"));
 	
 	(GOG_OBJECT_CLASS(gog_box_plot_parent_klass)->populate_editor) (item, editor, dalloc, cc);
 }
@@ -397,7 +397,7 @@
 	plot_klass->desc.num_series_max = G_MAXINT;
 	plot_klass->series_type = gog_box_plot_series_get_type ();
 	plot_klass->axis_set = GOG_AXIS_SET_XY;
-	plot_klass->desc.series.style_fields	= GOG_STYLE_LINE | GOG_STYLE_FILL;
+	plot_klass->desc.series.style_fields	= GO_STYLE_LINE | GO_STYLE_FILL;
 	plot_klass->axis_get_bounds   		= gog_box_plot_axis_get_bounds;
 }
 
@@ -429,7 +429,7 @@
 	double min, qu1, med, qu3, max;
 	GOPath *path;
 	GSList *ptr;
-	GogStyle *style;
+	GOStyle *style;
 	int num_ser = 1;
 
 	area = gog_chart_view_get_plot_area (view->parent);
@@ -467,7 +467,7 @@
 		if (!gog_series_is_valid (GOG_SERIES (series)) ||
 			!go_data_vector_get_len (GO_DATA_VECTOR (series->base.values[0].data)))
 			continue;
-		style = gog_style_dup (GOG_STYLED_OBJECT (series)->style);
+		style = go_style_dup (GOG_STYLED_OBJECT (series)->style);
 		y = gog_axis_map_to_view (ser_map, num_ser);
 		gog_renderer_push_style (view->renderer, style);
 		if (model->outliers) {
@@ -626,7 +626,7 @@
 }
 
 static void
-gog_box_plot_series_init_style (GogStyledObject *gso, GogStyle *style)
+gog_box_plot_series_init_style (GogStyledObject *gso, GOStyle *style)
 {
 	((GogStyledObjectClass*) gog_box_plot_series_parent_klass)->init_style (gso, style);
 

Modified: trunk/plugins/plot_distrib/gog-histogram.c
==============================================================================
--- trunk/plugins/plot_distrib/gog-histogram.c	(original)
+++ trunk/plugins/plot_distrib/gog-histogram.c	Fri Apr 10 15:00:10 2009
@@ -30,6 +30,7 @@
 #include <goffice/math/go-math.h>
 #include <goffice/utils/go-format.h>
 #include <goffice/utils/go-path.h>
+#include <goffice/utils/go-styled-object.h>
 #include <glib/gi18n-lib.h>
 #include <gsf/gsf-impl-utils.h>
 
@@ -193,7 +194,7 @@
 	plot_klass->desc.num_series_max = 1;
 	plot_klass->series_type = gog_histogram_plot_series_get_type ();
 	plot_klass->axis_set = GOG_AXIS_SET_XY;
-	plot_klass->desc.series.style_fields	= GOG_STYLE_OUTLINE | GOG_STYLE_FILL;
+	plot_klass->desc.series.style_fields	= GO_STYLE_OUTLINE | GO_STYLE_FILL;
 	plot_klass->axis_get_bounds   		= gog_histogram_plot_axis_get_bounds;
 }
 
@@ -226,7 +227,7 @@
 	unsigned i, j, nb;
 	GOPath *path ;
 	GSList *ptr;
-	GogStyle *style;
+	GOStyle *style;
 
 	if (model->base.series == NULL)
 		return;
@@ -272,7 +273,7 @@
 		GOPath *drop_path = go_path_new ();
 		go_path_set_options (drop_path, GO_PATH_OPTIONS_SHARP);
 		gog_renderer_push_style (view->renderer,
-			gog_styled_object_get_style (GOG_STYLED_OBJECT (series->droplines)));
+			go_styled_object_get_style (GO_STYLED_OBJECT (series->droplines)));
 		cury = y0;
 		for (i = 1; i < series->base.num_elements; i++) {
 			curx = gog_axis_map_to_view (x_map, ((x_vals)? x_vals[i]: 0.));
@@ -482,9 +483,8 @@
 			NULL },
 	};
 	GogSeriesClass *series_klass = (GogSeriesClass*) obj_klass;
-	GogStyledObjectClass *gso_klass = (GogStyledObjectClass*) obj_klass;
-	GogObjectClass *gog_klass = (GogObjectClass *)gso_klass;
-	GObjectClass *gobject_klass = (GObjectClass *) gso_klass;
+	GogObjectClass *gog_klass = (GogObjectClass *)obj_klass;
+	GObjectClass *gobject_klass = (GObjectClass *) obj_klass;
 
 	series_parent_klass = g_type_class_peek_parent (obj_klass);
 	gobject_klass->finalize		= gog_histogram_plot_series_finalize;

Modified: trunk/plugins/plot_distrib/gog-probability-plot.c
==============================================================================
--- trunk/plugins/plot_distrib/gog-probability-plot.c	(original)
+++ trunk/plugins/plot_distrib/gog-probability-plot.c	Fri Apr 10 15:00:10 2009
@@ -55,11 +55,11 @@
 #ifdef GOFFICE_WITH_GTK
 static void
 gog_probability_plot_populate_editor (GogObject *item,
-			      GogEditor *editor,
+			      GOEditor *editor,
 			      GogDataAllocator *dalloc,
 			      GOCmdContext *cc)
 {
-	gog_editor_add_page (editor, go_distribution_pref_new (G_OBJECT (item), dalloc, cc), _("Distribution"));
+	go_editor_add_page (editor, go_distribution_pref_new (G_OBJECT (item), dalloc, cc), _("Distribution"));
 	
 	(GOG_OBJECT_CLASS(probability_plot_parent_klass)->populate_editor) (item, editor, dalloc, cc);
 }
@@ -267,7 +267,7 @@
 	plot_klass->desc.num_series_max = 1;
 	plot_klass->series_type = gog_probability_plot_series_get_type ();
 	plot_klass->axis_set = GOG_AXIS_SET_XY;
-	plot_klass->desc.series.style_fields	= GOG_STYLE_MARKER;
+	plot_klass->desc.series.style_fields	= GO_STYLE_MARKER;
 	plot_klass->axis_get_bounds   		= gog_probability_plot_axis_get_bounds;
 #ifdef GOFFICE_WITH_GTK
 	gog_object_klass->populate_editor = gog_probability_plot_populate_editor;
@@ -358,7 +358,7 @@
 	GogViewAllocation const *area;
 	GogProbabilityPlotSeries const *series;
 	unsigned i, nb;
-	GogStyle *style;
+	GOStyle *style;
 
 	if (model->base.series == NULL)
 		return;
@@ -466,8 +466,7 @@
 static void
 gog_probability_plot_series_class_init (GogObjectClass *obj_klass)
 {
-	GogStyledObjectClass *gso_klass = (GogStyledObjectClass*) obj_klass;
-	GObjectClass *gobject_klass = (GObjectClass *) gso_klass;
+	GObjectClass *gobject_klass = (GObjectClass *) obj_klass;
 
 	series_parent_klass = g_type_class_peek_parent (obj_klass);
 	gobject_klass->finalize		= gog_probability_plot_series_finalize;

Modified: trunk/plugins/plot_pie/gog-pie.c
==============================================================================
--- trunk/plugins/plot_pie/gog-pie.c	(original)
+++ trunk/plugins/plot_pie/gog-pie.c	Fri Apr 10 15:00:10 2009
@@ -24,11 +24,12 @@
 #include <goffice/graph/gog-view.h>
 #include <goffice/graph/gog-renderer.h>
 #include <goffice/graph/gog-theme.h>
-#include <goffice/graph/gog-style.h>
 #include <goffice/data/go-data.h>
 #include <goffice/math/go-math.h>
 #include <goffice/utils/go-color.h>
 #include <goffice/utils/go-persist.h>
+#include <goffice/utils/go-style.h>
+#include <goffice/utils/go-styled-object.h>
 #include <goffice/app/module-plugin-defs.h>
 
 #include <glib/gi18n-lib.h>
@@ -80,11 +81,11 @@
 extern gpointer gog_pie_series_element_pref (GogPieSeriesElement *element, GOCmdContext *cc);
 static gpointer
 gog_pie_series_element_populate_editor (GogObject *gobj,
-					GogEditor *editor,
+					GOEditor *editor,
 					GOCmdContext *cc)
 {
 	GtkWidget *widget = gog_pie_series_element_pref (GOG_PIE_SERIES_ELEMENT (gobj), cc);
-	gog_editor_add_page (editor, widget, _("Settings"));
+	go_editor_add_page (editor, widget, _("Settings"));
 	return widget;
 }
 #endif
@@ -197,11 +198,11 @@
 extern gpointer gog_pie_plot_pref (GogPiePlot *pie, GOCmdContext *cc);
 static void
 gog_pie_plot_populate_editor (GogObject *item, 
-			      GogEditor *editor,
+			      GOEditor *editor,
 			      G_GNUC_UNUSED GogDataAllocator *dalloc,
 			      GOCmdContext *cc)
 {
-	gog_editor_add_page (editor, 
+	go_editor_add_page (editor, 
 			     gog_pie_plot_pref (GOG_PIE_PLOT (item), cc),
 			     _("Properties"));
 
@@ -263,7 +264,7 @@
 		};
 		plot_klass->desc.series.dim = dimensions;
 		plot_klass->desc.series.num_dim = G_N_ELEMENTS (dimensions);
-		plot_klass->desc.series.style_fields = GOG_STYLE_OUTLINE | GOG_STYLE_FILL;
+		plot_klass->desc.series.style_fields = GO_STYLE_OUTLINE | GO_STYLE_FILL;
 	}
 	plot_klass->desc.num_series_max = 1;
 	plot_klass->series_type  = gog_pie_series_get_type ();
@@ -343,11 +344,11 @@
 extern gpointer gog_ring_plot_pref (GogRingPlot *ring, GOCmdContext *cc);
 static void
 gog_ring_plot_populate_editor (GogObject *item,
-			       GogEditor *editor,
+			       GOEditor *editor,
 		      G_GNUC_UNUSED GogDataAllocator *dalloc,
 		      GOCmdContext *cc)
 {
-	gog_editor_add_page (editor,
+	go_editor_add_page (editor,
 			     gog_ring_plot_pref (GOG_RING_PLOT (item), cc),
 			     _("Properties"));
 }
@@ -374,7 +375,7 @@
 			GSF_PARAM_STATIC | G_PARAM_READWRITE));
 
 	plot_klass->desc.num_series_max = G_MAXINT;
-	plot_klass->desc.series.style_fields = GOG_STYLE_OUTLINE | GOG_STYLE_FILL;
+	plot_klass->desc.series.style_fields = GO_STYLE_OUTLINE | GO_STYLE_FILL;
 }
 
 static void
@@ -557,7 +558,7 @@
 	unsigned elem, k;
 	GOPath *path;
 	GogTheme *theme = gog_object_get_theme (GOG_OBJECT (model));
-	GogStyle *style;
+	GOStyle *style;
 	GSList *ptr;
 	unsigned num_series = 0;
 	unsigned index;
@@ -583,7 +584,7 @@
 
 	separation_max = .0;
 	outline_width_max = .0;
-	if ((style = gog_styled_object_get_style (GOG_STYLED_OBJECT (series))))
+	if ((style = go_styled_object_get_style (GO_STYLED_OBJECT (series))))
 		outline_width_max = gog_renderer_line_size (view->renderer, style->outline.width);
 	for (overrides = gog_series_get_overrides (GOG_SERIES (series));
 	     overrides != NULL;
@@ -591,7 +592,7 @@
 		separation = GOG_PIE_SERIES_ELEMENT (overrides->data)->separation;
 		if (separation_max < separation)
 			separation_max = separation;
-		style = gog_styled_object_get_style (GOG_STYLED_OBJECT (overrides->data));
+		style = go_styled_object_get_style (GO_STYLED_OBJECT (overrides->data));
 		if (outline_width_max < style->outline.width)
 			outline_width_max = style->outline.width;
 	}
@@ -721,7 +722,7 @@
 
 		style = GOG_STYLED_OBJECT (series)->style;
 		if (model->base.vary_style_by_element)
-			style = gog_style_dup (style);
+			style = go_style_dup (style);
 		gog_renderer_push_style (view->renderer, style);
 
 		overrides = gog_series_get_overrides (GOG_SERIES (series));
@@ -740,8 +741,8 @@
 				gpse = GOG_PIE_SERIES_ELEMENT (overrides->data);
 				overrides = overrides->next;
 				gog_renderer_push_style (view->renderer,
-					gog_styled_object_get_style (
-						GOG_STYLED_OBJECT (gpse)));
+					go_styled_object_get_style (
+						GO_STYLED_OBJECT (gpse)));
 			} else if (model->base.vary_style_by_element)
 				gog_theme_fillin_style (theme, style, GOG_OBJECT (series),
 							model->base.index_num + k, FALSE);

Modified: trunk/plugins/plot_radar/gog-radar.c
==============================================================================
--- trunk/plugins/plot_radar/gog-radar.c	(original)
+++ trunk/plugins/plot_radar/gog-radar.c	Fri Apr 10 15:00:10 2009
@@ -29,13 +29,14 @@
 #include <goffice/graph/gog-view.h>
 #include <goffice/graph/gog-renderer.h>
 #include <goffice/graph/gog-theme.h>
-#include <goffice/graph/gog-style.h>
 #include <goffice/data/go-data.h>
 #include <goffice/math/go-math.h>
 #include <goffice/utils/go-color.h>
 #include <goffice/utils/go-marker.h>
 #include <goffice/utils/go-line.h>
 #include <goffice/utils/go-persist.h>
+#include <goffice/utils/go-style.h>
+#include <goffice/utils/go-styled-object.h>
 #include <goffice/app/module-plugin-defs.h>
 
 #include <glib/gi18n-lib.h>
@@ -179,11 +180,11 @@
 {
 	if (strcmp (hint, "circular-no-line") == 0) {
 		GogAxis *axis = gog_plot_get_axis (plot, GOG_AXIS_CIRCULAR);
-		GogStyle *style;
+		GOStyle *style;
 
 		g_return_if_fail (GOG_AXIS (axis) != NULL);
 
-		style = gog_styled_object_get_style (GOG_STYLED_OBJECT (axis));
+		style = go_styled_object_get_style (GO_STYLED_OBJECT (axis));
 		style->line.dash_type = GO_LINE_NONE;
 		style->line.auto_dash = FALSE;
 	};
@@ -303,7 +304,7 @@
 		};
 		gog_plot_klass->desc.series.dim = dimensions;
 		gog_plot_klass->desc.series.num_dim = G_N_ELEMENTS (dimensions);
-		gog_plot_klass->desc.series.style_fields = GOG_STYLE_LINE | GOG_STYLE_MARKER;
+		gog_plot_klass->desc.series.style_fields = GO_STYLE_LINE | GO_STYLE_MARKER;
 	}
 
 	gog_plot_klass->axis_get_bounds	= gog_radar_plot_axis_get_bounds;
@@ -338,7 +339,7 @@
 {
 	GogPlotClass *plot_klass = (GogPlotClass *) gog_klass;
 
-	plot_klass->desc.series.style_fields = GOG_STYLE_OUTLINE | GOG_STYLE_FILL;
+	plot_klass->desc.series.style_fields = GO_STYLE_OUTLINE | GO_STYLE_FILL;
 
 	gog_klass->type_name	= gog_radar_area_plot_type_name;
 }
@@ -410,10 +411,10 @@
 		};
 		gog_plot_klass->desc.series.dim = dimensions;
 		gog_plot_klass->desc.series.num_dim = G_N_ELEMENTS (dimensions);
-		gog_plot_klass->desc.series.style_fields = GOG_STYLE_LINE 
-			| GOG_STYLE_FILL 
-			| GOG_STYLE_MARKER
-			| GOG_STYLE_INTERPOLATION;
+		gog_plot_klass->desc.series.style_fields = GO_STYLE_LINE 
+			| GO_STYLE_FILL 
+			| GO_STYLE_MARKER
+			| GO_STYLE_INTERPOLATION;
 	}
 
 	gog_plot_klass->series_type = gog_polar_series_get_type();
@@ -445,7 +446,7 @@
 
 static void 
 gog_color_polar_plot_populate_editor (GogObject *obj,
-				   GogEditor *editor,
+				   GOEditor *editor,
 				   GogDataAllocator *dalloc,
 				   GOCmdContext *cc)
 {
@@ -469,7 +470,7 @@
 		w = GTK_WIDGET (gtk_builder_get_object (gui, "gog-color-polar-prefs"));
 		gtk_widget_unparent (w);
 		g_object_ref (w);
-		gog_editor_add_page (editor, w, _("Properties"));
+		go_editor_add_page (editor, w, _("Properties"));
 		g_object_unref (gui);
 	}
 
@@ -614,10 +615,10 @@
 		};
 		gog_plot_klass->desc.series.dim = dimensions;
 		gog_plot_klass->desc.series.num_dim = G_N_ELEMENTS (dimensions);
-		gog_plot_klass->desc.series.style_fields = GOG_STYLE_LINE 
-			| GOG_STYLE_MARKER
-			| GOG_STYLE_INTERPOLATION
-			| GOG_STYLE_MARKER_NO_COLOR;
+		gog_plot_klass->desc.series.style_fields = GO_STYLE_LINE 
+			| GO_STYLE_MARKER
+			| GO_STYLE_INTERPOLATION
+			| GO_STYLE_MARKER_NO_COLOR;
 	}
 
 	gog_plot_klass->series_type     = gog_color_polar_series_get_type();
@@ -710,7 +711,7 @@
 	for (ptr = model->base.series; ptr != NULL; ptr = ptr->next) {
 
 		GogRTSeries *series = GOG_RT_SERIES (ptr->data);
-		GogStyle *style, *color_style = NULL;
+		GOStyle *style, *color_style = NULL;
 		GOPath *path;
 		unsigned count;
 		double *r_vals, *c_vals, *z_vals = NULL;
@@ -727,7 +728,7 @@
 		c_vals = is_polar ?  go_data_vector_get_values (GO_DATA_VECTOR (series->base.values[0].data)) : NULL;
 		if (is_map) {
 			z_vals = go_data_vector_get_values (GO_DATA_VECTOR (series->base.values[2].data));
-			color_style = gog_style_dup (style);
+			color_style = go_style_dup (style);
 		}
 
 		if (is_polar) {
@@ -771,15 +772,15 @@
 
 						next_series = ptr->next->data;
 						if (gog_series_is_valid (GOG_SERIES (next_series))) {
-							GogStyle *next_style;
+							GOStyle *next_style;
 							const double *next_x_vals, *next_y_vals;
 							unsigned int next_n_points;
 
 							next_n_points = gog_series_get_xy_data
 								(GOG_SERIES (next_series),
 								 &next_x_vals, &next_y_vals);
-							next_style = gog_styled_object_get_style
-								(GOG_STYLED_OBJECT (next_series));
+							next_style = go_styled_object_get_style
+								(GO_STYLED_OBJECT (next_series));
 
 							next_path = gog_chart_map_make_path
 								(chart_map, next_x_vals, next_y_vals,
@@ -799,7 +800,7 @@
 			unsigned int i;
 
 			gog_renderer_push_style (view->renderer,
-				gog_styled_object_get_style (GOG_STYLED_OBJECT (series->radial_drop_lines)));
+				go_styled_object_get_style (GO_STYLED_OBJECT (series->radial_drop_lines)));
 			drop_path = go_path_new ();
 			for (i = 0; i < series->base.num_elements; i++) {
 				gog_chart_map_2D_to_view (chart_map, ((c_vals != NULL) ? c_vals[i] : i+1),
@@ -824,7 +825,7 @@
 		if (is_polar)
 			gog_renderer_pop_clip (view->renderer);
 
-		if (gog_style_is_marker_visible (style)) {
+		if (go_style_is_marker_visible (style)) {
 			for (count = 0; count < series->base.num_elements; count++) {
 				rho = (!is_polar || (go_add_epsilon (r_vals[count] - rho_min) >= 0.0)) ?
 					r_vals[count] : rho_min;
@@ -951,7 +952,7 @@
 }
 
 static void
-gog_rt_series_init_style (GogStyledObject *gso, GogStyle *style)
+gog_rt_series_init_style (GogStyledObject *gso, GOStyle *style)
 {
 	GogSeries *series = GOG_SERIES (gso);
 	GogRTPlot const *plot;
@@ -966,7 +967,7 @@
 		go_marker_set_shape (style->marker.mark, GO_MARKER_NONE);
 
 	if (!plot->default_style_has_fill && style->fill.auto_type)
-		style->fill.type = GOG_FILL_STYLE_NONE;
+		style->fill.type = GO_STYLE_FILL_NONE;
 }
 
 static void
@@ -1026,10 +1027,10 @@
 /*****************************************************************************/
 
 static void
-gog_color_polar_series_init_style (GogStyledObject *gso, GogStyle *style)
+gog_color_polar_series_init_style (GogStyledObject *gso, GOStyle *style)
 {
 	series_parent_klass->init_style (gso, style);
-	style->fill.type = GOG_FILL_STYLE_NONE;
+	style->fill.type = GO_STYLE_FILL_NONE;
 	if (style->line.auto_dash)
 		style->line.dash_type = GO_LINE_NONE;
 }

Modified: trunk/plugins/plot_surface/gog-contour.c
==============================================================================
--- trunk/plugins/plot_surface/gog-contour.c	(original)
+++ trunk/plugins/plot_surface/gog-contour.c	Fri Apr 10 15:00:10 2009
@@ -134,7 +134,7 @@
 {
 	unsigned i, j, nticks;
 	char *label;
-	GogStyle *style = gog_style_new ();
+	GOStyle *style = go_style_new ();
 	GogTheme *theme = gog_object_get_theme (GOG_OBJECT (plot));
 	GogAxis *axis = plot->axis[GOG_AXIS_PSEUDO_3D];
 	GOColor *color;
@@ -163,10 +163,10 @@
 	}
 	g_object_unref (style);
 
-	style = gog_style_new ();
-	style->interesting_fields = GOG_STYLE_FILL;
-	style->disable_theming = GOG_STYLE_ALL;
-	style->fill.type = GOG_FILL_STYLE_PATTERN;
+	style = go_style_new ();
+	style->interesting_fields = GO_STYLE_FILL;
+	style->disable_theming = GO_STYLE_ALL;
+	style->fill.type = GO_STYLE_FILL_PATTERN;
 	style->fill.pattern.pattern = GO_PATTERN_SOLID;
 
 	if (gog_axis_is_inverted (axis)) {
@@ -259,7 +259,7 @@
 	int k, kmax, r = 0, s, h;
 	unsigned i, imax, j, jmax;
 	GogRenderer *rend = view->renderer;
-	GogStyle *style;
+	GOStyle *style;
 	GogTheme *theme = gog_object_get_theme (GOG_OBJECT (plot));
 	double x0, x1, y0, y1;
 	GOPath *path, *lines;
@@ -326,7 +326,7 @@
 	}
 	cw = (x1 > x0) == (y1 > y0);
 
-	style = gog_style_new ();
+	style = go_style_new ();
 	path = go_path_new ();
 	go_path_set_options (path, GO_PATH_OPTIONS_SHARP);
 	/* build the colors table */
@@ -343,10 +343,10 @@
 	gog_renderer_push_clip_rectangle (rend, view->residual.x, view->residual.y,
 					  view->residual.w, view->residual.h);
 
-	style = gog_style_new ();
-	style->interesting_fields = GOG_STYLE_FILL | GOG_STYLE_OUTLINE;
-	style->disable_theming = GOG_STYLE_ALL;
-	style->fill.type = GOG_FILL_STYLE_PATTERN;
+	style = go_style_new ();
+	style->interesting_fields = GO_STYLE_FILL | GO_STYLE_OUTLINE;
+	style->disable_theming = GO_STYLE_ALL;
+	style->fill.type = GO_STYLE_FILL_PATTERN;
 	style->fill.pattern.pattern = GO_PATTERN_SOLID;
 
 	lines = go_path_new ();

Modified: trunk/plugins/plot_surface/gog-surface.c
==============================================================================
--- trunk/plugins/plot_surface/gog-surface.c	(original)
+++ trunk/plugins/plot_surface/gog-surface.c	Fri Apr 10 15:00:10 2009
@@ -27,6 +27,7 @@
 #include <goffice/graph/gog-renderer.h>
 #include <goffice/math/go-math.h>
 #include <goffice/utils/go-path.h>
+#include <goffice/utils/go-styled-object.h>
 
 #include <glib/gi18n-lib.h>
 #include <gsf/gsf-impl-utils.h>
@@ -79,7 +80,7 @@
 
 	/* Fill in GogPlotClass methods */
 	gog_plot_klass->axis_set = GOG_AXIS_SET_XYZ;
-	gog_plot_klass->desc.series.style_fields = GOG_STYLE_LINE | GOG_STYLE_FILL;
+	gog_plot_klass->desc.series.style_fields = GO_STYLE_LINE | GO_STYLE_FILL;
 
 	gog_xyz_plot_klass->third_axis = GOG_AXIS_Z;
 	gog_xyz_plot_klass->build_matrix = gog_surface_plot_build_matrix;
@@ -128,7 +129,7 @@
 	int i, imax, j, jmax, max, nbvalid;
 	double x, y, z, x0, y0, x1, y1;
 	GogRenderer *rend = view->renderer;
-	GogStyle *style;
+	GOStyle *style;
 	double *data;
 	GODataVector *x_vec = NULL, *y_vec = NULL;
 	gboolean xdiscrete, ydiscrete;
@@ -168,7 +169,7 @@
 	}
 
 
-	style = gog_styled_object_get_style (GOG_STYLED_OBJECT (series));
+	style = go_styled_object_get_style (GO_STYLED_OBJECT (series));
 
 	/* Build the tiles list */
 	x_vec = gog_xyz_plot_get_x_vals (plot);

Modified: trunk/plugins/plot_surface/gog-xyz-surface.c
==============================================================================
--- trunk/plugins/plot_surface/gog-xyz-surface.c	(original)
+++ trunk/plugins/plot_surface/gog-xyz-surface.c	Fri Apr 10 15:00:10 2009
@@ -169,7 +169,7 @@
 extern gpointer gog_xyz_surface_plot_pref (GogXYZPlot *plot, GOCmdContext *cc);
 static void
 gog_xyz_surface_plot_populate_editor (GogObject *item,
-				  GogEditor *editor,
+				  GOEditor *editor,
 				  G_GNUC_UNUSED GogDataAllocator *dalloc,
 				  GOCmdContext *cc)
 {
@@ -177,7 +177,7 @@
 				plot_xyz_contour_parent_klass:
 				plot_xyz_surface_parent_klass;
 
-	gog_editor_add_page (editor,
+	go_editor_add_page (editor,
 			     gog_xyz_surface_plot_pref (GOG_XYZ_PLOT (item), cc),
 			     _("Properties"));
 	(GOG_OBJECT_CLASS (klass)->populate_editor) (item, editor, dalloc, cc);

Modified: trunk/plugins/plot_surface/gog-xyz.c
==============================================================================
--- trunk/plugins/plot_surface/gog-xyz.c	(original)
+++ trunk/plugins/plot_surface/gog-xyz.c	Fri Apr 10 15:00:10 2009
@@ -90,12 +90,12 @@
 extern gpointer gog_xyz_plot_pref (GogXYZPlot *plot, GOCmdContext *cc);
 static void
 gog_xyz_plot_populate_editor (GogObject *item,
-				  GogEditor *editor,
+				  GOEditor *editor,
 				  G_GNUC_UNUSED GogDataAllocator *dalloc,
 				  GOCmdContext *cc)
 {
 	if (!GOG_XYZ_PLOT (item)->data_xyz) 
-		gog_editor_add_page (editor,
+		go_editor_add_page (editor,
 				     gog_xyz_plot_pref (GOG_XYZ_PLOT (item), cc),
 				     _("Properties"));
 
@@ -399,7 +399,7 @@
 		};
 		gog_plot_klass->desc.series.dim = dimensions;
 		gog_plot_klass->desc.series.num_dim = G_N_ELEMENTS (dimensions);
-		gog_plot_klass->desc.series.style_fields = GOG_STYLE_LINE;
+		gog_plot_klass->desc.series.style_fields = GO_STYLE_LINE;
 	}
 
 	/* Fill in GogPlotClass methods */
@@ -481,7 +481,7 @@
 }
 
 static void
-gog_xyz_series_init_style (GogStyledObject *gso, GogStyle *style)
+gog_xyz_series_init_style (GogStyledObject *gso, GOStyle *style)
 {
 	series_parent_klass->init_style (gso, style);
 }

Modified: trunk/plugins/plot_surface/xl-surface.c
==============================================================================
--- trunk/plugins/plot_surface/xl-surface.c	(original)
+++ trunk/plugins/plot_surface/xl-surface.c	Fri Apr 10 15:00:10 2009
@@ -65,7 +65,7 @@
 }
 
 static void
-xl_xyz_series_init_style (GogStyledObject *gso, GogStyle *style)
+xl_xyz_series_init_style (GogStyledObject *gso, GOStyle *style)
 {
 	series_parent_klass->init_style (gso, style);
 }

Modified: trunk/plugins/plot_xy/gog-xy.c
==============================================================================
--- trunk/plugins/plot_xy/gog-xy.c	(original)
+++ trunk/plugins/plot_xy/gog-xy.c	Fri Apr 10 15:00:10 2009
@@ -23,7 +23,6 @@
 #include "gog-xy.h"
 #include <goffice/graph/gog-view.h>
 #include <goffice/graph/gog-renderer.h>
-#include <goffice/graph/gog-style.h>
 #include <goffice/graph/gog-theme.h>
 #include <goffice/graph/gog-axis.h>
 #include <goffice/graph/gog-error-bar.h>
@@ -38,6 +37,8 @@
 #include <goffice/math/go-math.h>
 #include <goffice/utils/go-line.h>
 #include <goffice/utils/go-persist.h>
+#include <goffice/utils/go-style.h>
+#include <goffice/utils/go-styled-object.h>
 #include <goffice/app/module-plugin-defs.h>
 
 #ifdef GOFFICE_WITH_GTK
@@ -382,10 +383,10 @@
 		};
 		plot_klass->desc.series.dim = dimensions;
 		plot_klass->desc.series.num_dim = G_N_ELEMENTS (dimensions);
-		plot_klass->desc.series.style_fields = GOG_STYLE_LINE 
-			| GOG_STYLE_FILL 
-			| GOG_STYLE_MARKER 
-			| GOG_STYLE_INTERPOLATION;
+		plot_klass->desc.series.style_fields = GO_STYLE_LINE 
+			| GO_STYLE_FILL 
+			| GO_STYLE_MARKER 
+			| GO_STYLE_INTERPOLATION;
 	}
 }
 
@@ -418,11 +419,11 @@
 extern gpointer gog_bubble_plot_pref (GogBubblePlot *bubble, GOCmdContext *cc);
 static void
 gog_bubble_plot_populate_editor (GogObject *obj, 
-				 GogEditor *editor,
+				 GOEditor *editor,
 				 G_GNUC_UNUSED GogDataAllocator *dalloc,
 			GOCmdContext *cc)
 {
-	gog_editor_add_page (editor,
+	go_editor_add_page (editor,
 			     gog_bubble_plot_pref (GOG_BUBBLE_PLOT (obj), cc),
 			     _("Properties"));
 
@@ -551,7 +552,7 @@
 		};
 		plot_klass->desc.series.dim = dimensions;
 		plot_klass->desc.series.num_dim = G_N_ELEMENTS (dimensions);
-		plot_klass->desc.series.style_fields = GOG_STYLE_OUTLINE | GOG_STYLE_FILL;
+		plot_klass->desc.series.style_fields = GO_STYLE_OUTLINE | GO_STYLE_FILL;
 	}
 }
 
@@ -675,7 +676,7 @@
 
 static void 
 gog_xy_color_plot_populate_editor (GogObject *obj,
-				   GogEditor *editor,
+				   GOEditor *editor,
 				   GogDataAllocator *dalloc,
 				   GOCmdContext *cc)
 {
@@ -697,7 +698,7 @@
 			"toggled",
 			G_CALLBACK (hide_outliers_toggled_cb), obj);
 		w = glade_xml_get_widget (gui, "gog-xy-color-prefs");
-		gog_editor_add_page (editor, w, _("Properties"));
+		go_editor_add_page (editor, w, _("Properties"));
 		g_object_unref (gui);
 	}
 
@@ -809,8 +810,8 @@
 		};
 		plot_klass->desc.series.dim = dimensions;
 		plot_klass->desc.series.num_dim = G_N_ELEMENTS (dimensions);
-		plot_klass->desc.series.style_fields = GOG_STYLE_LINE | GOG_STYLE_MARKER
-			| GOG_STYLE_INTERPOLATION |GOG_STYLE_MARKER_NO_COLOR;
+		plot_klass->desc.series.style_fields = GO_STYLE_LINE | GO_STYLE_MARKER
+			| GO_STYLE_INTERPOLATION |GO_STYLE_MARKER_NO_COLOR;
 	}
 	plot_klass->axis_set	      	= GOG_AXIS_SET_XY_COLOR;
 	plot_klass->axis_get_bounds   	= gog_xy_color_plot_axis_get_bounds;
@@ -867,8 +868,8 @@
 	GogXYSeries const *series = NULL;
 	unsigned i ,j ,k ,n;
 	GogTheme *theme = gog_object_get_theme (GOG_OBJECT (model));
-	GogStyle *neg_style = NULL;
-	GogStyle *style = NULL;
+	GOStyle *neg_style = NULL;
+	GOStyle *style = NULL;
 	GogViewAllocation const *area;
 	GOPath *path = NULL, *next_path = NULL;
 	GSList *ptr;
@@ -944,14 +945,14 @@
 		if (n < 1)
 			continue;
 
-		style = gog_styled_object_get_style (GOG_STYLED_OBJECT (series));
+		style = go_styled_object_get_style (GO_STYLED_OBJECT (series));
 
-		show_marks = gog_style_is_marker_visible (style);
-		show_lines = gog_style_is_line_visible (style);
-		show_fill = gog_style_is_fill_visible (style);
+		show_marks = go_style_is_marker_visible (style);
+		show_lines = go_style_is_line_visible (style);
+		show_fill = go_style_is_fill_visible (style);
 
 		if (model->base.vary_style_by_element)
-			style = gog_style_dup (style);
+			style = go_style_dup (style);
 		gog_renderer_push_style (view->renderer, style);
 
 		if ((show_lines || show_fill) && !GOG_IS_BUBBLE_PLOT (model)) {
@@ -981,15 +982,15 @@
 
 					next_series = ptr->next->data;
 					if (gog_series_is_valid (GOG_SERIES (next_series))) {
-						GogStyle *next_style;
+						GOStyle *next_style;
 						const double *next_x_vals, *next_y_vals;
 						unsigned int next_n_points;
 
 						next_n_points = gog_series_get_xy_data
 							(GOG_SERIES (next_series),
 							 &next_x_vals, &next_y_vals);
-						next_style = gog_styled_object_get_style
-							(GOG_STYLED_OBJECT (next_series));
+						next_style = go_styled_object_get_style
+							(GO_STYLED_OBJECT (next_series));
 
 						next_path = gog_chart_map_make_path
 							(chart_map, next_x_vals, next_y_vals,
@@ -1032,7 +1033,7 @@
 				break;
 			}
 			gog_renderer_push_style (view->renderer,
-				gog_styled_object_get_style (GOG_STYLED_OBJECT (series->hdroplines)));
+				go_styled_object_get_style (GO_STYLED_OBJECT (series->hdroplines)));
 			drop_path = go_path_new ();
 			go_path_set_options (drop_path, GO_PATH_OPTIONS_SHARP);
 			for (i = 0; i < n; i++) {
@@ -1079,7 +1080,7 @@
 				break;
 			}
 			gog_renderer_push_style (view->renderer,
-				gog_styled_object_get_style (GOG_STYLED_OBJECT (series->vdroplines)));
+				go_styled_object_get_style (GO_STYLED_OBJECT (series->vdroplines)));
 			drop_path = go_path_new ();
 			go_path_set_options (drop_path, GO_PATH_OPTIONS_SHARP);
 			for (i = 0; i < n; i++) {
@@ -1114,8 +1115,8 @@
 			if (show_negatives) {
 				zmin = fabs (zmin);
 				if (zmin > zmax) zmax = zmin;
-				neg_style = gog_style_dup (GOG_STYLED_OBJECT (series)->style);
-				neg_style->fill.type = GOG_FILL_STYLE_PATTERN;
+				neg_style = go_style_dup (GOG_STYLED_OBJECT (series)->style);
+				neg_style->fill.type = GO_STYLE_FILL_PATTERN;
 				neg_style->fill.pattern.pattern = GO_PATTERN_SOLID;
 				neg_style->fill.pattern.back = RGBA_WHITE;
 			}
@@ -1168,8 +1169,8 @@
 							gse = GOG_SERIES_ELEMENT (overrides->data);
 							overrides = overrides->next;
 							gog_renderer_push_style (view->renderer,
-								gog_styled_object_get_style (
-									GOG_STYLED_OBJECT (gse)));
+								go_styled_object_get_style (
+									GO_STYLED_OBJECT (gse)));
 					} else if (model->base.vary_style_by_element)
 						gog_theme_fillin_style (theme, style, GOG_OBJECT (series),
 									model->base.index_num + i - 1, FALSE);
@@ -1246,7 +1247,7 @@
 							(GOG_SERIES_ELEMENT (overrides->data)->index == k)) {
 								gse = GOG_SERIES_ELEMENT (overrides->data);
 								overrides = overrides->next;
-								style = gog_styled_object_get_style (GOG_STYLED_OBJECT (gse));
+								style = go_styled_object_get_style (GO_STYLED_OBJECT (gse));
 								gog_renderer_push_style (view->renderer, style);
 						}
 						if (is_map) {
@@ -1401,16 +1402,16 @@
 GType gog_xy_series_element_get_type (void);
 
 static void
-gog_xy_series_element_init_style (GogStyledObject *gso, GogStyle *style)
+gog_xy_series_element_init_style (GogStyledObject *gso, GOStyle *style)
 {
 	GogSeries const *series = GOG_SERIES (GOG_OBJECT (gso)->parent);
-	GogStyle *parent_style;
+	GOStyle *parent_style;
 
 	g_return_if_fail (series != NULL);
 
-	parent_style = gog_styled_object_get_style (GOG_STYLED_OBJECT (series));
-	if (parent_style->interesting_fields & GOG_STYLE_MARKER)
-		style->interesting_fields = parent_style->interesting_fields & (GOG_STYLE_MARKER | GOG_STYLE_MARKER_NO_COLOR);
+	parent_style = go_styled_object_get_style (GO_STYLED_OBJECT (series));
+	if (parent_style->interesting_fields & GO_STYLE_MARKER)
+		style->interesting_fields = parent_style->interesting_fields & (GO_STYLE_MARKER | GO_STYLE_MARKER_NO_COLOR);
 	else
 		style->interesting_fields = parent_style->interesting_fields;
 	gog_theme_fillin_style (gog_object_get_theme (GOG_OBJECT (gso)),
@@ -1599,7 +1600,7 @@
 }
 
 static void
-gog_xy_series_init_style (GogStyledObject *gso, GogStyle *style)
+gog_xy_series_init_style (GogStyledObject *gso, GOStyle *style)
 {
 	GogSeries *series = GOG_SERIES (gso);
 
@@ -1618,7 +1619,7 @@
 			style->line.dash_type = GO_LINE_NONE;
 
 		if (!plot->default_style_has_fill && style->fill.auto_type)
-			style->fill.type = GOG_FILL_STYLE_NONE;
+			style->fill.type = GO_STYLE_FILL_NONE;
 
 		if (plot->use_splines)
 			series->interpolation = GO_LINE_INTERPOLATION_SPLINE;
@@ -1628,7 +1629,7 @@
 			style->line.dash_type = GO_LINE_NONE;
 
 		if (!plot->default_style_has_fill && style->fill.auto_type)
-			style->fill.type = GOG_FILL_STYLE_NONE;
+			style->fill.type = GO_STYLE_FILL_NONE;
 	}
 }
 
@@ -1729,7 +1730,7 @@
 
 static void
 gog_xy_series_populate_editor (GogObject *obj,
-			       GogEditor *editor,
+			       GOEditor *editor,
 			       GogDataAllocator *dalloc,
 			       GOCmdContext *cc)
 {
@@ -1757,13 +1758,13 @@
 		g_object_set_data_full (G_OBJECT (w),
 			"state", gui, (GDestroyNotify)g_object_unref);
 
-		gog_editor_add_page (editor, w, _("Details"));
+		go_editor_add_page (editor, w, _("Details"));
 	}
 
 	w = gog_error_bar_prefs (GOG_SERIES (obj), "x-errors", TRUE, dalloc, cc);
-	gog_editor_add_page (editor, w, _("X error bars"));
+	go_editor_add_page (editor, w, _("X error bars"));
 	w = gog_error_bar_prefs (GOG_SERIES (obj), "y-errors", FALSE, dalloc, cc);
-	gog_editor_add_page (editor, w, _("Y error bars"));
+	go_editor_add_page (editor, w, _("Y error bars"));
 }
 #endif
 

Modified: trunk/plugins/smoothing/gog-exp-smooth.c
==============================================================================
--- trunk/plugins/smoothing/gog-exp-smooth.c	(original)
+++ trunk/plugins/smoothing/gog-exp-smooth.c	Fri Apr 10 15:00:10 2009
@@ -49,7 +49,7 @@
 
 static void
 gog_exp_smooth_populate_editor (GogObject *obj, 
-				GogEditor *editor,
+				GOEditor *editor,
 				GogDataAllocator *dalloc,
 				GOCmdContext *cc)
 {
@@ -79,7 +79,7 @@
 	g_object_set (G_OBJECT (label), "mnemonic-widget", w, NULL);
 	g_object_set_data_full (G_OBJECT (table),
 		"state", gui, (GDestroyNotify) g_object_unref);
-	gog_editor_add_page (editor, table, _("Properties"));
+	go_editor_add_page (editor, table, _("Properties"));
 
 	(GOG_OBJECT_CLASS (exp_smooth_parent_klass)->populate_editor) (obj, editor, dalloc, cc);
 }

Modified: trunk/plugins/smoothing/gog-moving-avg.c
==============================================================================
--- trunk/plugins/smoothing/gog-moving-avg.c	(original)
+++ trunk/plugins/smoothing/gog-moving-avg.c	Fri Apr 10 15:00:10 2009
@@ -91,7 +91,7 @@
 
 static void
 gog_moving_avg_populate_editor (GogObject *obj, 
-				GogEditor *editor,
+				GOEditor *editor,
 				GogDataAllocator *dalloc,
 				GOCmdContext *cc)
 {
@@ -112,7 +112,7 @@
 	w = glade_xml_get_widget (gui, "mv-avg-prefs");
 	g_object_set_data_full (G_OBJECT (w),
 		"state", gui, (GDestroyNotify) g_object_unref);
-	gog_editor_add_page (editor, w, _("Properties"));
+	go_editor_add_page (editor, w, _("Properties"));
 
 	(GOG_OBJECT_CLASS (moving_avg_parent_klass)->populate_editor) (obj, editor, dalloc, cc);
 }

Modified: trunk/po/POTFILES.in
==============================================================================
--- trunk/po/POTFILES.in	(original)
+++ trunk/po/POTFILES.in	Fri Apr 10 15:00:10 2009
@@ -131,9 +131,6 @@
 goffice/graph/gog-series.c
 goffice/graph/gog-series.h
 goffice/graph/gog-smoothed-curve.c
-goffice/graph/gog-style-prefs.glade
-goffice/graph/gog-style.c
-goffice/graph/gog-style.h
 goffice/graph/gog-styled-object.c
 goffice/graph/gog-styled-object.h
 goffice/graph/gog-theme.c
@@ -200,7 +197,7 @@
 goffice/ms-compat/go-ms-parser.h
 goffice/ms-compat/god-drawing-ms-client-handler.c
 goffice/ms-compat/god-drawing-ms-client-handler.h
-goffice/ms-compat/god-drawing-chart_color_polar_1_1.*ms.c
+goffice/ms-compat/god-drawing-ms.c
 goffice/ms-compat/god-drawing-ms.h
 goffice/ms-compat/god-image-ms.c
 goffice/ms-compat/god-image-ms.h
@@ -229,8 +226,11 @@
 goffice/utils/go-locale.h
 goffice/utils/go-marker.c
 goffice/utils/go-marker.h
-goffice/utils/go-pattern.cchart_color_polar_1_1.*
+goffice/utils/go-pattern.c
 goffice/utils/go-pattern.h
+goffice/utils/go-style.c
+goffice/utils/go-style.h
+goffice/utils/go-style-prefs.glade
 goffice/utils/go-units.h
 goffice/utils/goffice-utils.h
 goffice/utils/regutf8.c
@@ -266,7 +266,7 @@
 plugins/plot_pie/plugin.xml.in
 plugins/plot_radar/gog-radar.c
 plugins/plot_radar/gog-radar.h
-plugins/plot_xy/gog-color-polar-prefs.xml
+plugins/plot_radar/gog-color-polar-prefs.xml
 plugins/plot_radar/plot-types.xml.in
 plugins/plot_radar/plugin.xml.in
 plugins/plot_surface/gog-contour.c

Modified: trunk/po/POTFILES.skip
==============================================================================
--- trunk/po/POTFILES.skip	(original)
+++ trunk/po/POTFILES.skip	Fri Apr 10 15:00:10 2009
@@ -2,6 +2,7 @@
 plugins/plot_distrib/plot-types.xml
 plugins/plot_pie/plot-types.xml
 plugins/plot_radar/plot-types.xml
+plugins/plot_radar/gog-color-polar-prefs.glade
 plugins/plot_surface/plot-types.xml
 plugins/plot_xy/plot-types.xml
 plugins/reg_linear/reg-types.xml

Modified: trunk/tests/go-demo.c
==============================================================================
--- trunk/tests/go-demo.c	(original)
+++ trunk/tests/go-demo.c	Fri Apr 10 15:00:10 2009
@@ -33,7 +33,8 @@
 #include <goffice/graph/gog-object.h>
 #include <goffice/graph/gog-plot.h>
 #include <goffice/graph/gog-series.h>
-#include <goffice/graph/gog-style.h>
+#include <goffice/utils/go-style.h>
+#include <goffice/utils/go-styled-object.h>
 #include <goffice/gtk/go-graph-widget.h>
 
 typedef struct _GoDemoPrivate GODemoPrivate;
@@ -113,7 +114,7 @@
 	GogLabel *label;
 	GogPlot *plot;
 	GOData *data;
-	GogStyle *style;
+	GOStyle *style;
 	PangoFontDescription *desc;
 
 	child = gtk_vbox_new (FALSE, 0);
@@ -129,9 +130,9 @@
 	gog_dataset_set_dim (GOG_DATASET (label), 0, data, NULL);
 	gog_object_add_by_name (GOG_OBJECT (graph), "Title", GOG_OBJECT (label));
 	/* Change the title font */
-	style = gog_styled_object_get_style (GOG_STYLED_OBJECT (label));
+	style = go_styled_object_get_style (GO_STYLED_OBJECT (label));
 	desc = pango_font_description_from_string ("Sans bold 16");
-	gog_style_set_font_desc (style, desc);
+	go_style_set_font_desc (style, desc);
 	/* Get the chart created by the widget initialization */
 	chart = go_graph_widget_get_chart (GO_GRAPH_WIDGET (w));
 	/* Create a plot and add it to the chart */

Modified: trunk/tests/pie-demo.c
==============================================================================
--- trunk/tests/pie-demo.c	(original)
+++ trunk/tests/pie-demo.c	Fri Apr 10 15:00:10 2009
@@ -28,7 +28,8 @@
 #include <goffice/graph/gog-object.h>
 #include <goffice/graph/gog-plot.h>
 #include <goffice/graph/gog-series.h>
-#include <goffice/graph/gog-style.h>
+#include <goffice/utils/go-style.h>
+#include <goffice/utils/go-styled-object.h>
 #include <goffice/gtk/go-graph-widget.h>
 
 static void
@@ -47,7 +48,7 @@
 	GogLabel *label;
 	GogPlot *pie;
 	GogSeries *series;
-	GogStyle *style;
+	GOStyle *style;
 	GOData *data;
 	GError *error;
 	PangoFontDescription *desc;
@@ -85,9 +86,9 @@
 	gog_dataset_set_dim (GOG_DATASET (label), 0, data, NULL);
 	gog_object_add_by_name (GOG_OBJECT (graph), "Title", GOG_OBJECT (label));
 	/* Change the title font */
-	style = gog_styled_object_get_style (GOG_STYLED_OBJECT (label));
+	style = go_styled_object_get_style (GO_STYLED_OBJECT (label));
 	desc = pango_font_description_from_string ("Sans bold 16");
-	gog_style_set_font_desc (style, desc);
+	go_style_set_font_desc (style, desc);
 	/* Get the chart created by the widget initialization */
 	chart = go_graph_widget_get_chart (GO_GRAPH_WIDGET (w));
 	/* Create a pie plot and add it to the chart */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]