summaryrefslogtreecommitdiffstats
path: root/src/widgets/gradient-image.cpp
diff options
context:
space:
mode:
authorAlex Valavanis <valavanisalex@gmail.com>2011-06-24 10:32:07 +0000
committerAlex Valavanis <valavanisalex@gmail.com>2011-06-24 10:32:07 +0000
commite59b35ae8bde9c0103a2ad5773d93dc944525647 (patch)
treebc31b7781d12de480edee237a1d419a8555718d1 /src/widgets/gradient-image.cpp
parentGTK cleaning: gtk_window_set_policy (diff)
parentSwitch to GObject (diff)
downloadinkscape-e59b35ae8bde9c0103a2ad5773d93dc944525647.tar.gz
inkscape-e59b35ae8bde9c0103a2ad5773d93dc944525647.zip
Switch to GObject
(bzr r10353)
Diffstat (limited to 'src/widgets/gradient-image.cpp')
-rw-r--r--src/widgets/gradient-image.cpp24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/widgets/gradient-image.cpp b/src/widgets/gradient-image.cpp
index 115935f50..eb4ab789d 100644
--- a/src/widgets/gradient-image.cpp
+++ b/src/widgets/gradient-image.cpp
@@ -36,24 +36,22 @@ static void sp_gradient_image_update (SPGradientImage *img);
static GtkWidgetClass *parent_class;
-GtkType
+GType
sp_gradient_image_get_type (void)
{
- //TODO: switch to GObject
- // GtkType and such calls were deprecated a while back with the
- // introduction of GObject as a separate layer, with GType instead. --JonCruz
-
- static GtkType type = 0;
+ static GType type = 0;
if (!type) {
- GtkTypeInfo info = {
- (gchar*) "SPGradientImage",
- sizeof (SPGradientImage),
+ GTypeInfo info = {
sizeof (SPGradientImageClass),
- (GtkClassInitFunc) sp_gradient_image_class_init,
- (GtkObjectInitFunc) sp_gradient_image_init,
- NULL, NULL, NULL
+ NULL, NULL,
+ (GClassInitFunc) sp_gradient_image_class_init,
+ NULL, NULL,
+ sizeof (SPGradientImage),
+ 0,
+ (GInstanceInitFunc) sp_gradient_image_init,
+ NULL
};
- type = gtk_type_unique (GTK_TYPE_WIDGET, &info);
+ type = g_type_register_static (GTK_TYPE_WIDGET, "SPGradientImage", &info, (GTypeFlags)0);
}
return type;
}