[glibmm/sigc3] sigc++-3.0: SignalProxyConnectionNode: Derive from sigc::notifiable.



commit a5f00040e22e3a4eb71e9c4226493c37625cb477
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon Mar 7 10:20:05 2016 +0100

    sigc++-3.0: SignalProxyConnectionNode: Derive from sigc::notifiable.

 glib/glibmm/signalproxy_connectionnode.cc |    6 ++----
 glib/glibmm/signalproxy_connectionnode.h  |    4 ++--
 2 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/glib/glibmm/signalproxy_connectionnode.cc b/glib/glibmm/signalproxy_connectionnode.cc
index d4d0855..8603e76 100644
--- a/glib/glibmm/signalproxy_connectionnode.cc
+++ b/glib/glibmm/signalproxy_connectionnode.cc
@@ -41,8 +41,8 @@ SignalProxyConnectionNode::SignalProxyConnectionNode(sigc::slot_base&& slot, GOb
 // notify is a message coming up from the slot to be passed back to Gtk+
 // disconnect is a message coming up from the Gtk+ to be passed down to SigC++
 // static
-void*
-SignalProxyConnectionNode::notify(void* data)
+void
+SignalProxyConnectionNode::notify(sigc::notifiable* data)
 {
   // notification from libsigc++.
   SignalProxyConnectionNode* conn = static_cast<SignalProxyConnectionNode*>(data);
@@ -73,8 +73,6 @@ SignalProxyConnectionNode::notify(void* data)
       g_signal_handler_disconnect(o, connection_id);
     }
   }
-
-  return nullptr; // apparently unused in libsigc++
 }
 
 // static
diff --git a/glib/glibmm/signalproxy_connectionnode.h b/glib/glibmm/signalproxy_connectionnode.h
index 1b226ed..0384ad9 100644
--- a/glib/glibmm/signalproxy_connectionnode.h
+++ b/glib/glibmm/signalproxy_connectionnode.h
@@ -37,7 +37,7 @@ namespace Glib
   * It lives between the layer of Gtk+ and libsigc++.
   * It is very much an internal class.
   */
-class SignalProxyConnectionNode
+class SignalProxyConnectionNode : public sigc::notifiable
 {
 public:
   /** @param slot The signal handler for the glib signal.
@@ -56,7 +56,7 @@ public:
    * This callback is registered in the slot.
    * @param data The SignalProxyConnectionNode object (@p this).
    */
-  static void* notify(void* data);
+  static void notify(sigc::notifiable* data);
 
   /** Callback that is executed when the glib closure is destroyed.
    * @param data The SignalProxyConnectionNode object (@p this).


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]