summaryrefslogtreecommitdiffstats
path: root/src/select-context.cpp
diff options
context:
space:
mode:
authorMarkus Engel <markus.engel@tum.de>2013-04-20 19:16:13 +0000
committerMarkus Engel <markus.engel@tum.de>2013-04-20 19:16:13 +0000
commit1227ca0189590b281116fcc808bdd8c674b2196c (patch)
tree9ce1978824c1baaba62865364c7e45aee7b42cd9 /src/select-context.cpp
parentReplaced casting macros for EventContext tree; added contructors. (diff)
downloadinkscape-1227ca0189590b281116fcc808bdd8c674b2196c.tar.gz
inkscape-1227ca0189590b281116fcc808bdd8c674b2196c.zip
Further changes to EventContexts; they work without GObject
(bzr r11608.1.97)
Diffstat (limited to 'src/select-context.cpp')
-rw-r--r--src/select-context.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/select-context.cpp b/src/select-context.cpp
index 604b4c7cc..085ac1532 100644
--- a/src/select-context.cpp
+++ b/src/select-context.cpp
@@ -155,6 +155,42 @@ sp_select_context_init(SPSelectContext *sc)
new (sc) SPSelectContext();
}
+SPSelectContext::~SPSelectContext() {
+ SPSelectContext *sc = SP_SELECT_CONTEXT(this);
+ SPEventContext * ec = SP_EVENT_CONTEXT (this);
+
+ ec->enableGrDrag(false);
+
+ if (sc->grabbed) {
+ sp_canvas_item_ungrab(sc->grabbed, GDK_CURRENT_TIME);
+ sc->grabbed = NULL;
+ }
+
+ delete sc->_seltrans;
+ sc->_seltrans = NULL;
+ delete sc->_describer;
+ sc->_describer = NULL;
+
+ if (CursorSelectDragging) {
+#if GTK_CHECK_VERSION(3,0,0)
+ g_object_unref(CursorSelectDragging);
+#else
+ gdk_cursor_unref (CursorSelectDragging);
+#endif
+ CursorSelectDragging = NULL;
+ }
+ if (CursorSelectMouseover) {
+#if GTK_CHECK_VERSION(3,0,0)
+ g_object_unref(CursorSelectMouseover);
+#else
+ gdk_cursor_unref (CursorSelectMouseover);
+#endif
+ CursorSelectMouseover = NULL;
+ }
+
+ //G_OBJECT_CLASS(sp_select_context_parent_class)->dispose(object);
+}
+
static void
sp_select_context_dispose(GObject *object)
{