summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 031c1ce)
raw | patch | inline | side by side (parent: 031c1ce)
author | mental <mental@users.sourceforge.net> | |
Fri, 28 Jul 2006 03:42:38 +0000 (03:42 +0000) | ||
committer | mental <mental@users.sourceforge.net> | |
Fri, 28 Jul 2006 03:42:38 +0000 (03:42 +0000) |
ChangeLog | patch | blob | history | |
src/sp-use-reference.cpp | patch | blob | history | |
src/sp-use-reference.h | patch | blob | history |
diff --git a/ChangeLog b/ChangeLog
index 0f7ee39e57e09d494fcf6fbbf783a023f3b9a822..ce423c3c21d45cd3de045a0d673479410dcecc70 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
* src/dialogs/sp-attribute-widget.cpp,
src/dialogs/sp-attribute-widget.h, src/sp-offset.cpp,
- src/sp-offset.h, src/sp-shape.cpp, src/sp-shape.h:
+ src/sp-offset.h, src/sp-shape.cpp, src/sp-shape.h,
+ src/sp-use-reference.cpp, src/sp-use-reference.h:
switch to sigc++ SPObject signals
index 9e304799876e359a48449e9f8ef7687c2a911953..8e65593c1aef7c2f10ba598941da3d5034aa7b61 100644 (file)
--- a/src/sp-use-reference.cpp
+++ b/src/sp-use-reference.cpp
static void sp_usepath_href_changed(SPObject *old_ref, SPObject *ref, SPUsePath *offset);
static void sp_usepath_move_compensate(NR::Matrix const *mp, SPItem *original, SPUsePath *self);
static void sp_usepath_delete_self(SPObject *deleted, SPUsePath *offset);
-static void sp_usepath_source_modified(SPObject *iSource, guint flags, SPItem *item);
+static void sp_usepath_source_modified(SPObject *iSource, guint flags, SPUsePath *offset);
SPUsePath::SPUsePath(SPObject* i_owner):SPUseReference(i_owner)
{
sourceHref = NULL;
sourceRepr = NULL;
sourceObject = NULL;
+ new (&_modified_connection) sigc::connection();
new (&_delete_connection) sigc::connection();
new (&_changed_connection) sigc::connection();
new (&_transformed_connection) sigc::connection();
quit_listening();
unlink();
+ _modified_connection.~connection();
_delete_connection.~connection();
_changed_connection.~connection();
_transformed_connection.~connection();
sourceRepr = SP_OBJECT_REPR(to);
_delete_connection = to->connectDelete(sigc::bind(sigc::ptr_fun(&sp_usepath_delete_self), this));
_transformed_connection = SP_ITEM(to)->connectTransformed(sigc::bind(sigc::ptr_fun(&sp_usepath_move_compensate), this));
- _modified_connection = g_signal_connect(G_OBJECT(to), "modified", G_CALLBACK(sp_usepath_source_modified), this);
+ _modified_connection = to->connectModified(sigc::bind<2>(sigc::ptr_fun(&sp_usepath_source_modified), this));
}
void
if ( sourceObject == NULL ) {
return;
}
- g_signal_handler_disconnect(sourceObject, _modified_connection);
+ _modified_connection.disconnect();
_delete_connection.disconnect();
_transformed_connection.disconnect();
sourceRepr = NULL;
}
static void
-sp_usepath_source_modified(SPObject *iSource, guint flags, SPItem *item)
+sp_usepath_source_modified(SPObject *iSource, guint flags, SPUsePath *offset)
{
- SPUsePath *offset = (SPUsePath*)item;
offset->sourceDirty = true;
offset->owner->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
}
diff --git a/src/sp-use-reference.h b/src/sp-use-reference.h
index 910ac709f80d5188d67a9b598bfbda689afae132..6feaaa1ed95255aca08d04e4345075d8662e43fd 100644 (file)
--- a/src/sp-use-reference.h
+++ b/src/sp-use-reference.h
Inkscape::XML::Node *sourceRepr;
SPObject *sourceObject;
- gulong _modified_connection;
+ sigc::connection _modified_connection;
sigc::connection _delete_connection;
sigc::connection _changed_connection;
sigc::connection _transformed_connection;