summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1a71e5d)
raw | patch | inline | side by side (parent: 1a71e5d)
author | mental <mental@users.sourceforge.net> | |
Sat, 29 Jul 2006 22:21:36 +0000 (22:21 +0000) | ||
committer | mental <mental@users.sourceforge.net> | |
Sat, 29 Jul 2006 22:21:36 +0000 (22:21 +0000) |
ChangeLog | patch | blob | history | |
src/sp-object.cpp | patch | blob | history |
diff --git a/ChangeLog b/ChangeLog
index 056d54fc4836ed39490d9caa13a03a8a5546f18f..f62d5305bf99571fc3023b1e5a6e0785bb140640 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
2006-06-29 MenTaLguY <mental@rydia.net>
+ * src/sp-object.cpp:
+
+ remove GObject signals from SPObject
+
* src/desktop.cpp, src/desktop.h, src/sp-gradient.cpp,
src/sp-gradient.h, src/sp-pattern.cpp, src/sp-pattern.h,
src/sp-switch.cpp, src/sp-switch.h, src/widgets/desktop-widget.cpp,
diff --git a/src/sp-object.cpp b/src/sp-object.cpp
index 43611e9edeaed74adfeafd632bd12f24cb665a24..62a442d0a6483c48de2c2e49eb5b54df4014fad2 100644 (file)
--- a/src/sp-object.cpp
+++ b/src/sp-object.cpp
guint update_in_progress = 0; // guard against update-during-update
-enum {RELEASE, MODIFIED, LAST_SIGNAL};
-
Inkscape::XML::NodeEventVector object_event_vector = {
sp_object_repr_child_added,
sp_object_repr_child_removed,
};
static GObjectClass *parent_class;
-static guint object_signals[LAST_SIGNAL] = {0};
/**
* Registers the SPObject class with Gdk and returns its type number.
parent_class = (GObjectClass *) g_type_class_ref(G_TYPE_OBJECT);
- object_signals[RELEASE] = g_signal_new("release",
- G_TYPE_FROM_CLASS(klass),
- (GSignalFlags)(G_SIGNAL_RUN_CLEANUP | G_SIGNAL_NO_RECURSE | G_SIGNAL_NO_HOOKS),
- G_STRUCT_OFFSET(SPObjectClass, release),
- NULL, NULL,
- sp_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
- object_signals[MODIFIED] = g_signal_new("modified",
- G_TYPE_FROM_CLASS(klass),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET(SPObjectClass, modified),
- NULL, NULL,
- sp_marshal_NONE__UINT,
- G_TYPE_NONE, 1, G_TYPE_UINT);
-
object_class->finalize = sp_object_finalize;
klass->child_added = sp_object_child_added;
sp_repr_remove_listener_by_data(this->repr, this);
- g_signal_emit(G_OBJECT(this), object_signals[RELEASE], 0);
+ SPObjectClass *klass=(SPObjectClass *)G_OBJECT_GET_CLASS(this);
+ if (klass->release) {
+ klass->release(this);
+ }
this->_release_signal.emit(this);
/* all hrefs should be released by the "release" handlers */
this->mflags = 0;
g_object_ref(G_OBJECT(this));
- g_signal_emit(G_OBJECT(this), object_signals[MODIFIED], 0, flags);
+ SPObjectClass *klass=(SPObjectClass *)G_OBJECT_GET_CLASS(this);
+ if (klass->modified) {
+ klass->modified(this, flags);
+ }
_modified_signal.emit(this, flags);
g_object_unref(G_OBJECT(this));
}