diff options
| author | Markus Engel <markus.engel@tum.de> | 2013-03-29 23:52:42 +0000 |
|---|---|---|
| committer | Markus Engel <markus.engel@tum.de> | 2013-03-29 23:52:42 +0000 |
| commit | a168040d5a452544328a1e6ad35aaac351f94d44 (patch) | |
| tree | fae1ba829f543a473da281bd5fa6e4deabbf6912 /src/sp-switch.cpp | |
| parent | Removed function pointers from SPObject and subclasses. (diff) | |
| parent | Dutch translation update (diff) | |
| download | inkscape-a168040d5a452544328a1e6ad35aaac351f94d44.tar.gz inkscape-a168040d5a452544328a1e6ad35aaac351f94d44.zip | |
merged from trunk
(bzr r11608.1.56)
Diffstat (limited to 'src/sp-switch.cpp')
| -rw-r--r-- | src/sp-switch.cpp | 32 |
1 files changed, 5 insertions, 27 deletions
diff --git a/src/sp-switch.cpp b/src/sp-switch.cpp index 2c98c54fc..f4c5d8a49 100644 --- a/src/sp-switch.cpp +++ b/src/sp-switch.cpp @@ -25,35 +25,11 @@ #include <sigc++/functors/ptr_fun.h> #include <sigc++/adaptors/bind.h> -static void sp_switch_class_init (SPSwitchClass *klass); -static void sp_switch_init (SPSwitch *group); - -static SPGroupClass * parent_class; - -GType SPSwitch::getType (void) -{ - static GType switch_type = 0; - if (!switch_type) { - GTypeInfo switch_info = { - sizeof (SPSwitchClass), - NULL, /* base_init */ - NULL, /* base_finalize */ - (GClassInitFunc) sp_switch_class_init, - NULL, /* class_finalize */ - NULL, /* class_data */ - sizeof (SPSwitch), - 16, /* n_preallocs */ - (GInstanceInitFunc) sp_switch_init, - NULL, /* value_table */ - }; - switch_type = g_type_register_static (SP_TYPE_GROUP, "SPSwitch", &switch_info, (GTypeFlags)0); - } - return switch_type; -} +G_DEFINE_TYPE(SPSwitch, sp_switch, SP_TYPE_GROUP); static void -sp_switch_class_init (SPSwitchClass *) { - parent_class = (SPGroupClass *)g_type_class_ref (SP_TYPE_GROUP); +sp_switch_class_init (SPSwitchClass *) +{ } CSwitch::CSwitch(SPSwitch* sw) : CGroup(sw) { @@ -66,6 +42,8 @@ CSwitch::~CSwitch() { static void sp_switch_init (SPSwitch *sw) { sw->cswitch = new CSwitch(sw); + + delete sw->cgroup; sw->cgroup = sw->cswitch; sw->clpeitem = sw->cswitch; sw->citem = sw->cswitch; |
