Re: [gtk-list] Re: signals, objects, user_data and stuff.




 > >   gtk_signal_connect_object (GTK_OBJECT (node1), "moved",
 > > 			     GTK_SIGNAL_FUNC (connector_moved1),
 > > 			     GTK_OBJECT (connector));
 > >   gtk_signal_connect_object (GTK_OBJECT (node2), "moved",
 > > 			     GTK_SIGNAL_FUNC (connector_moved2),
 > > 			     GTK_OBJECT (connector));
 > > 
 > > static void
 > > connector_moved1 (Connector *conn, gdouble dx, gdouble dy, Node *node1)
 > > {
 > >   connector_move_point (conn, get_connection_id (conn, node1));
 > > }
 > > 
 > > static void
 > > connector_moved2 (Connector *conn, gdouble dx, gdouble dy, Node *node2)
 > > {
 > >   connector_move_point (conn, get_connection_id (conn, node2));
 > > }
 > 
 > Could you tell me why you double define connector_moved? I haven't
 > written yet any GTK programm (just keep listening and when the time
 > comes ... :-)) but in which the above is different from

 > gtk_signal_connect_object (GTK_OBJECT(node1), "moved",
 >                         GTK_SIGNAL_FUNC(connector_moved),
 >                         GTK_OBJECT(connector));
 > gtk_signal_connect_object (GTK_OBJECT(node2), "moved",
 >                         GTK_SIGNAL_FUNC(connector_moved),
 >                         GTK_OBJECT(connector));
 > static void
 > connector_moved (Connector *conn, gdouble dx, gdouble dy, Node *node)
 > {
 >     connector_move_point (conn, get_connection_id(conn, node));
 > }

 > The answer: "RTFM _link_to_the_fine_manual_" will do :)).

That's probably my fault.  I used two callbacks in my original
posting, to hack the lack of an index parameter in the call.  It is
not necessary in the code above.

        /mailund



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