dialog communication, abusing gtk_main()?
- From: Swee Lim <lim_1 mail com>
- To: gtk-list redhat com
- Subject: dialog communication, abusing gtk_main()?
- Date: Fri, 17 Mar 2000 13:16:07 -0500 (EST)
Hello,
I'm trying to implement a dialog that works like this:
-create a dialog with text entry.
-give a prompt question.
-WAIT FOR INPUT
-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:
gtk_main_quit()
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.
sl248
______________________________________________
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]