summaryrefslogtreecommitdiffstats
path: root/src/sp-title.cpp
diff options
context:
space:
mode:
authorMarkus Engel <markus.engel@tum.de>2013-03-29 23:52:42 +0000
committerMarkus Engel <markus.engel@tum.de>2013-03-29 23:52:42 +0000
commita168040d5a452544328a1e6ad35aaac351f94d44 (patch)
treefae1ba829f543a473da281bd5fa6e4deabbf6912 /src/sp-title.cpp
parentRemoved function pointers from SPObject and subclasses. (diff)
parentDutch translation update (diff)
downloadinkscape-a168040d5a452544328a1e6ad35aaac351f94d44.tar.gz
inkscape-a168040d5a452544328a1e6ad35aaac351f94d44.zip
merged from trunk
(bzr r11608.1.56)
Diffstat (limited to 'src/sp-title.cpp')
-rw-r--r--src/sp-title.cpp40
1 files changed, 3 insertions, 37 deletions
diff --git a/src/sp-title.cpp b/src/sp-title.cpp
index e3f26b71a..c51478abc 100644
--- a/src/sp-title.cpp
+++ b/src/sp-title.cpp
@@ -16,40 +16,11 @@
#include "sp-title.h"
#include "xml/repr.h"
-static void sp_title_class_init(SPTitleClass *klass);
-static void sp_title_init(SPTitle *rect);
-static Inkscape::XML::Node *sp_title_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
-
-static SPObjectClass *title_parent_class;
-
-GType
-sp_title_get_type (void)
-{
- static GType title_type = 0;
-
- if (!title_type) {
- GTypeInfo title_info = {
- sizeof (SPTitleClass),
- NULL, NULL,
- (GClassInitFunc) sp_title_class_init,
- NULL, NULL,
- sizeof (SPTitle),
- 16,
- (GInstanceInitFunc) sp_title_init,
- NULL, /* value_table */
- };
- title_type = g_type_register_static (SP_TYPE_OBJECT, "SPTitle", &title_info, (GTypeFlags)0);
- }
- return title_type;
-}
+G_DEFINE_TYPE(SPTitle, sp_title, SP_TYPE_OBJECT);
static void
sp_title_class_init(SPTitleClass *klass)
{
- SPObjectClass *sp_object_class = (SPObjectClass *) klass;
- title_parent_class = (SPObjectClass *) g_type_class_ref(SP_TYPE_OBJECT);
-
-// sp_object_class->write = sp_title_write;
}
CTitle::CTitle(SPTitle* title) : CObject(title) {
@@ -63,6 +34,8 @@ static void
sp_title_init(SPTitle *desc)
{
desc->ctitle = new CTitle(desc);
+
+ delete desc->cobject;
desc->cobject = desc->ctitle;
}
@@ -78,10 +51,3 @@ Inkscape::XML::Node* CTitle::onWrite(Inkscape::XML::Document *xml_doc, Inkscape:
return repr;
}
-/**
- * Writes it's settings to an incoming repr object, if any.
- */
-static Inkscape::XML::Node *sp_title_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags)
-{
- return ((SPTitle*)object)->ctitle->onWrite(doc, repr, flags);
-}