Re: gtk_dialog_run deprecated?


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:

especially this one:

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.



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