Code

r11516@tres: ted | 2006-04-26 21:30:18 -0700
[inkscape.git] / src / selection.cpp
index 0b17eefe98d0a5814ff0fef502e885165d78a239..413048f5c230f037312914b0b1bc0a806cd6e5d4 100644 (file)
@@ -98,8 +98,10 @@ void Selection::_emitChanged(bool persist_selection_context/* = false */) {
         if (NULL == _selection_context) {
             _selection_context = desktop()->currentLayer();
             sp_object_ref(_selection_context, NULL);
-            g_signal_connect(G_OBJECT(_selection_context), "release",
-                             G_CALLBACK(&Selection::_releaseSelectionContext), this);
+            _context_release_handler_id = g_signal_connect(
+                                            G_OBJECT(_selection_context), "release",
+                                            G_CALLBACK(&Selection::_releaseSelectionContext),
+                                            this);
         }
     } else {
         _releaseContext(_selection_context);
@@ -474,7 +476,7 @@ SPObject *Selection::_objectForXMLNode(Inkscape::XML::Node *repr) const {
     g_return_val_if_fail(repr != NULL, NULL);
     gchar const *id = repr->attribute("id");
     g_return_val_if_fail(id != NULL, NULL);
-    SPObject *object=SP_DT_DOCUMENT(_desktop)->getObjectById(id);
+    SPObject *object=sp_desktop_document(_desktop)->getObjectById(id);
     g_return_val_if_fail(object != NULL, NULL);
     return object;
 }