Gus Koppel wrote:

> Vladimir wrote:
> 
> > There are two uses of GTK+ in non-main threads:
> > 1. error reporting via message boxes and 
> > 2. adding text (which comes from network) to GUI windows.
> 
> Btw, if you don't use modal message box dialogs then there is absolutely
> no need to use multiple threads (aka one to receive, the other one to
> display) at all. One single thread can perfectly handle this chain of
> actions:
> - wait for data from network and receive into buffer if there's any
> - add received buffer data to a text display
> - open a (non-modal) message box to report errors if there are any
> 
> The non-modality of the dialog assures that reception anmd display of
> incoming data would continue at the same time.

Sorry for talking with myself, but I think that in fact it doesn't
matter whether there's a non-modal or modal dialog. Single-threaded,
asynchronous data reception and visualization (inside a main window) can
still be accomplished, since a modal dialog should not block input
sources or idle or timeout handlers of a main loop, if I'm not mistaken.
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to