Re: Nesting gtk_main ?
- From: Tadej Borovšak <tadeboro gmail com>
- To: Martin Vejnár <avakar ratatanek cz>
- Cc: gtk-list <gtk-list gnome org>
- Subject: Re: Nesting gtk_main ?
- Date: Sun, 31 Jan 2010 19:22:26 +0100
2010/1/31 Martin Vejnár <avakar ratatanek cz>:
> On 1/30/2010 10:30 PM, jcupitt gmail com wrote:
>> On 30 January 2010 18:48, Siddu<siddu sjce gmail com> wrote:
>>> Assuming i have two different windows window1 and window2
>>> can the events or signals on each of them be processed concurrently with
>>> gtk_main( one for window1 and other for window2) being isolated under
>>> own GMainContexts (maybe in two threads) ?
>> A single gtk_main will run multiple independent windows. You only need
>> to nest them if you want a modal dialog.
> What should you do if you want to run two dialog boxes at the same time?
If you don't want them to interfere with the rest of the GUI, you
simply don't use gtk_dialog_run(). Instead, you show dialogs using
gtk_widget_show() and all windows will run without interference. After
all, gtk_dialog_run() is merely a convenience method that makes it
easy to use dialogs that need urgent user intervention. If you don't
need this kind of functionality from dialog, simply showing it will
tadeboro gmail com
tadej borovsak gmail com
] [Thread Prev