[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: blocking operation
- From: Darin Fisher <dfisher jagger me berkeley edu>
- To: gtk-app-devel-list redhat com
- Subject: Re: blocking operation
- Date: Tue, 29 Feb 2000 12:51:20 -0500
gtk_window_set_modal() is only part of the solution. You need to use it in
conjunction with gtk_main() to block the calling thread. The source for
GnomeDialog shows how this is done. Unfortunately, I don't know how to
insert a GtkFileSelection dialog into a GnomeDialog. So, you probably have
to roll your own, or ...
I have implemented a blocking modal file dialog for a project I am working
on (http://gnofin.sourceforge.net). If you're interested, you can find it under
gnofin/src/dialogs/dialog-file.c. It is fairly self-contained.
Hope this helps,
Darin
Gustavo Joćo Alves Marques Carneiro wrote:
> On Tue, 29 Feb 2000, Peter Wurmsdobler wrote:
>
> > hi,
> >
> > > A modal window is a window that, while being displayed, blocks all
> > > other widgts that don't belong to that window, so the user can't interact
> > > with any other part of the interface of the same program.
> > So this is actually what I need, or at least I can solve
> > the problem. Do I need the the gnome-libraries for this, too?
>
> You don't need gnome for modal windows. GTK already does it with
> gtk_window_set_modal. What gnome has is a function that you call on a
> dialog and never returns until a button has been pressed or the dialog
> closed, which is a useful thing.
>
> >
> > Silly question: Why do I need GNOME within an application?
> > Isn't there a simpler solution, like a blocking semaphore or
> > a signal the function can wait for?
>
> Yes, I'm sure you could do this with GTK as well with just a bit of
> work. And you don't even need semaphores, I think.
>
> >
> > peterw
> >
>
> --
> Gustavo J.A.M. Carneiro
> [reinolinux.fe.up.pt/~ee96090]
>
>
> --
> To unsubscribe: mail gtk-app-devel-list-request@redhat.com with
> "unsubscribe" as the Subject.
>
> Mailing list concerns should be mailed to <listmaster@redhat.com>
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]