summaryrefslogtreecommitdiffstats
path: root/src/widgets/sp-widget.cpp
diff options
context:
space:
mode:
authorAlex Valavanis <valavanisalex@gmail.com>2011-06-24 10:23:41 +0000
committerAlex Valavanis <valavanisalex@gmail.com>2011-06-24 10:23:41 +0000
commit4d8bf28dbebbc70325c75c0501ed192ae330c63b (patch)
treebc31b7781d12de480edee237a1d419a8555718d1 /src/widgets/sp-widget.cpp
parentRemove/replace deprecated gtk_window_set_policy symbol (diff)
downloadinkscape-4d8bf28dbebbc70325c75c0501ed192ae330c63b.tar.gz
inkscape-4d8bf28dbebbc70325c75c0501ed192ae330c63b.zip
Switch to GObject
(bzr r10350.1.3)
Diffstat (limited to '')
-rw-r--r--src/widgets/sp-widget.cpp27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/widgets/sp-widget.cpp b/src/widgets/sp-widget.cpp
index d5877db99..141f4afc1 100644
--- a/src/widgets/sp-widget.cpp
+++ b/src/widgets/sp-widget.cpp
@@ -43,24 +43,25 @@ static void sp_widget_set_selection (Inkscape::Application *inkscape, Inkscape::
static GtkBinClass *parent_class;
static guint signals[LAST_SIGNAL] = {0};
-GtkType
+GType
sp_widget_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) {
- static const GtkTypeInfo info = {
- (gchar*) "SPWidget",
- sizeof (SPWidget),
+ static const GTypeInfo info = {
sizeof (SPWidgetClass),
- (GtkClassInitFunc) sp_widget_class_init,
- (GtkObjectInitFunc) sp_widget_init,
- NULL, NULL, NULL
+ NULL, NULL,
+ (GClassInitFunc) sp_widget_class_init,
+ NULL, NULL,
+ sizeof (SPWidget),
+ 0,
+ (GInstanceInitFunc) sp_widget_init,
+ NULL
};
- type = gtk_type_unique (GTK_TYPE_BIN, &info);
+ type = g_type_register_static (GTK_TYPE_BIN,
+ "SPWidget",
+ &info,
+ (GTypeFlags)0);
}
return type;
}