Gtk--: how to disconnect (Button) objects


I'm doing a connect_to_method onto a button (Gtk+1.0.5, Gtk--0.9.11)
which works just fine. The problem I have is how to disconnect the
button at a later stage.

I'm doing the following:


Connection          *connect;
Gtk_Button          button;

connect_to_method (button.clicked, this, &callbackMethod);

... snip ...

// 1st try
//connect = (Connection *)(button.clicked)    // doesn't compile

// the disconnect call dumps core
connect = (Connection *)(&button);
connect->disconnect ();

... snip ...


The gtk-- example code (, uses connections to
but I can't quite figure out how these connections work and how to apply
them to the situation scetched above. I'd appreciate a pointer (or two)
about how to achieve this ...

--> Robert

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