From 4d8bf28dbebbc70325c75c0501ed192ae330c63b Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Fri, 24 Jun 2011 11:23:41 +0100 Subject: Switch to GObject (bzr r10350.1.3) --- src/widgets/sp-xmlview-tree.cpp | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'src/widgets/sp-xmlview-tree.cpp') diff --git a/src/widgets/sp-xmlview-tree.cpp b/src/widgets/sp-xmlview-tree.cpp index b757123b5..e1779b620 100644 --- a/src/widgets/sp-xmlview-tree.cpp +++ b/src/widgets/sp-xmlview-tree.cpp @@ -125,25 +125,23 @@ sp_xmlview_tree_set_repr (SPXMLViewTree * tree, Inkscape::XML::Node * repr) gtk_clist_thaw (GTK_CLIST (tree)); } -GtkType +GType sp_xmlview_tree_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*) "SPXMLViewTree", - sizeof (SPXMLViewTree), + static const GTypeInfo info = { sizeof (SPXMLViewTreeClass), - (GtkClassInitFunc) sp_xmlview_tree_class_init, - (GtkObjectInitFunc) sp_xmlview_tree_init, - NULL, NULL, NULL + NULL, NULL, + (GClassInitFunc) sp_xmlview_tree_class_init, + NULL, NULL, + sizeof (SPXMLViewTree), + 0, + (GInstanceInitFunc) sp_xmlview_tree_init, + NULL }; - type = gtk_type_unique (GTK_TYPE_CTREE, &info); + type = g_type_register_static (GTK_TYPE_CTREE, "SPXMLViewTree", &info, (GTypeFlags)0); } return type; -- cgit v1.2.3 From 32cbae2ea15712efd9a36f43f7690268c1767e52 Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Sun, 3 Jul 2011 11:43:53 +0100 Subject: GTK+ cleanup: gtk_type_class (bzr r10407) --- src/widgets/sp-xmlview-tree.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets/sp-xmlview-tree.cpp') diff --git a/src/widgets/sp-xmlview-tree.cpp b/src/widgets/sp-xmlview-tree.cpp index e1779b620..b867b1044 100644 --- a/src/widgets/sp-xmlview-tree.cpp +++ b/src/widgets/sp-xmlview-tree.cpp @@ -153,7 +153,7 @@ sp_xmlview_tree_class_init (SPXMLViewTreeClass * klass) GtkObjectClass * object_class; object_class = (GtkObjectClass *) klass; - parent_class = (GtkCTreeClass *) gtk_type_class (GTK_TYPE_CTREE); + parent_class = (GtkCTreeClass *) g_type_class_peek_parent (klass); GTK_CTREE_CLASS (object_class)->tree_move = tree_move; -- cgit v1.2.3