summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4cf78b2)
raw | patch | inline | side by side (parent: 4cf78b2)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Mon, 2 Jul 2007 19:04:27 +0000 (19:04 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Mon, 2 Jul 2007 19:04:27 +0000 (19:04 +0000) |
src/sp-filter.cpp | patch | blob | history | |
src/sp-filter.h | patch | blob | history |
diff --git a/src/sp-filter.cpp b/src/sp-filter.cpp
index 11aa30e0bc37d8d2bc74b70cd10b38d1ffa2b1e2..aae143e8d608b594bcbd0673d558d91517503972 100644 (file)
--- a/src/sp-filter.cpp
+++ b/src/sp-filter.cpp
filter->_renderer = NULL;
filter->_image_name = map<gchar *, int, ltstr>();
+
+ new (&filter->modified_connection) sigc::connection();
}
/**
//release href
if (filter->href) {
- if (filter->href->getObject()) {
- sp_signal_disconnect_by_data(filter->href->getObject(), filter);
- }
+ filter->modified_connection.disconnect();
filter->href->detach();
delete filter->href;
filter->href = NULL;
}
+ filter->modified_connection.~connection();
+
if (((SPObjectClass *) filter_parent_class)->release)
((SPObjectClass *) filter_parent_class)->release(object);
}
filter_ref_changed(SPObject *old_ref, SPObject *ref, SPFilter *filter)
{
if (old_ref) {
- sp_signal_disconnect_by_data(old_ref, filter);
+ filter->modified_connection.disconnect();
}
if ( SP_IS_FILTER(ref)
&& ref != filter )
{
- ref->connectModified(sigc::bind(sigc::ptr_fun(&filter_ref_modified), filter));
- //g_signal_connect(G_OBJECT(ref), "modified", G_CALLBACK(filter_ref_modified), filter);
+ filter->modified_connection =
+ ref->connectModified(sigc::bind(sigc::ptr_fun(&filter_ref_modified), filter));
}
filter_ref_modified(ref, 0, filter);
diff --git a/src/sp-filter.h b/src/sp-filter.h
index c6edc6c65caf8407033c91b8f86056e0aac619e5..9c4e7aaf6e405625beb1cad2ab9853e23836de64 100644 (file)
--- a/src/sp-filter.h
+++ b/src/sp-filter.h
NumberOptNumber filterRes;
/** HREF attribute */
SPFilterReference *href;
+ sigc::connection modified_connection;
NR::Filter *_renderer;