[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtk-devel
Subject:    Re: gtk_dialog_run deprecated?
From:       Emmanuele Bassi <ebassi () gmail ! com>
Date:       2012-03-23 15:51:29
Message-ID: CALnHYQE9w=rVd2kUrz5_bx8aXg=3p-7xJN=VH_qr4kh1VgLfJw () mail ! gmail ! com
[Download RAW message or body]

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/
_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic