summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7281529)
raw | patch | inline | side by side (parent: 7281529)
author | mental <mental@users.sourceforge.net> | |
Fri, 21 Jul 2006 19:22:44 +0000 (19:22 +0000) | ||
committer | mental <mental@users.sourceforge.net> | |
Fri, 21 Jul 2006 19:22:44 +0000 (19:22 +0000) |
ChangeLog | patch | blob | history | |
src/document-subset.cpp | patch | blob | history |
diff --git a/ChangeLog b/ChangeLog
index 7d4312a70b2f3781450f94f15c6cbeb39ac58e59..e3b8437820e9e65566e79739634f078ef1476afe 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
+2006-07-21 MenTaLguY <mental@rydia.net>
+
+ * src/document-subset.cpp:
+
+ switch to sigc++ signal for "release"
+
2006-07-21 MenTaLguY <mental@rydia.net>
* src/selection.cpp, src/selection.h:
index 4ef547320a292cec1dca48c9b1a5161107dbee69..5fcf1641cf80d26052816317ed244686e845bcd6 100644 (file)
--- a/src/document-subset.cpp
+++ b/src/document-subset.cpp
SPObject *parent;
Siblings children;
- gulong release_connection;
+ sigc::connection release_connection;
sigc::connection position_changed_connection;
- Record() : parent(NULL), release_connection(0) {}
+ Record() : parent(NULL) {}
unsigned childIndex(SPObject *obj) {
Siblings::iterator found;
sp_object_ref(obj);
Record &record=records[obj];
record.release_connection
- = g_signal_connect(obj, "release",
- (GCallback)&Relations::_release_object, this);
+ = obj->connectRelease(
+ sigc::mem_fun(this, &Relations::_release_object)
+ );
record.position_changed_connection
= obj->connectPositionChanged(
sigc::mem_fun(this, &Relations::reorder)
void _doRemove(SPObject *obj) {
Record &record=records[obj];
- if (record.release_connection) {
- g_signal_handler_disconnect(obj, record.release_connection);
- record.release_connection = 0;
- }
+ record.release_connection.disconnect();
record.position_changed_connection.disconnect();
records.erase(obj);
}
}
- static void _release_object(SPObject *obj, void *relations_p) {
- Relations &relations=*static_cast<Relations *>(relations_p);
- if (relations.get(obj)) {
- relations.remove(obj, true);
+ void _release_object(SPObject *obj) {
+ if (get(obj)) {
+ remove(obj, true);
}
}
};