glib: connectSignal() + handler for single parameter

The handler for signals with one parameter was missing.
This commit is contained in:
Patrick Ohly 2012-09-25 11:01:35 +02:00
parent 6e5ee269fb
commit 0e2b68d88f

View file

@ -162,6 +162,15 @@ template<> struct GObjectSignalHandler<void ()> {
}
}
};
template<class A1> struct GObjectSignalHandler<void (A1)> {
static void handler(A1 a1, gpointer data) throw () {
try {
(*reinterpret_cast< boost::function<void (A1)> *>(data))(a1);
} catch (...) {
Exception::handle(HANDLE_EXCEPTION_FATAL);
}
}
};
template<class A1, class A2> struct GObjectSignalHandler<void (A1, A2)> {
static void handler(A1 a1, A2 a2, gpointer data) throw () {
try {