[goffice] make virtual base classes really virtual.
- From: Jean Bréfort <jbrefort src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [goffice] make virtual base classes really virtual.
- Date: Tue, 6 Oct 2009 09:27:32 +0000 (UTC)
commit ce59cc29f65476a6f26e96ef30cfe0ef4fcad630
Author: Jean Brefort <jean brefort normalesup org>
Date: Tue Oct 6 11:26:42 2009 +0200
make virtual base classes really virtual.
ChangeLog | 25 +++++++
docs/reference/goffice-0.8-sections.txt | 19 +++++-
goffice/canvas/goc-ellipse.c | 8 +-
goffice/canvas/goc-group.c | 118 +++++++++++++++++++++++++-----
goffice/canvas/goc-group.h | 2 +-
goffice/canvas/goc-item.c | 41 ++++++-----
goffice/canvas/goc-rectangle.c | 2 +-
goffice/canvas/goc-styled-item.c | 38 +++++++++-
goffice/canvas/goc-styled-item.h | 3 +
goffice/canvas/goc-widget.c | 5 +-
goffice/graph/gog-object.c | 2 +-
goffice/graph/gog-outlined-object.c | 2 +-
goffice/graph/gog-series.c | 4 +-
goffice/graph/gog-smoothed-curve.c | 2 +-
goffice/graph/gog-styled-object.c | 2 +-
goffice/graph/gog-trend-line.c | 2 +-
plugins/plot_pie/gog-pie-prefs.c | 1 -
17 files changed, 218 insertions(+), 58 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c2e6278..e710ea6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+2009-10-06 Jean Brefort <jean brefort normalesup org>
+
+ * docs/reference/goffice-0.8-sections.txt: add more symbols.
+ * goffice/canvas/goc-ellipse.c (goc_ellipse_class_init): fixed description
+ of properties.
+ * goffice/canvas/goc-group.c (goc_group_add_child),
+ (goc_group_remove_child), (goc_group_adjust_bounds),
+ (goc_group_adjust_coords), (goc_group_cairo_transform): documented.
+ * goffice/canvas/goc-group.h: changed args names.
+ * goffice/canvas/goc-item.c (GSF_CLASS_FULL),
+ (goc_item_invalidate): make GocItemClass really virtual.
+ * goffice/canvas/goc-rectangle.c (goc_rectangle_class_init): fixed
+ description of properties.
+ * goffice/canvas/goc-styled-item.c (goc_styled_item_class_init): API docs
+ work.
+ * goffice/canvas/goc-styled-item.h: ditto.
+ * goffice/canvas/goc-widget.c (goc_widget_notify_scrolled): adapt to new
+ group API.
+ * goffice/graph/gog-object.c (GSF_CLASS_FULL): make class really virtual.
+ * goffice/graph/gog-outlined-object.c: ditto.
+ * goffice/graph/gog-series.c: ditto.
+ * goffice/graph/gog-smoothed-curve.c: ditto.
+ * goffice/graph/gog-styled-object.c: ditto.
+ * goffice/graph/gog-trend-line.c: ditto.
+
2009-10-04 Jean Brefort <jean brefort normalesup org>
* docs/reference/goffice-0.8-sections.txt: more work.
diff --git a/docs/reference/goffice-0.8-sections.txt b/docs/reference/goffice-0.8-sections.txt
index 9c8be4b..9939a55 100644
--- a/docs/reference/goffice-0.8-sections.txt
+++ b/docs/reference/goffice-0.8-sections.txt
@@ -919,6 +919,7 @@ GOComboText
GOComboTextSearch
go_combo_text_get_type
go_combo_text_new
+go_combo_text_new_default
go_combo_text_get_entry
go_combo_text_set_text
go_combo_text_add_item
@@ -1035,10 +1036,12 @@ GO_IS_FORMAT_SEL
GOFormatSel
go_format_sel_get_type
go_format_sel_new
+go_format_sel_new_full
go_format_sel_set_focus
go_format_sel_set_style_format
go_format_sel_set_locale
go_format_sel_get_fmt
+go_format_sel_get_dateconv
go_format_sel_set_dateconv
go_format_sel_show_preview
go_format_sel_hide_preview
@@ -1117,6 +1120,7 @@ GOGraphWidgetSizeMode
go_graph_widget_new
go_graph_widget_get_chart
go_graph_widget_get_graph
+go_graph_widget_get_renderer
go_graph_widget_get_type
go_graph_widget_set_size_mode
<SUBSECTION Private>
@@ -1434,7 +1438,6 @@ go_matrix3x3_multiply
<INCLUDE>goffice/graph/go-geometry.h</INCLUDE>
GO_GEOMETRY_ANGLE_TOLERANCE
GOGeometrySide
-GODirection
GOGeometryRotationType
GOGeometryOBR
GOGeometryAABR
@@ -1446,6 +1449,11 @@ go_geometry_test_OBR_overlap
go_geometry_get_rotation_type
go_geometry_calc_label_position
go_geometry_calc_label_anchor
+<SUBSECTION>
+GODirection
+go_direction_get_type
+go_direction_is_forward
+go_direction_is_horizontal
</SECTION>
<SECTION>
@@ -1901,6 +1909,15 @@ go_xml_out_add_color
</SECTION>
<SECTION>
+<FILE>go-pixbuf</FILE>
+<TITLE>GdkPixbufExtras</TITLE>
+go_pixbuf_get_from_cache
+go_pixbuf_intelligent_scale
+go_pixbuf_new_from_file
+go_pixbuf_tile
+</SECTION>
+
+<SECTION>
<FILE>go-string</FILE>
GOStringPhonetic
GOString
diff --git a/goffice/canvas/goc-ellipse.c b/goffice/canvas/goc-ellipse.c
index 976e15d..ab0d7b0 100644
--- a/goffice/canvas/goc-ellipse.c
+++ b/goffice/canvas/goc-ellipse.c
@@ -213,25 +213,25 @@ goc_ellipse_class_init (GocItemClass *item_klass)
g_object_class_install_property (obj_klass, ELLIPSE_PROP_X,
g_param_spec_double ("x",
_("x"),
- _("The rectangle left position"),
+ _("The ellipse left position (or right position in RTL mode)"),
-G_MAXDOUBLE, G_MAXDOUBLE, 0.,
GSF_PARAM_STATIC | G_PARAM_READWRITE));
g_object_class_install_property (obj_klass, ELLIPSE_PROP_Y,
g_param_spec_double ("y",
_("y"),
- _("The rectangle top position"),
+ _("The ellipse top position"),
-G_MAXDOUBLE, G_MAXDOUBLE, 0.,
GSF_PARAM_STATIC | G_PARAM_READWRITE));
g_object_class_install_property (obj_klass, ELLIPSE_PROP_W,
g_param_spec_double ("width",
_("Width"),
- _("The rectangle width"),
+ _("The ellipse width"),
0., G_MAXDOUBLE, 0.,
GSF_PARAM_STATIC | G_PARAM_READWRITE));
g_object_class_install_property (obj_klass, ELLIPSE_PROP_H,
g_param_spec_double ("height",
_("Height"),
- _("The rectangle height"),
+ _("The ellipse height"),
0., G_MAXDOUBLE, 0.,
GSF_PARAM_STATIC | G_PARAM_READWRITE));
/* g_object_class_install_property (obj_klass, ELLIPSE_PROP_ROTATION,
diff --git a/goffice/canvas/goc-group.c b/goffice/canvas/goc-group.c
index 1d83a77..b59c062 100644
--- a/goffice/canvas/goc-group.c
+++ b/goffice/canvas/goc-group.c
@@ -33,7 +33,16 @@ enum {
GROUP_PROP_X,
GROUP_PROP_Y,
};
-
+/**
+ * SECTION:goc-group
+ * @short_description: Group item
+ *
+ * A #GocGroup is a #GocItem which just contains other items.
+ *
+ * The contents
+ * of the canvas are stored as a tree where #GocGroup items are branches and
+ * other items are leafs.
+ **/
static void
goc_group_set_property (GObject *gobject, guint param_id,
GValue const *value, GParamSpec *pspec)
@@ -253,6 +262,13 @@ GSF_CLASS (GocGroup, goc_group,
goc_group_class_init, NULL,
GOC_TYPE_ITEM)
+/**
+ * goc_group_new :
+ * @parent: #GocGroup
+ *
+ * Creates a new #GocGroup as a child of @parent.
+ * Returns: the newly created #GocGroup.
+ **/
GocGroup*
goc_group_new (GocGroup *parent)
{
@@ -268,6 +284,12 @@ goc_group_new (GocGroup *parent)
return group;
}
+/**
+ * goc_group_clear
+ * @group: #GocGroup
+ *
+ * Destroys all @group children.
+ **/
void
goc_group_clear (GocGroup *group)
{
@@ -290,66 +312,122 @@ goc_group_clear (GocGroup *group)
}
}
+/**
+ * goc_group_add_child :
+ * @parent: #GocGroup
+ * @item: #GocItem
+ *
+ * Adds @item as a new child to @parent.
+ **/
void
-goc_group_add_child (GocGroup *group, GocItem *item)
+goc_group_add_child (GocGroup *parent, GocItem *item)
{
- g_return_if_fail (GOC_IS_GROUP (group));
+ g_return_if_fail (GOC_IS_GROUP (parent));
g_return_if_fail (GOC_IS_ITEM (item));
- if (item->parent == group)
+ if (item->parent == parent)
return;
if (item->parent != NULL)
goc_group_remove_child (item->parent, item);
- group->children = g_list_append (group->children, item);
- item->parent = group;
- item->canvas = group->base.canvas;
+ parent->children = g_list_append (parent->children, item);
+ item->parent = parent;
+ item->canvas = parent->base.canvas;
g_object_notify (G_OBJECT (item), "parent");
g_object_notify (G_OBJECT (item), "canvas");
- if (GOC_ITEM (group)->realized)
+ if (GOC_ITEM (parent)->realized)
_goc_item_realize (item);
- goc_item_bounds_changed (GOC_ITEM (group));
+ goc_item_bounds_changed (GOC_ITEM (parent));
}
+/**
+ * goc_group_remove_child :
+ * @parent: #GocGroup
+ * @item: #GocItem
+ *
+ * Removes @item from @parent. This function will fail if @item is not a
+ * child of @parent.
+ **/
void
-goc_group_remove_child (GocGroup *group, GocItem *item)
+goc_group_remove_child (GocGroup *parent, GocItem *item)
{
- g_return_if_fail (GOC_IS_GROUP (group));
+ g_return_if_fail (GOC_IS_GROUP (parent));
g_return_if_fail (GOC_IS_ITEM (item));
- g_return_if_fail (item->parent == group);
+ g_return_if_fail (item->parent == parent);
if (item->canvas && item->canvas->last_item == item)
item->canvas->last_item = NULL;
- if (GOC_ITEM (group)->realized)
+ if (GOC_ITEM (parent)->realized)
_goc_item_unrealize (item);
- group->children = g_list_remove (group->children, item);
+ parent->children = g_list_remove (parent->children, item);
item->parent = NULL;
item->canvas = NULL;
g_object_notify (G_OBJECT (item), "parent");
g_object_notify (G_OBJECT (item), "canvas");
- goc_item_bounds_changed (GOC_ITEM (group));
+ goc_item_bounds_changed (GOC_ITEM (parent));
}
+/**
+ * goc_group_adjust_bounds
+ * @group: #GocGroup
+ * @x0: first horizontal coordinate
+ * @y0: first vertical coordinate
+ * @x1: last horizontal coordinate
+ * @y1: last vertical coordinate
+ *
+ * Adds @group horizontal offset to @x0 and @x1, and vertical offset to @y0
+ * and @y1. This function is called recursively so that when returning @x0,
+ * @y0, @x1, and @y1 are absolute coordinates in canvas space,
+ **/
void
goc_group_adjust_bounds (GocGroup const *group, double *x0, double *y0, double *x1, double *y1)
{
+ GocGroup *parent;
g_return_if_fail (GOC_IS_GROUP (group));
*x0 += group->x;
*y0 += group->y;
*x1 += group->x;
*y1 += group->y;
+ parent = GOC_ITEM (group)->parent;
+ if (parent)
+ goc_group_adjust_bounds (parent, x0, y0, x1, y1);
}
+/**
+ * goc_group_adjust_coords
+ * @group: #GocGroup
+ * @x: horizontal coordinate
+ * @y: vertical coordinate
+ *
+ * Adds @group horizontal offset to @x0, and vertical offset to @y0.
+ * This function is called recursively so that when returning @x0 and
+ * @y0 are absolute coordinates in canvas space,
+ **/
void
-goc_group_adjust_coords (GocGroup const *group, double *x0, double *y0)
+goc_group_adjust_coords (GocGroup const *group, double *x, double *y)
{
GocGroup *parent;
g_return_if_fail (GOC_IS_GROUP (group));
- *x0 += group->x;
- *y0 += group->y;
+ *x += group->x;
+ *y += group->y;
parent = GOC_ITEM (group)->parent;
if (parent)
- goc_group_adjust_coords (parent, x0, y0);
+ goc_group_adjust_coords (parent, x, y);
}
-void goc_group_cairo_transform (GocGroup const *group, cairo_t *cr, double x, double y)
+/**
+ * goc_group_cairo_transform :
+ * @group: #GocGroup
+ * @cr: #cairo_t
+ * @x: horizontal coordinate
+ * @y: vertical coordinate
+ *
+ * Translates @cr current context so that operations start at (@x,@y), which
+ * are @group relative coordinates, and is scaled according to the containing
+ * #GocCanvas current scale (see goc_canvas_get_pixels_per_unit()). The
+ * translation takes all @group ancestors into account.
+ *
+ * This function does not call cairo_save().
+ **/
+void
+goc_group_cairo_transform (GocGroup const *group, cairo_t *cr, double x, double y)
{
GocGroup *parent;
g_return_if_fail (GOC_IS_GROUP (group));
diff --git a/goffice/canvas/goc-group.h b/goffice/canvas/goc-group.h
index d6fa244..49416f0 100644
--- a/goffice/canvas/goc-group.h
+++ b/goffice/canvas/goc-group.h
@@ -51,7 +51,7 @@ void goc_group_clear (GocGroup *group);
void goc_group_add_child (GocGroup *parent, GocItem *item);
void goc_group_remove_child (GocGroup *parent, GocItem *item);
void goc_group_adjust_bounds (GocGroup const *group, double *x0, double *y0, double *x1, double *y1);
-void goc_group_adjust_coords (GocGroup const *group, double *x0, double *y0);
+void goc_group_adjust_coords (GocGroup const *group, double *x, double *y);
void goc_group_cairo_transform (GocGroup const *group, cairo_t *cr, double x, double y);
G_END_DECLS
diff --git a/goffice/canvas/goc-item.c b/goffice/canvas/goc-item.c
index 43616d6..b661e9d 100644
--- a/goffice/canvas/goc-item.c
+++ b/goffice/canvas/goc-item.c
@@ -27,6 +27,13 @@
#include <glib/gi18n-lib.h>
/**
+ * SECTION:goc-item
+ * @short_description: Base canvas item.
+ *
+ * #GocItem is the virtual base object for canvas items.
+**/
+
+/**
* GocItem :
* @base: the parent object.
* @canvas: the canvas in which the item is displayed.
@@ -40,9 +47,9 @@
* @x1: the highest horizontal bound of the item.
* @y1: the highest vertical bound of the item.
*
- * The virtual base object for canvas items. The various fields should not be
- * accessed directly except from children objects which must update @x0, @y0,
- * @x1, and @y1. All other fields are read-only.
+ * The various fields should not be accessed directly except from children
+ * objects which must update @x0, @y0, @x1, and @y1. All other fields are
+ * read-only.
**/
enum {
@@ -230,9 +237,9 @@ goc_item_init (GocItem *item)
item->visible = TRUE;
}
-GSF_CLASS (GocItem, goc_item,
- goc_item_class_init, goc_item_init,
- G_TYPE_OBJECT)
+GSF_CLASS_FULL (GocItem, goc_item, NULL, NULL,
+ goc_item_class_init, NULL, goc_item_init,
+ G_TYPE_OBJECT, G_TYPE_FLAG_ABSTRACT, {})
static void
_goc_item_update_bounds (GocItem *item)
@@ -407,10 +414,7 @@ goc_item_invalidate (GocItem *item)
y0 = item->y0;
x1 = item->x1;
y1 = item->y1;
- while (parent) {
- goc_group_adjust_bounds (parent, &x0, &y0, &x1, &y1);
- parent = parent->base.parent;
- }
+ goc_group_adjust_bounds (parent, &x0, &y0, &x1, &y1);
goc_canvas_invalidate (item->canvas, x0, y0, x1, y1);
}
@@ -527,8 +531,9 @@ goc_item_ungrab (GocItem *item)
* @item: #GocItem
* @n: the rank change
*
- * Raises @item by @n steps (or less if the list is too short) in the item list
- * so that it is displayed nrearer the top of the items stack.
+ * Raises @item by @n steps inside its parent #GocGroup (or less if the list
+ * is too short) in the item list so that it is displayed nrearer the top of
+ * the items stack.
**/
void
goc_item_raise (GocItem *item, int n)
@@ -547,8 +552,9 @@ goc_item_raise (GocItem *item, int n)
* @item: #GocItem
* @n: the rank change
*
- * Lowers @item by @n steps (or less if the list is too short) in the item list
- * so that it is displayed more deeply in the items stack.
+ * Lowers @item by @n steps inside its parent #GocGroup (or less if the list
+ * is too short) in the item list so that it is displayed more deeply in the
+ * items stack.
**/
void
goc_item_lower (GocItem *item, int n)
@@ -566,8 +572,8 @@ goc_item_lower (GocItem *item, int n)
* goc_item_lower_to_bottom :
* @item: #GocItem
*
- * Lowers @item to bottom so that it will be at least partly hidden by any
- * overlapping item.
+ * Lowers @item to bottom inside its parent #GocGroup so that it will be at
+ * least partly hidden by any overlapping item.
**/
void
goc_item_lower_to_bottom (GocItem *item)
@@ -581,7 +587,8 @@ goc_item_lower_to_bottom (GocItem *item)
* goc_item_raise_to_top :
* @item: #GocItem
*
- * Raises @item to front so that it becomes the toplevel item.
+ * Raises @item to front so that it becomes the toplevel item inside
+ * its parent #GocGroup.
**/
void
goc_item_raise_to_top (GocItem *item)
diff --git a/goffice/canvas/goc-rectangle.c b/goffice/canvas/goc-rectangle.c
index cadbc02..f15ef76 100644
--- a/goffice/canvas/goc-rectangle.c
+++ b/goffice/canvas/goc-rectangle.c
@@ -194,7 +194,7 @@ goc_rectangle_class_init (GocItemClass *item_klass)
g_object_class_install_property (obj_klass, RECT_PROP_X,
g_param_spec_double ("x",
_("x"),
- _("The rectangle left position"),
+ _("The rectangle left position (or right position in RTL mode)"),
-G_MAXDOUBLE, G_MAXDOUBLE, 0.,
GSF_PARAM_STATIC | G_PARAM_READWRITE));
g_object_class_install_property (obj_klass, RECT_PROP_Y,
diff --git a/goffice/canvas/goc-styled-item.c b/goffice/canvas/goc-styled-item.c
index 81d3bce..f1088d6 100644
--- a/goffice/canvas/goc-styled-item.c
+++ b/goffice/canvas/goc-styled-item.c
@@ -27,6 +27,17 @@
#include <gsf/gsf-impl-utils.h>
#include <string.h>
+/**
+ * SECTION:goc-styled-item
+ * @short_description: Styled items
+ *
+ * The virtual base object for canvas items with style.
+ **/
+
+/**
+ * GocStyledItemClass :
+ * @init_style: style initialization handler.
+ **/
enum {
STYLED_ITEM_PROP_0,
STYLED_ITEM_PROP_STYLE,
@@ -116,6 +127,14 @@ goc_styled_item_class_init (GocItemClass *goc_klass)
GObjectClass *gobject_klass = (GObjectClass *) goc_klass;
GocStyledItemClass *style_klass = (GocStyledItemClass *) goc_klass;
+/**
+ * GocStyledItem::style-changed:
+ * @gsi: the object on which the signal is emitted
+ * @style: the new #GOStyle.
+ *
+ * The ::style-changed signal is emitted when a new style
+ * has been set on a styled item.
+ **/
goc_styled_item_signals [STYLE_CHANGED] = g_signal_new ("style-changed",
G_TYPE_FROM_CLASS (goc_klass),
G_SIGNAL_RUN_LAST,
@@ -141,7 +160,7 @@ goc_styled_item_class_init (GocItemClass *goc_klass)
g_object_class_install_property (gobject_klass, STYLED_ITEM_SCALE_LINE_WIDTH,
g_param_spec_boolean ("scale-line-width",
_("Scale line width"),
- _("Whether to scale the line width or not when zooming"),
+ _("Whether to scale the line width when zooming"),
TRUE,
GSF_PARAM_STATIC | G_PARAM_READWRITE));
}
@@ -228,9 +247,24 @@ goc_styled_item_so_init (GOStyledObjectClass *iface)
GSF_CLASS_FULL (GocStyledItem, goc_styled_item, NULL, NULL,
goc_styled_item_class_init, NULL, goc_styled_item_init,
- GOC_TYPE_ITEM, 0,
+ GOC_TYPE_ITEM, G_TYPE_FLAG_ABSTRACT,
GSF_INTERFACE (goc_styled_item_so_init, GO_TYPE_STYLED_OBJECT))
+/**
+ * goc_styled_item_set_cairo_line :
+ * @gsi: #GocStyledItem
+ * @cr: #cairo_t
+ *
+ * Prepares the cairo context @cr to draw a line according to the
+ * item style and canvas scale. The line width is scaled only if
+ * the scale-line-width property is set to %TRUE. This function calls
+ * go_styled_object_set_cairo_line().
+ *
+ * If the item drawing used goc_group_cairo_transform(),
+ * scale-line-width should be %FALSE to avoid scaling twice, or
+ * go_styled_object_set_cairo_line() should be called directly instead.
+ * Returns: %TRUE if the line is not invisible
+ **/
gboolean
goc_styled_item_set_cairo_line (GocStyledItem const *gsi, cairo_t *cr)
{
diff --git a/goffice/canvas/goc-styled-item.h b/goffice/canvas/goc-styled-item.h
index b085056..1d66876 100644
--- a/goffice/canvas/goc-styled-item.h
+++ b/goffice/canvas/goc-styled-item.h
@@ -36,11 +36,14 @@ struct _GocStyledItem {
typedef struct _GocStyledItemClass GocStyledItemClass;
struct _GocStyledItemClass {
+ /*< private >*/
GocItemClass base;
+ /*< public >*/
/* virtual */
void (*init_style) (GocStyledItem *item, GOStyle *style);
+ /*< private >*/
/* signal */
void (*style_changed) (GocStyledItem *item, GOStyle const *new_style);
};
diff --git a/goffice/canvas/goc-widget.c b/goffice/canvas/goc-widget.c
index f12319b..3804c8c 100644
--- a/goffice/canvas/goc-widget.c
+++ b/goffice/canvas/goc-widget.c
@@ -112,10 +112,7 @@ goc_widget_notify_scrolled (GocItem *item)
y0 = item->y0;
x1 = item->x1;
y1 = item->y1;
- while (parent) {
- goc_group_adjust_bounds (parent, &x0, &y0, &x1, &y1);
- parent = parent->base.parent;
- }
+ goc_group_adjust_bounds (parent, &x0, &y0, &x1, &y1);
x0 = (x0 - item->canvas->scroll_x1) * item->canvas->pixels_per_unit;
y0 = (y0 - item->canvas->scroll_y1) * item->canvas->pixels_per_unit;
x1 = (x1 - item->canvas->scroll_x1) * item->canvas->pixels_per_unit;
diff --git a/goffice/graph/gog-object.c b/goffice/graph/gog-object.c
index 13fdc79..e10f130 100644
--- a/goffice/graph/gog-object.c
+++ b/goffice/graph/gog-object.c
@@ -685,7 +685,7 @@ gog_object_init (GogObject *obj)
GSF_CLASS_FULL (GogObject, gog_object,
gog_object_base_init, gog_object_base_finalize,
gog_object_class_init, NULL, gog_object_init,
- G_TYPE_OBJECT, 0, {})
+ G_TYPE_OBJECT, G_TYPE_FLAG_ABSTRACT, {})
static gboolean
gog_object_is_same_type (GogObject *obj_a, GogObject *obj_b)
diff --git a/goffice/graph/gog-outlined-object.c b/goffice/graph/gog-outlined-object.c
index 04eff03..0ff08a1 100644
--- a/goffice/graph/gog-outlined-object.c
+++ b/goffice/graph/gog-outlined-object.c
@@ -164,6 +164,6 @@ gog_outlined_view_class_init (GogOutlinedViewClass *oview_klass)
oview_klass->call_parent_render = TRUE;
}
-GSF_CLASS (GogOutlinedView, gog_outlined_view,
+GSF_CLASS_ABSTRACT (GogOutlinedView, gog_outlined_view,
gog_outlined_view_class_init, NULL,
GOG_TYPE_VIEW)
diff --git a/goffice/graph/gog-series.c b/goffice/graph/gog-series.c
index ad214df..f253461 100644
--- a/goffice/graph/gog-series.c
+++ b/goffice/graph/gog-series.c
@@ -214,7 +214,7 @@ gog_series_element_class_init (GogSeriesElementClass *klass)
GSF_PARAM_STATIC | G_PARAM_READWRITE | GO_PARAM_PERSISTENT | GOG_PARAM_FORCE_SAVE));
}
-GSF_CLASS (GogSeriesElement, gog_series_element,
+GSF_CLASS_ABSTRACT (GogSeriesElement, gog_series_element,
gog_series_element_class_init, NULL /*gog_series_element_init*/,
GOG_TYPE_STYLED_OBJECT)
@@ -813,7 +813,7 @@ gog_series_dataset_init (GogDatasetClass *iface)
GSF_CLASS_FULL (GogSeries, gog_series,
NULL, NULL, gog_series_class_init, NULL,
- gog_series_init, GOG_TYPE_STYLED_OBJECT, 0,
+ gog_series_init, GOG_TYPE_STYLED_OBJECT, G_TYPE_FLAG_ABSTRACT,
GSF_INTERFACE (gog_series_dataset_init, GOG_TYPE_DATASET))
/**
diff --git a/goffice/graph/gog-smoothed-curve.c b/goffice/graph/gog-smoothed-curve.c
index 93804b9..32a7e06 100644
--- a/goffice/graph/gog-smoothed-curve.c
+++ b/goffice/graph/gog-smoothed-curve.c
@@ -73,7 +73,7 @@ gog_smoothed_curve_init (GogSmoothedCurve *curve)
curve->x = curve->y = NULL;
}
-GSF_CLASS (GogSmoothedCurve, gog_smoothed_curve,
+GSF_CLASS_ABSTRACT (GogSmoothedCurve, gog_smoothed_curve,
gog_smoothed_curve_class_init, gog_smoothed_curve_init,
GOG_TYPE_TREND_LINE)
diff --git a/goffice/graph/gog-styled-object.c b/goffice/graph/gog-styled-object.c
index cb338dd..e9e519b 100644
--- a/goffice/graph/gog-styled-object.c
+++ b/goffice/graph/gog-styled-object.c
@@ -283,7 +283,7 @@ gog_styled_object_so_init (GOStyledObjectClass *iface)
GSF_CLASS_FULL (GogStyledObject, gog_styled_object, NULL, NULL,
gog_styled_object_class_init, NULL, gog_styled_object_init,
- GOG_TYPE_OBJECT, 0,
+ GOG_TYPE_OBJECT, G_TYPE_FLAG_ABSTRACT,
GSF_INTERFACE (gog_styled_object_so_init, GO_TYPE_STYLED_OBJECT))
diff --git a/goffice/graph/gog-trend-line.c b/goffice/graph/gog-trend-line.c
index 14d0bc3..5fcf281 100644
--- a/goffice/graph/gog-trend-line.c
+++ b/goffice/graph/gog-trend-line.c
@@ -48,7 +48,7 @@ gog_trend_line_class_init (GogObjectClass *gog_klass)
gog_klass->type_name = gog_trend_line_type_name;
}
-GSF_CLASS (GogTrendLine, gog_trend_line,
+GSF_CLASS_ABSTRACT (GogTrendLine, gog_trend_line,
gog_trend_line_class_init, NULL,
GOG_TYPE_STYLED_OBJECT)
diff --git a/plugins/plot_pie/gog-pie-prefs.c b/plugins/plot_pie/gog-pie-prefs.c
index 9451eae..1827fdf 100644
--- a/plugins/plot_pie/gog-pie-prefs.c
+++ b/plugins/plot_pie/gog-pie-prefs.c
@@ -70,7 +70,6 @@ typedef struct {
static void
pie_pref_state_free (PiePrefState *state)
{
-puts("freeing");
g_signal_handler_disconnect (state->gobj, state->update_editor_handler);
g_object_unref (state->gobj);
g_free (state);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]