g_signal_connect() instead of gtk_signal_connect()



I am using 

	g_signal_connect(G_OBJECT(my_treeview_column), "notify::width",
G_CALLBACK(myfunction), GINT_TO_POINTER(5));

I am defining my callback function as:

	void myfunction(gpointer user_data)

And it does not get called.
However, if I define myfunction to be:

	void myfunction()

It does get called.
This seems pointless because I do not have my user_data! OR my G_OBJECT
passed back to me.  The only way I can identify this to the original signal
is to have a different function name for every signal I connect?

Am I doing something wrong here?

Similarly, I have noticed that If I set a function for each column I wish to
be notified of a width change (e.g. notify_col_1, notify_col_2, etc...) they
ALL are called when I resize ONE column!?  Either I am approaching this all
wrong or GTK should not notify me of ALL columns resizing when plainly (from
printing the widths) they have not changed in size (with the exception of
the column which did change).

Any thoughts/input appreciated.

Regards,
Martyn



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