On Fri, Feb 25, 2000 at 12:21:04PM +0200, Moshe Zadka wrote:

> > >[...how to create a modal file requester...]
> > This sounds like "I want to annoy the user". Why do you want it
> > modal ?
> The main application window is all kinds of bells and whistles, among
> which is a place to fill in a file name. The user has a "Browse" button,
> which lets him open a file dialog. Common UI design is to make the
> rest of the application inactive. 

Usually, pleople will not try to use the application while such a requester is
open. But in your case, all you have to do is to let the file requester (or the
code which controls it) know that it has to set the field in the main GUI. The
idea is to use modal dialogs only when the user absolutely  must not do
anything else while it is open.  That should mean: When he clicks somewhere,
the app would crash.  Anything else is usually only a poor excuse for a lazy
developer :-)

> Answers to my original question

See http://developer.gnome.org/doc/API/gtk/gtkfileselection.html for a
desciption of the widget. The widget structure contains a field fileop_dialog
which points to a GtkDialog
(http://developer.gnome.org/doc/API/gtk/gtkdialog.html).  Therefore, this
should work:

    gtk_window_set_modal (
        GTK_WINDOW (
            GTK_FILE_SELECTION(file_selector)->fileop_dialog)
        )
    );

-- 
Dipl. Inf. (FH) Aaron "Optimizer" Digulla
"(to) optimize: Make a program faster by
improving the algorithms rather than by       
buying a faster machine."                     
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]

Reply via email to