From 39b748a4836d6220922867eae0dd5339792033ab Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 3 Feb 2013 16:30:35 +0000 Subject: Fix compilation with GCC 4.6. git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@5038 a436a847-0d15-0410-975c-d299462d15a1 --- ganv/Node.hpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'ganv') diff --git a/ganv/Node.hpp b/ganv/Node.hpp index c9aaa63..4b219e6 100644 --- a/ganv/Node.hpp +++ b/ganv/Node.hpp @@ -38,8 +38,7 @@ public: : Item(GANV_ITEM(g_object_ref(gobj))) { g_signal_connect(gobj, "moved", G_CALLBACK(on_moved), this); - CONNECT_PROP_SIGNAL(gobj, selected, - on_notify, &Node::on_selected) + CONNECT_PROP_SIGNAL(gobj, selected, on_notify_bool, &Node::on_selected) } ~Node() { @@ -86,12 +85,21 @@ private: Glib::wrap(node)->_signal_moved.emit(x, y); } + /* GCC 4.6 can't handle this template static void on_notify(GObject* gobj, GParamSpec* pspec, gpointer signal) { T value; g_object_get(gobj, g_param_spec_get_name(pspec), &value, NULL); ((sigc::signal*)signal)->emit(value); } + */ + static void on_notify_bool(GObject* gobj, + GParamSpec* pspec, + gpointer signal) { + gboolean value; + g_object_get(gobj, g_param_spec_get_name(pspec), &value, NULL); + ((sigc::signal*)signal)->emit(value); + } }; } // namespace Ganv -- cgit v1.2.1