Re: freezing an entire window + search algorithms for clist



    rsmith> On 30 Dec, Daniel Macedo wrote:
    >> Does anybody know how to "freeze " a window? I have a main window,
    >> which opens dialogs. If I click the window's button more than once, it
    >> will open more than one dialog. Is it possible to freeze the main
    >> window while the other window is open, so it doesn't receive any
    >> signals?

    rsmith> Just set the button used to lauch the window to insensitive in the
    rsmith> "clicked" callback:

    rsmith> void button_clicked (GtkWidget *widget, gpointer data) {
    rsmith> gtk_widget_set_sensitive (widget, FALSE); /* now show the dialog
    rsmith> */ }

    rsmith> And make the button sensitive again in the "delete_event" handler
    rsmith> of the dialog.

Alternatively, you might want to call gtk_window_set_modal() on the dialog.
All interaction in the application are forced to the dialog until it is done.
-----------------------------------------------------------------------------
Mark Leisher
Computing Research Lab            Cinema, radio, television, magazines are a
New Mexico State University       school of inattention: people look without
Box 30001, Dept. 3CRL             seeing, listen without hearing.
Las Cruces, NM  88003                            -- Robert Bresson




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