summaryrefslogtreecommitdiffstats
path: root/src/knot-holder-entity.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/knot-holder-entity.cpp')
-rw-r--r--src/knot-holder-entity.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/knot-holder-entity.cpp b/src/knot-holder-entity.cpp
index 043685460..6471124ec 100644
--- a/src/knot-holder-entity.cpp
+++ b/src/knot-holder-entity.cpp
@@ -34,7 +34,7 @@ void KnotHolderEntity::create(SPDesktop *desktop, SPItem *item, KnotHolder *pare
const gchar *tip,
SPKnotShapeType shape, SPKnotModeType mode, guint32 color)
{
- knot = sp_knot_new(desktop, tip);
+ knot = new SPKnot(desktop, tip);
this->parent_holder = parent;
this->item = item; // TODO: remove the item either from here or from knotholder.cpp
@@ -52,11 +52,11 @@ void KnotHolderEntity::create(SPDesktop *desktop, SPItem *item, KnotHolder *pare
g_object_set (G_OBJECT(knot->item), "fill_color", color, NULL);
update_knot();
- sp_knot_show(knot);
+ knot->show();
- _moved_connection = knot->_moved_signal.connect(sigc::mem_fun(*parent_holder, &KnotHolder::knot_moved_handler));
- _click_connection = knot->_click_signal.connect(sigc::mem_fun(*parent_holder, &KnotHolder::knot_clicked_handler));
- _ungrabbed_connection = knot->_ungrabbed_signal.connect(sigc::mem_fun(*parent_holder, &KnotHolder::knot_ungrabbed_handler));
+ _moved_connection = knot->moved_signal.connect(sigc::mem_fun(*parent_holder, &KnotHolder::knot_moved_handler));
+ _click_connection = knot->click_signal.connect(sigc::mem_fun(*parent_holder, &KnotHolder::knot_clicked_handler));
+ _ungrabbed_connection = knot->ungrabbed_signal.connect(sigc::mem_fun(*parent_holder, &KnotHolder::knot_ungrabbed_handler));
}
@@ -68,7 +68,8 @@ KnotHolderEntity::~KnotHolderEntity()
/* unref should call destroy */
if (knot) {
- g_object_unref(knot);
+ //g_object_unref(knot);
+ knot_unref(knot);
} else {
// FIXME: This shouldn't occur. Perhaps it is caused by LPE PointParams being knotholder entities, too
// If so, it will likely be fixed with upcoming refactoring efforts.
@@ -84,7 +85,7 @@ KnotHolderEntity::update_knot()
Geom::Point dp(knot_get() * i2dt);
_moved_connection.block();
- sp_knot_set_position(knot, dp, SP_KNOT_STATE_NORMAL);
+ knot->setPosition(dp, SP_KNOT_STATE_NORMAL);
_moved_connection.unblock();
}