summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 02a3bc1)
raw | patch | inline | side by side (parent: 02a3bc1)
author | mental <mental@users.sourceforge.net> | |
Sat, 29 Jul 2006 21:12:13 +0000 (21:12 +0000) | ||
committer | mental <mental@users.sourceforge.net> | |
Sat, 29 Jul 2006 21:12:13 +0000 (21:12 +0000) |
ChangeLog | patch | blob | history | |
src/sp-pattern.cpp | patch | blob | history | |
src/sp-pattern.h | patch | blob | history |
diff --git a/ChangeLog b/ChangeLog
index 9cb88be4f034ac5ad122a93a67bef581cdf1d9c6..af5c3eb0b2c653b3e85e007ba7aafacf97173442 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
2006-06-29 MenTaLguY <mental@rydia.net>
* src/desktop.cpp, src/desktop.h, src/sp-gradient.cpp,
- src/sp-gradient.cpp, src/widgets/desktop-widget.cpp,
- src/widgets/desktop-widget.h, src/widgets/gradient-image.cpp,
- src/widgets/gradient-image.h, src/widgets/gradient-toolbar.cpp,
- src/widgets/gradient-toolbar.cpp:
+ src/sp-gradient.h, src/sp-pattern.cpp, src/sp-pattern.h,
+ src/widgets/desktop-widget.cpp, src/widgets/desktop-widget.h,
+ src/widgets/gradient-image.cpp, src/widgets/gradient-image.h,
+ src/widgets/gradient-toolbar.cpp, src/widgets/gradient-toolbar.cpp:
switch to sigc++ SPObject signals
diff --git a/src/sp-pattern.cpp b/src/sp-pattern.cpp
index 85a8ad649634f533bb5c8a6332fa9940e74f77c1..89eeacec4f5d008679b3c8a356ddae8e2d71576a 100644 (file)
--- a/src/sp-pattern.cpp
+++ b/src/sp-pattern.cpp
#include "sp-pattern.h"
#include "xml/repr.h"
+#include <sigc++/functors/ptr_fun.h>
+#include <sigc++/adaptors/bind.h>
+
/*
* Pattern
*/
pat->height.unset();
pat->viewBox_set = FALSE;
+
+ new (&pat->modified_connection) sigc::connection();
}
static void
}
if (pat->ref) {
- if (pat->ref->getObject())
- sp_signal_disconnect_by_data(pat->ref->getObject(), pat);
+ pat->modified_connection.disconnect();
pat->ref->detach();
delete pat->ref;
pat->ref = NULL;
}
+ pat->modified_connection.~connection();
+
if (((SPObjectClass *) pattern_parent_class)->release)
((SPObjectClass *) pattern_parent_class)->release (object);
}
pattern_ref_changed(SPObject *old_ref, SPObject *ref, SPPattern *pat)
{
if (old_ref) {
- sp_signal_disconnect_by_data(old_ref, pat);
+ pat->modified_connection.disconnect();
}
if (SP_IS_PATTERN (ref)) {
- g_signal_connect(G_OBJECT (ref), "modified", G_CALLBACK (pattern_ref_modified), pat);
+ pat->modified_connection = ref->connectModified(sigc::bind<2>(sigc::ptr_fun(&pattern_ref_modified), pat));
}
pattern_ref_modified (ref, 0, pat);
diff --git a/src/sp-pattern.h b/src/sp-pattern.h
index 42cac7a7e1b449980f0b6efc94109495cadef52b..4d49783fc79fd7ecd3c3fa727ca5558fd3e01845 100644 (file)
--- a/src/sp-pattern.h
+++ b/src/sp-pattern.h
#include "sp-paint-server.h"
#include "uri-references.h"
+#include <sigc++/connection.h>
+
class SPPatternReference : public Inkscape::URIReference {
public:
SPPatternReference (SPObject *obj) : URIReference(obj) {}
/* VieBox */
NRRect viewBox;
guint viewBox_set : 1;
+
+ sigc::connection modified_connection;
};
struct SPPatternClass {