Re: [gtk-list] Re: Modality



> > From: Havoc Pennington [mailto:hp@redhat.com]
> >  static GSList* modal_stack = NULL;
> >
> >  void my_app_push_modal(GtkWindow* win)
> >  {
> >    GtkWindow* parent = modal_stack ? modal_stack->data : NULL;
> >    modal_stack = g_slist_prepend(modal_stack, win);
> >
> >    if (parent)
> >     gtk_window_set_transient_for(win, parent);
> >
> >    gtk_window_set_modal(win, TRUE);
> >    gtk_window_set_sensitive(win, FALSE);
                                ^^^ parent ????
> >  }

I agree, nice function :-)

Allan



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