Re: Events in 2.0



Boris_Shingarov OTI COM writes:
While trying to port our app from 1.2 to 2.0, I found that I no longer get 
certain signals.  For example, I used to say:

gtk_signal_connect (GTK_OBJECT(window), "delete-event", f, CONST_DELETE);
gtk_signal_connect (GTK_OBJECT(window), "size-allocate", f,
CONST_DELETE);

These should still occur, they do in most programs or GTK wouldn't
work at all. "window" is a GtkWindow, right?

but now in 2.0 I don't get these signals.
Also, the doc is kind of slim on the new g_signal_* functions; anyone 
knows of an easy path to transition to those?

The easiest path is to just keep using gtk_signal_connect(), it's not
actively harmful to do so.

Other than that the mapping is:

 gtk_signal_connect -> g_signal_connect
 gtk_signal_connect_after -> g_signal_connect_after
 gtk_signal_connect_object -> g_signal_connect_swapped
 gtk_signal_connect_while_alive -> g_signal_connect_object

The last two are confusing since the meaning of "object" was
rationalized (it previously meant "swapped", now it means "the user
data is an object so set up while alive connections")

Havoc



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