From 0f95656dac0612d4211508e3c975d50db3b4fecc Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Thu, 4 Dec 2008 08:47:03 +0000 Subject: Warning/type cleanup. (bzr r6941) --- src/widgets/sp-color-preview.cpp | 40 +++++++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 11 deletions(-) (limited to 'src/widgets/sp-color-preview.cpp') diff --git a/src/widgets/sp-color-preview.cpp b/src/widgets/sp-color-preview.cpp index 183877d13..ddeb5d123 100644 --- a/src/widgets/sp-color-preview.cpp +++ b/src/widgets/sp-color-preview.cpp @@ -28,20 +28,27 @@ static void sp_color_preview_paint (SPColorPreview *cp, GdkRectangle *area); static GtkWidgetClass *parent_class; -GtkType -sp_color_preview_get_type (void) +GType sp_color_preview_get_type(void) { - static GtkType type = 0; + static GType type = 0; if (!type) { - GtkTypeInfo info = { - "SPColorPreview", - sizeof (SPColorPreview), - sizeof (SPColorPreviewClass), - (GtkClassInitFunc) sp_color_preview_class_init, - (GtkObjectInitFunc) sp_color_preview_init, - NULL, NULL, NULL + static const GTypeInfo info = { + sizeof(SPColorPreviewClass), + NULL, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc) sp_color_preview_class_init, + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof(SPColorPreview), + 0, /* n_preallocs */ + (GInstanceInitFunc) sp_color_preview_init, + 0, /* value_table */ }; - type = gtk_type_unique (GTK_TYPE_WIDGET, &info); + + type = g_type_register_static( GTK_TYPE_WIDGET, + "SPColorPreview", + &info, + static_cast< GTypeFlags > (0) ); } return type; } @@ -191,3 +198,14 @@ sp_color_preview_paint (SPColorPreview *cp, GdkRectangle *area) cp->rgba | 0xff); } } + +/* + Local Variables: + mode:c++ + c-file-style:"stroustrup" + c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) + indent-tabs-mode:nil + fill-column:99 + End: +*/ +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : -- cgit v1.2.3