summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9b00d76)
raw | patch | inline | side by side (parent: 9b00d76)
author | mental <mental@users.sourceforge.net> | |
Wed, 26 Jul 2006 12:19:15 +0000 (12:19 +0000) | ||
committer | mental <mental@users.sourceforge.net> | |
Wed, 26 Jul 2006 12:19:15 +0000 (12:19 +0000) |
ChangeLog | patch | blob | history | |
src/style.cpp | patch | blob | history | |
src/style.h | patch | blob | history |
diff --git a/ChangeLog b/ChangeLog
index 6cd34087e1d7c3b66b9def04b965175c757a9a10..ae6a784f53c1b622e1216480b45f9ae8bc69ba5f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
+2006-07-26 MenTaLguY <mental@rydia.net>
+
+ * src/style.cpp, src/style.h:
+
+ finish switching to sigc++ SPObject signals for SPStyle
+
2006-07-25 MenTaLguY <mental@rydia.net>
* src/widgets/gradient-vector.cpp, src/widgets/gradient-vector.h:
diff --git a/src/style.cpp b/src/style.cpp
index 6b5a953fd2e758526e67497be1afe979bab7116d..0eb8b0869cbcd28463ff48f1464b1e1ec303aed2 100644 (file)
--- a/src/style.cpp
+++ b/src/style.cpp
style->fill_hreffed = false;
style->stroke_hreffed = false;
+ new (&style->release_connection) sigc::connection();
+
new (&style->fill_release_connection) sigc::connection();
new (&style->fill_modified_connection) sigc::connection();
SPStyle *style = sp_style_new();
style->object = object;
- g_signal_connect(G_OBJECT(object), "release", G_CALLBACK(sp_style_object_release), style);
+ style->release_connection = object->connectRelease(sigc::bind<1>(sigc::ptr_fun(&sp_style_object_release), style));
if (object && SP_OBJECT_IS_CLONED(object)) {
style->cloned = true;
style->refcount -= 1;
if (style->refcount < 1) {
- if (style->object)
- g_signal_handlers_disconnect_matched(G_OBJECT(style->object),
- G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, style);
+ style->release_connection.disconnect();
+ style->release_connection.~connection();
if (style->text) sp_text_style_unref(style->text);
sp_style_paint_clear(style, &style->fill);
sp_style_paint_clear(style, &style->stroke);
diff --git a/src/style.h b/src/style.h
index 9a70881de927a462d783b107eaaa720e14fd1bfe..1cc4b5a106e595058e8abc1259d397852936cd06 100644 (file)
--- a/src/style.h
+++ b/src/style.h
bool fill_hreffed;
bool stroke_hreffed;
+ sigc::connection release_connection;
+
sigc::connection fill_release_connection;
sigc::connection fill_modified_connection;