summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dfb6350)
raw | patch | inline | side by side (parent: dfb6350)
author | mental <mental@users.sourceforge.net> | |
Fri, 28 Jul 2006 03:29:37 +0000 (03:29 +0000) | ||
committer | mental <mental@users.sourceforge.net> | |
Fri, 28 Jul 2006 03:29:37 +0000 (03:29 +0000) |
ChangeLog | patch | blob | history | |
src/dialogs/sp-attribute-widget.cpp | patch | blob | history | |
src/dialogs/sp-attribute-widget.h | patch | blob | history |
diff --git a/ChangeLog b/ChangeLog
index c1addd3705a2f50be68750447c440d23e612e77f..0f7ee39e57e09d494fcf6fbbf783a023f3b9a822 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
2006-06-27 MenTaLguY <mental@rydia.net>
- * src/sp-offset.cpp, src/sp-offset.h, src/sp-shape.cpp, src/sp-shape.h:
+ * src/dialogs/sp-attribute-widget.cpp,
+ src/dialogs/sp-attribute-widget.h, src/sp-offset.cpp,
+ src/sp-offset.h, src/sp-shape.cpp, src/sp-shape.h:
switch to sigc++ SPObject signals
index 670da965e763d8b10f75b26c6494be42006f3543..d0391a2eccc993d570708ca66288a33ea840481f 100644 (file)
#include "sp-object.h"
#include <glibmm/i18n.h>
+#include <sigc++/functors/ptr_fun.h>
+#include <sigc++/adaptors/bind.h>
+
#include "sp-attribute-widget.h"
static void sp_attribute_widget_class_init (SPAttributeWidgetClass *klass);
spaw->src.object = NULL;
spaw->attribute = NULL;
+
+ new (&spaw->modified_connection) sigc::connection();
+ new (&spaw->release_connection) sigc::connection();
}
if (spaw->hasobj) {
if (spaw->src.object) {
- sp_signal_disconnect_by_data (spaw->src.object, spaw);
+ spaw->modified_connection.disconnect();
+ spaw->release_connection.disconnect();
spaw->src.object = NULL;
}
} else {
spaw->src.repr = Inkscape::GC::release(spaw->src.repr);
}
} // end of if()
+
+ spaw->modified_connection.~connection();
+ spaw->release_connection.~connection();
((GtkObjectClass *) parent_class)->destroy (object);
if (spaw->hasobj) {
if (spaw->src.object) {
- sp_signal_disconnect_by_data (spaw->src.object, spaw);
+ spaw->modified_connection.disconnect();
+ spaw->release_connection.disconnect();
spaw->src.object = NULL;
}
} else {
spaw->blocked = TRUE;
spaw->src.object = object;
- g_signal_connect ( G_OBJECT (object), "modified",
- G_CALLBACK (sp_attribute_widget_object_modified),
- spaw );
- g_signal_connect ( G_OBJECT (object), "release",
- G_CALLBACK (sp_attribute_widget_object_release),
- spaw );
+
+ spaw->modified_connection = object->connectModified(sigc::bind<2>(sigc::ptr_fun(&sp_attribute_widget_object_modified), spaw));
+ spaw->release_connection = object->connectRelease(sigc::bind<1>(sigc::ptr_fun(&sp_attribute_widget_object_release), spaw));
spaw->attribute = g_strdup (attribute);
if (spaw->hasobj) {
if (spaw->src.object) {
- sp_signal_disconnect_by_data (spaw->src.object, spaw);
+ spaw->modified_connection.disconnect();
+ spaw->release_connection.disconnect();
spaw->src.object = NULL;
}
} else {
spat->num_attr = 0;
spat->attributes = NULL;
spat->entries = NULL;
+
+ new (&spat->modified_connection) sigc::connection();
+ new (&spat->release_connection) sigc::connection();
}
static void
if (spat->hasobj) {
if (spat->src.object) {
- sp_signal_disconnect_by_data (spat->src.object, spat);
+ spat->modified_connection.disconnect();
+ spat->release_connection.disconnect();
spat->src.object = NULL;
}
} else {
}
} // end of if()
+ spat->modified_connection.~connection();
+ spat->release_connection.~connection();
if (spat->entries) {
g_free (spat->entries);
if (spat->hasobj) {
if (spat->src.object) {
- sp_signal_disconnect_by_data (spat->src.object, spat);
+ spat->modified_connection.disconnect();
+ spat->release_connection.disconnect();
spat->src.object = NULL;
}
} else {
/* Set up object */
spat->src.object = object;
spat->num_attr = num_attr;
- g_signal_connect ( G_OBJECT (object), "modified",
- G_CALLBACK (sp_attribute_table_object_modified),
- spat );
- g_signal_connect ( G_OBJECT (object), "release",
- G_CALLBACK (sp_attribute_table_object_release),
- spat );
+
+ spat->modified_connection = object->connectModified(sigc::bind<2>(sigc::ptr_fun(&sp_attribute_table_object_modified), spat));
+ spat->modified_connection = object->connectRelease(sigc::bind<1>(sigc::ptr_fun(&sp_attribute_table_object_release), spat));
+
/* Create table */
spat->table = gtk_table_new (num_attr, 2, FALSE);
gtk_container_add (GTK_CONTAINER (spat), spat->table);
if (spat->hasobj) {
if (spat->src.object) {
- sp_signal_disconnect_by_data (spat->src.object, spat);
+ spat->modified_connection.disconnect();
+ spat->release_connection.disconnect();
spat->src.object = NULL;
}
} else {
index d5b2075cedbf3dbb7c2d483e20c19a4a95231c25..dc27c5a247ec3d7e9e9c17a044af5655c8f1172d 100644 (file)
#include <glib.h>
-
+#include <sigc++/connection.h>
#define SP_TYPE_ATTRIBUTE_WIDGET (sp_attribute_widget_get_type ())
#define SP_ATTRIBUTE_WIDGET(obj) (GTK_CHECK_CAST ((obj), SP_TYPE_ATTRIBUTE_WIDGET, SPAttributeWidget))
Inkscape::XML::Node *repr;
} src;
gchar *attribute;
+
+ sigc::connection modified_connection;
+ sigc::connection release_connection;
};
struct SPAttributeWidgetClass {
gint num_attr;
gchar **attributes;
GtkWidget **entries;
+
+ sigc::connection modified_connection;
+ sigc::connection release_connection;
};
struct SPAttributeTableClass {