Waiting for user input


  I'm trying to do a function that display a window with a clist and an
entry and a "OK" button.
I would like that this function wait for the user input (the selection
of an item on the clist, some text on the text entry and the push over
the OK button) and then return, however I think this is not possible
because gtk+ works with the callbacks model so I would have to connect a
signal to the OK button then read the selection and the text on the text
entry and make something with that
data. I have been working this way but now I am needing this same
selection window to do other thing with the data selected on the clist
and the text on text entry so I would not like to create another
function similar to the previous but just changing the data processing
but I would like to
create a function that create the user interface and then I could get
the data selected and entered by the user so I could use that
information anywhere on the program. So my question is how can I create
a function like this? I thought to connect the OK button to some
function that put on some global variables the user input (either from
the clist and the text entry) and then read that global variables but
can't figure out how to make gtk wait for the press on the OK button to
then follow with the reading of the variables.. 


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