Re: gtk_dialog_run deprecated?



hi;

On 23 March 2012 15:21, Nicolas Soubeiran <nicolas soubeiran gmail com> wrote:
> Hi all,
> I've read  that GTK+ wants to set gtk_dialog_run and gdk_thread_enter/leave API
> I've read messages on why the gdk_thread_enter/leave would be
> deprecated but I saw nothing about gtk_dialog_run.
> I do not understand especially when we can assume that all GDK/GTK+
> calls should be done in the main thread.
> Can someone tell me the reasons?

the rationale is in the comments of Ryan's blog:

  http://blogs.gnome.org/desrt/2012/02/26/sprout-and-the-bean/

especially this one:

  http://blogs.gnome.org/desrt/2012/02/26/sprout-and-the-bean/comment-page-1/#comment-1225

in short: re-entrancy is bad. and even if your code does not call into
gtk from different GMainContexts, there is no guarantee that some code
you're using (e.g. GDBus, or GIO) won't.

GtkDialog is not special enough to require a nested main loop; it
actually detracts from the event-driven programming model that GTK has
been using for ages. modal dialogs have nothing to do with the toolkit
creating another main loop either.

ciao,
 Emmanuele.

-- 
W: http://www.emmanuelebassi.name
B: http://blogs.gnome.org/ebassi/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]