dialog communication, abusing gtk_main()?

I'm trying to implement a dialog that works like this:

-create a dialog with text entry.
-give a prompt question.
-when enter is hit ie "activate" signal is emitted,
check to see what the user has inputed

the problem is this. to tell the program to WAIT for the user's input, i use
the line:
"gtk_main()" after creating the dialog with a prompt question.
Now i connect the "activate" signal of the text entry to the function:
so when a prompt is given, the program sleeps by calling gtk_main(). After
the user hits "ENTER", gtk_main_quit() is called which 'awakens' the program
and lets it continue to the next line of code.

it turns out this works but i dont relly like it because it seems rather ad
hoc. as you can see, i'm trying to get GTK to do top down processing ie,
like a normal C program where you prompt the user for input, and the program
continues to the next line of code only after the user has replied.

So my question is, does anyone know a better or more formal way of doing
this without abusing the gtk_main() function? thank you.


FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup

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