From dbda80349e95767e390a178cda7c05787fbce1fe Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Fri, 5 Apr 2013 17:51:29 +0200 Subject: Merged Group and subclasses. (bzr r11608.1.77) --- src/ui/dialog/object-attributes.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/ui/dialog/object-attributes.cpp') diff --git a/src/ui/dialog/object-attributes.cpp b/src/ui/dialog/object-attributes.cpp index 027c9ae56..9a7b91c57 100644 --- a/src/ui/dialog/object-attributes.cpp +++ b/src/ui/dialog/object-attributes.cpp @@ -124,16 +124,20 @@ void ObjectAttributes::widget_setup (void) } blocked = true; + + // CPPIFY SPObject *obj = SP_OBJECT(item); //to get the selected item - GObjectClass *klass = G_OBJECT_GET_CLASS(obj); //to deduce the object's type - GType type = G_TYPE_FROM_CLASS(klass); +// GObjectClass *klass = G_OBJECT_GET_CLASS(obj); //to deduce the object's type +// GType type = G_TYPE_FROM_CLASS(klass); const SPAttrDesc *desc; - if (type == SP_TYPE_ANCHOR) +// if (type == SP_TYPE_ANCHOR) + if (SP_IS_ANCHOR(item)) { desc = anchor_desc; } - else if (type == SP_TYPE_IMAGE) +// else if (type == SP_TYPE_IMAGE) + else if (SP_IS_IMAGE(item)) { Inkscape::XML::Node *ir = obj->getRepr(); const gchar *href = ir->attribute("xlink:href"); -- cgit v1.2.3