summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7364fef)
raw | patch | inline | side by side (parent: 7364fef)
author | mental <mental@users.sourceforge.net> | |
Fri, 28 Jul 2006 03:18:31 +0000 (03:18 +0000) | ||
committer | mental <mental@users.sourceforge.net> | |
Fri, 28 Jul 2006 03:18:31 +0000 (03:18 +0000) |
ChangeLog | patch | blob | history | |
src/sp-offset.cpp | patch | blob | history | |
src/sp-offset.h | patch | blob | history |
diff --git a/ChangeLog b/ChangeLog
index 8f8d200e9a96bcb4702de7ec9863ff89b65f6079..c1addd3705a2f50be68750447c440d23e612e77f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
2006-06-27 MenTaLguY <mental@rydia.net>
- * src/sp-shape.cpp, src/sp-shape.h:
+ * src/sp-offset.cpp, src/sp-offset.h, src/sp-shape.cpp, src/sp-shape.h:
- switch to sigc++ SPObject signals for SPShape
+ switch to sigc++ SPObject signals
2006-07-26 MenTaLguY <mental@rydia.net>
diff --git a/src/sp-offset.cpp b/src/sp-offset.cpp
index 6aead7a548d0775414c1474adffdf26bcbe8bccd..2253bf1e1170dd7b869304d8aa30da7b09667ebe 100644 (file)
--- a/src/sp-offset.cpp
+++ b/src/sp-offset.cpp
offset->sourceHref = NULL;
offset->sourceRepr = NULL;
offset->sourceObject = NULL;
+ new (&offset->_modified_connection) sigc::connection();
new (&offset->_delete_connection) sigc::connection();
new (&offset->_changed_connection) sigc::connection();
new (&offset->_transformed_connection) sigc::connection();
SPOffset *offset = (SPOffset *) obj;
delete offset->sourceRef;
+
+ offset->_modified_connection.disconnect();
+ offset->_modified_connection.~connection();
+ offset->_delete_connection.disconnect();
offset->_delete_connection.~connection();
+ offset->_changed_connection.disconnect();
offset->_changed_connection.~connection();
+ offset->_transformed_connection.disconnect();
offset->_transformed_connection.~connection();
}
offset->_delete_connection = SP_OBJECT(to)->connectDelete(sigc::bind(sigc::ptr_fun(&sp_offset_delete_self), offset));
offset->_transformed_connection = SP_ITEM(to)->connectTransformed(sigc::bind(sigc::ptr_fun(&sp_offset_move_compensate), offset));
- offset->_modified_connection = g_signal_connect (G_OBJECT (to), "modified", G_CALLBACK (sp_offset_source_modified), offset);
+ offset->_modified_connection = SP_OBJECT(to)->connectModified(sigc::bind<2>(sigc::ptr_fun(&sp_offset_source_modified), offset));
}
static void sp_offset_quit_listening(SPOffset *offset)
if ( offset->sourceObject == NULL )
return;
- g_signal_handler_disconnect (offset->sourceObject, offset->_modified_connection);
+ offset->_modified_connection.disconnect();
offset->_delete_connection.disconnect();
offset->_transformed_connection.disconnect();
diff --git a/src/sp-offset.h b/src/sp-offset.h
index 52c793d0e2849dab8adadfd1ac50150a9bc806fb..08df8a1eac00ffb81f48647481cc25a2a4781747 100644 (file)
--- a/src/sp-offset.h
+++ b/src/sp-offset.h
Inkscape::XML::Node *sourceRepr; ///< the repr associated with that id
SPObject *sourceObject;
- gulong _modified_connection;
+ sigc::connection _modified_connection;
sigc::connection _delete_connection;
sigc::connection _changed_connection;
sigc::connection _transformed_connection;