summaryrefslogtreecommitdiffstats
path: root/src/widgets/sp-xmlview-content.cpp
diff options
context:
space:
mode:
authorAlex Valavanis <valavanisalex@gmail.com>2012-06-09 14:48:20 +0000
committerAlex Valavanis <valavanisalex@gmail.com>2012-06-09 14:48:20 +0000
commit2bbd63d2ffc632acdaabbc078b051ee721366647 (patch)
treeb550ce556623952cd4b15f084ba0669f88f27285 /src/widgets/sp-xmlview-content.cpp
parentDrop GtkObject usage in gradient-vector (diff)
downloadinkscape-2bbd63d2ffc632acdaabbc078b051ee721366647.tar.gz
inkscape-2bbd63d2ffc632acdaabbc078b051ee721366647.zip
Get rid of remaining GtkObject usage
Fixed bugs: - https://launchpad.net/bugs/813212 (bzr r11473)
Diffstat (limited to 'src/widgets/sp-xmlview-content.cpp')
-rw-r--r--src/widgets/sp-xmlview-content.cpp37
1 files changed, 24 insertions, 13 deletions
diff --git a/src/widgets/sp-xmlview-content.cpp b/src/widgets/sp-xmlview-content.cpp
index d30f0bbe6..bf740baa0 100644
--- a/src/widgets/sp-xmlview-content.cpp
+++ b/src/widgets/sp-xmlview-content.cpp
@@ -25,7 +25,12 @@ using Inkscape::DocumentUndo;
static void sp_xmlview_content_class_init (SPXMLViewContentClass * klass);
static void sp_xmlview_content_init (SPXMLViewContent * text);
-static void sp_xmlview_content_destroy (GtkObject * object);
+
+#if GTK_CHECK_VERSION(3,0,0)
+static void sp_xmlview_content_destroy(GtkWidget * object);
+#else
+static void sp_xmlview_content_destroy(GtkObject * object);
+#endif
void sp_xmlview_content_changed (GtkTextBuffer *tb, SPXMLViewContent *text);
@@ -103,16 +108,17 @@ GType sp_xmlview_content_get_type(void)
return type;
}
-void
-sp_xmlview_content_class_init (SPXMLViewContentClass * klass)
+void sp_xmlview_content_class_init(SPXMLViewContentClass * klass)
{
- GtkObjectClass * object_class;
-
- object_class = (GtkObjectClass *) klass;
+#if GTK_CHECK_VERSION(3,0,0)
+ GtkWidgetClass * widget_class = (GtkWidgetClass *) klass;
+ widget_class->destroy = sp_xmlview_content_destroy;
+#else
+ GtkObjectClass * object_class = (GtkObjectClass *) klass;
+ object_class->destroy = sp_xmlview_content_destroy;
+#endif
parent_class = (GtkTextViewClass*)g_type_class_peek_parent (klass);
-
- object_class->destroy = sp_xmlview_content_destroy;
}
void
@@ -122,16 +128,21 @@ sp_xmlview_content_init (SPXMLViewContent *text)
text->blocked = FALSE;
}
-void
-sp_xmlview_content_destroy (GtkObject * object)
+#if GTK_CHECK_VERSION(3,0,0)
+void sp_xmlview_content_destroy(GtkWidget * object)
+#else
+void sp_xmlview_content_destroy(GtkObject * object)
+#endif
{
- SPXMLViewContent * text;
-
- text = SP_XMLVIEW_CONTENT (object);
+ SPXMLViewContent * text = SP_XMLVIEW_CONTENT (object);
sp_xmlview_content_set_repr (text, NULL);
+#if GTK_CHECK_VERSION(3,0,0)
+ GTK_WIDGET_CLASS (parent_class)->destroy (object);
+#else
GTK_OBJECT_CLASS (parent_class)->destroy (object);
+#endif
}
void