diff options
author | David Robillard <d@drobilla.net> | 2013-02-03 16:30:35 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2013-02-03 16:30:35 +0000 |
commit | 39b748a4836d6220922867eae0dd5339792033ab (patch) | |
tree | 2f888e8a7683cf42a7fb5da72cbf27922fde3827 /ganv | |
parent | 4883072dcfabfe0ee5dff955250ea25b13c32563 (diff) | |
download | ganv-39b748a4836d6220922867eae0dd5339792033ab.tar.gz ganv-39b748a4836d6220922867eae0dd5339792033ab.tar.bz2 ganv-39b748a4836d6220922867eae0dd5339792033ab.zip |
Fix compilation with GCC 4.6.
git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@5038 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'ganv')
-rw-r--r-- | ganv/Node.hpp | 12 |
1 files changed, 10 insertions, 2 deletions
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<gboolean>, &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<typename T> 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<bool, T>*)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<bool, gboolean>*)signal)->emit(value); + } }; } // namespace Ganv |