Re: Wait for input
- From: dg tao-group com
- To: gtk-app-devel-list gnome org
- Subject: Re: Wait for input
- Date: Fri, 16 Feb 2001 17:00:38 +0000
Let's say I had a app with a button or menu item to connect to a
server. I can catch that signal and open the connection.
However, if the user has not identified the server, I should
popup a window and get that information. How do I wait until
they have set that value?
I use Gnome, not raw GTK, but the way I'd do it is to use a modal dialogue box.
The gnome_dialog_run_and_close() function call will block until the dialogue
has been closed by the user.
if not server_info:
d = construct_dialogue()
gnome_dialog_run_and_close(d)
server_info = extract_server_info(d)
gnome_dialog_destroy(d)
connect_to_server(server_info)
--
+- David Given ---------------McQ-+
| Work: dg tao-group com | "Premature optimisation is the root of all
| Play: dgiven iname com | evil." --- Don Knuth, quoting Tony Hoare
+- http://wired.st-and.ac.uk/~dg -+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]