How to *not* destroy widgets after gtk_main_quit
- From: Frank Boehme <f boehme cs ucc ie>
- To: gtk-list gnome org
- Subject: How to *not* destroy widgets after gtk_main_quit
- Date: Mon, 29 Apr 2002 16:46:55 +0100
This must have been answered before but I cannot find the right poiters
in the dox or the mailing list archive. Sorry if this is an obvious FAQ.
I am not a fluent gtk programmer. I am writing a framework in GNU-Eiffel
using the EXG bindings to gtk. But my question only concerns gtk.
It is my understanding that gtk_main_quit exits the currently running
innermost event loop while gtk_exit exits the whole application.
But it seems to me that whenever the outermost event loop exits, all my
widgets are destroyed even if the program does not exit. What I want to
achieve is control flow which is controled by code *other* than (or a)
main event loop. In fact, I want to have a the GUI code (on Eiffel level
this will be a singleton) *being* called by other functions which either
modify widgets (output) or ask the user to input things (using the mouse
or whatever). So, for example, I thought I could after creating my
windget tree and doing all necessary intitializations call an 'input
function' which looks like this:
/* wait for the right events and process them */
/* no other event loop is running anymore */
But this kills the widgets as soon as no event loop is running anymore
(the program still does other stuff).
So it seems that by default all existing widgets are already registered
for destruction with gtk_quit_add_destroy (). How can I undo this
Any thoughts appreciated.
Dr Frank Boehme | Email: f boehme cs ucc ie
National University of Ireland, Cork | phone: +353-21-4903163
Dept of Computer Science | fax: +353-21-4903113
Cork, Ireland |
] [Thread Prev