summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fad6f10)
raw | patch | inline | side by side (parent: fad6f10)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Mon, 6 Feb 2006 01:56:17 +0000 (01:56 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Mon, 6 Feb 2006 01:56:17 +0000 (01:56 +0000) |
src/style.cpp | patch | blob | history | |
src/style.h | patch | blob | history |
diff --git a/src/style.cpp b/src/style.cpp
index 9dd9503614f663e7172c7e41ec63459673ee3c0c..e0a1dcc7d2bdaad8a62f85d9c88e61c3baae2c5c 100644 (file)
--- a/src/style.cpp
+++ b/src/style.cpp
style->cloned = false;
style->hreffed = false;
+ style->listening = false;
return style;
}
@@ -2009,6 +2010,7 @@ sp_style_merge_ipaint(SPStyle *style, SPIPaint *paint, SPIPaint const *parent)
G_CALLBACK(sp_style_paint_server_release), style);
g_signal_connect(G_OBJECT(paint->value.paint.server), "modified",
G_CALLBACK(sp_style_paint_server_modified), style);
+ style->listening = true;
}
}
break;
@@ -2863,6 +2865,7 @@ sp_style_read_ipaint(SPIPaint *paint, gchar const *str, SPStyle *style, SPDocume
G_CALLBACK(sp_style_paint_server_release), style);
g_signal_connect(G_OBJECT(paint->value.paint.server), "modified",
G_CALLBACK(sp_style_paint_server_modified), style);
+ style->listening = true;
}
} else {
paint->value.paint.server = NULL;
if (hunref && (paint->type == SP_PAINT_TYPE_PAINTSERVER) && paint->value.paint.server) {
if (style->hreffed) {
sp_object_hunref(SP_OBJECT(paint->value.paint.server), style);
+ style->hreffed = false;
}
- if (style->object || style->cloned) {
+ if (style->listening) {
g_signal_handlers_disconnect_matched(G_OBJECT(paint->value.paint.server),
G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, style);
+ style->listening = false;
}
paint->value.paint.server = NULL;
paint->value.paint.uri = NULL;
diff --git a/src/style.h b/src/style.h
index ba1900bde8265103285729d3dcdaa61bdc4ef5bb..333344ad9b2fd280b21d645cc1b8805d56022a38 100644 (file)
--- a/src/style.h
+++ b/src/style.h
bool cloned;
/// style has hreffed its paintservers, needs to release
bool hreffed;
+ /// style is listening to changes in paintservers, need to disconnect
+ bool listening;
};
SPStyle *sp_style_new();