diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-12-01 10:53:20 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-02-20 23:04:25 +0800 |
commit | 23f5773903d64a554d977ae7d0ebbaca73528f1f (patch) | |
tree | 104e1a59da8bf96b004bce204b79f47bbe0a6d13 /libgnomecanvas/gnome-canvas-widget.c | |
parent | 49bc4c2d765ee1780c23fdc9f42152850dabb220 (diff) | |
download | gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar.gz gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar.zst gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.zip |
Coding style and whitespace cleanup.
Diffstat (limited to 'libgnomecanvas/gnome-canvas-widget.c')
-rw-r--r-- | libgnomecanvas/gnome-canvas-widget.c | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/libgnomecanvas/gnome-canvas-widget.c b/libgnomecanvas/gnome-canvas-widget.c index ef516eb5b2..82077af291 100644 --- a/libgnomecanvas/gnome-canvas-widget.c +++ b/libgnomecanvas/gnome-canvas-widget.c @@ -49,8 +49,6 @@ enum { PROP_SIZE_PIXELS }; -static void gnome_canvas_widget_class_init (GnomeCanvasWidgetClass *class); -static void gnome_canvas_widget_init (GnomeCanvasWidget *witem); static void gnome_canvas_widget_dispose (GnomeCanvasItem *object); static void gnome_canvas_widget_get_property (GObject *object, guint param_id, @@ -84,32 +82,10 @@ static void gnome_canvas_widget_draw (GnomeCanvasItem *item, static GnomeCanvasItemClass *parent_class; -GType -gnome_canvas_widget_get_type (void) -{ - static GType widget_type; - - if (!widget_type) { - const GTypeInfo object_info = { - sizeof (GnomeCanvasWidgetClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) gnome_canvas_widget_class_init, - (GClassFinalizeFunc) NULL, - NULL, /* class_data */ - sizeof (GnomeCanvasWidget), - 0, /* n_preallocs */ - (GInstanceInitFunc) gnome_canvas_widget_init, - NULL /* value_table */ - }; - - widget_type = g_type_register_static ( - GNOME_TYPE_CANVAS_ITEM, - "GnomeCanvasWidget", &object_info, 0); - } - - return widget_type; -} +G_DEFINE_TYPE ( + GnomeCanvasWidget, + gnome_canvas_widget, + GNOME_TYPE_CANVAS_ITEM) static void gnome_canvas_widget_class_init (GnomeCanvasWidgetClass *class) |