Re: Gtk Printing and gtk_dialog_run



On Wed, 2006-04-19 at 15:47 +0800, James Henstridge wrote:
> Matthias Clasen wrote:
> > On 4/19/06, James Henstridge <james jamesh id au> wrote:
> >   
> >> Paolo Borelli wrote:
> >>     
> >>> I haven't yet looked at the new printing api in detail, but from what I
> >>> quickly gathered the high level api involves a run() method for the
> >>> dialog.
> >>>
> >>> This may be problematic for many apps that have multiple top level
> >>> windows (gedit, epiphany, evince etc) since gtk_dialog_run makes the
> >>> dialog modal to the whole application and not just to the current
> >>> window, thus blocking user interaction on all the windows.
> >>>
> >>> Is this the case?
> >>>
> >>>       
> >> If your different toplevel windows are in separate GtkWindowGroups,
> >> shouldn't the grab only affect other toplevels in the same window group?
> >>     
> >
> > gtk_dialog_run() is not a grab, its a recursive mainloop.
> >   
> But gtk_dialog_run() also makes the dialog modal, which results in a
> grab, right?
> 
>     * gtk_dialog_run() calls gtk_window_set_modal(dialog, TRUE), and
>       shows the dialog
>     * gtk_window_set_modal() and gtk_window_show() call gtk_grab_add()
>       if the window is modal.

I could add a gtk_print_operation_run_async() call that shows the dialog
and then returns to the main mainloop, using signals to drive the dialog
etc. However, even that should really call gtk_window_set_modal on the
print dialog to make it modal to the GtkWindowGroup of that window, so
I'm not sure how much of a difference this makes.

Paolo, does gedit make separate window groups for each toplevel window?

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a fiendish umbrella-wielding photographer from a doomed world. She's a 
scantily clad Bolivian soap star from the wrong side of the tracks. They fight 
crime! 




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