Logo Search packages:      
Sourcecode: ardour version File versions  Download package

void * Glib::SignalProxyConnectionNode::notify ( void *  data  )  [static]

Callback that is executed when the slot becomes invalid. This callback is registered in the slot.

Parameters:
data The SignalProxyConnectionNode object (this).

Definition at line 44 of file signalproxy_connectionnode.cc.

References connection_id_, and object_.

Referenced by SignalProxyConnectionNode().

{
  // notification from libsigc++.
  SignalProxyConnectionNode* conn = static_cast<SignalProxyConnectionNode*>(data);

  // If there is no object, this call was triggered from destroy_notify_handler(),
  // because we set conn->object to 0 there:
  if(conn && conn->object_)
  {
    GObject* o = conn->object_;
    conn->object_ = 0;
  
    if(g_signal_handler_is_connected(o, conn->connection_id_)) //We check first, because during destruction, GTK+ sometimes seems to disconnect them for us, before we expect it to.  See bug #87912
    {
      // Disconnecting triggers execution of destroy_notify_handler(), eiter immediately or later:
      //   When the signal handler is currently running. (for instance, if the callback disconnects its own connection)
      //   In that case, destroy_notify_handler() will be called after this whole function has returned.
      // Anyway. destroy_notify_handler() will always be called, so we leave that to do the deletion.

      
      //Forget the connection:
      gulong connection_id = conn->connection_id_;
      conn->connection_id_ = 0;
      
      g_signal_handler_disconnect(o, connection_id);
    }
  }

  return 0; // apparently unused in libsigc++
}


Generated by  Doxygen 1.6.0   Back to index