You may need add GTK_RESPONSE_ACCEPT or GTK_RESPONSE_REJECT parameter when create GtkDialog using gtk_dialog_new_with_buttons (). One of them is the response id from the action of press ESC key, thus you can write your handle to it accordingly. In my case, it is GTK_RESPONSE_ACCEPT. You can test it.
--- Torsten Reuss <[EMAIL PROTECTED]> wrote: > Hi, > > I am porting an application from gtk 1.2 to gtk 2.0 > and found that > there is a different behaviour for GtkDialog > windows. In GTK-2.0, > dialog windows automatically are closed and > destroyed when the ESC key > is pressed. This behaviour is incompatible with the > application as > most dialogs are only hidden and not destroyed when > the user presses > OK or Cancel. > > What's the easiest way to prevent this behaviour? Do > I have to capture > key-press-events in the Dialog window? > > Thanks, > Torsten > _______________________________________________ > gtk-app-devel-list mailing list > gtk-app-devel-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list > ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list