summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8888b6e)
raw | patch | inline | side by side (parent: 8888b6e)
author | mental <mental@users.sourceforge.net> | |
Thu, 27 Jul 2006 03:01:27 +0000 (03:01 +0000) | ||
committer | mental <mental@users.sourceforge.net> | |
Thu, 27 Jul 2006 03:01:27 +0000 (03:01 +0000) |
ChangeLog | patch | blob | history | |
src/dialogs/object-attributes.cpp | patch | blob | history |
diff --git a/ChangeLog b/ChangeLog
index ae6a784f53c1b622e1216480b45f9ae8bc69ba5f..6b6adff27f8c7b45adf48ff78221861820af8f3a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
+2006-07-26 MenTaLguY <mental@rydia.net>
+
+ * src/dialogs/object-attributes.cpp:
+
+ switch to sigc++ "release"
+
2006-07-26 MenTaLguY <mental@rydia.net>
* src/style.cpp, src/style.h:
index b62287affd29445bfeb3319e98ba586b5aabbb5a..34f7e44638cf32d3b92bd840fbb26191f01322d2 100644 (file)
#include "sp-anchor.h"
#include "sp-attribute-widget.h"
+#include <sigc++/connection.h>
+#include <sigc++/functors/ptr_fun.h>
+#include <sigc++/adaptors/bind.h>
+
struct SPAttrDesc {
gchar const *label;
gchar const *attribute;
static void
-object_released (GtkObject *object, GtkWidget *widget)
+object_released (SPObject *object, GtkWidget *widget)
{
gtk_widget_destroy (widget);
}
static void
window_destroyed (GtkObject *window, GtkObject *object)
{
- sp_signal_disconnect_by_data (object, window);
+ sigc::connection *release_connection = (sigc::connection *)g_object_get_data(G_OBJECT(window), "release_connection");
+ release_connection->disconnect();
+ delete release_connection;
}
g_signal_connect ( G_OBJECT (w), "destroy",
G_CALLBACK (window_destroyed), object );
- g_signal_connect ( G_OBJECT (object), "release",
- G_CALLBACK (object_released), w );
+ sigc::connection *release_connection = new sigc::connection();
+ *release_connection = object->connectRelease(sigc::bind<1>(sigc::ptr_fun(&object_released), w));
+ g_object_set_data(G_OBJECT(w), "release_connection", release_connection);
gtk_widget_show (w);