[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Disabling automatic ESC key action for GtkDialog
- From: "Torsten Reuss" <torsten reuss gmail com>
- To: "Dong Luo" <us917 yahoo com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Disabling automatic ESC key action for GtkDialog
- Date: Fri, 8 Feb 2008 19:06:09 +0100
Thanks all,
I realized that the problem is not only the ESC key, but also that the
window can be closed via the window decoration, therefore I am
attaching to delete-event to do the actions I previously did upon the
cancel button being pressed.
On Feb 8, 2008 6:31 PM, Dong Luo <us917 yahoo com> wrote:
> 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 <torsten reuss gmail com> 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
>
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]