Signal Handling problems with own data




Hi, I am a newbie in gnome/gtk+ programming, and I have created a GUI that
will perform some sign-in functions with a server. The user interface
consists of a button called Sign-In and two text entries for username and
password.
I have inserted a g_signal_connect function in my program giving it as
arguments the button, the "clicked" signal, and the function on_sign_in
which I have written to perform the communication with the server.
The problem I have is with the fourth argument of the g_signal_connect
function. In the API it says that the last argument should be a gpointer to
data. In my case I want to pass two widgets(the two text entries)so that
when my function is called, to access the two text entries, grab their
contents and validate the username and password with the server. How can I
pass both the text entry widgets to the function that is called after the
emission of the button click signal?
I have read all the examples in the gtk tutorial, I have 3 books on gnome
and gtk but I haven't found a single example which shows how to pass more
that 1 widget to the function.
Do I have to use the Gobject, which function of the API should I use?
And if more than one widgets can be passed to the function, how can I access
them ?

I would appreciate your help very much,
Nicolas.
-- 
View this message in context: 
http://www.nabble.com/Signal-Handling-problems-with-own-data-tf2127300.html#a5869944
Sent from the Gtk+ - Apps Dev forum at Nabble.com.



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