GNOME Bugzilla – Bug 328952
Doesn't dissappear on when pressing Escape
Last modified: 2008-07-15 16:59:32 UTC
- Start bug-buddy - Hit Escape to cancel I expect the window to go away, but it doesn't
Should be easy to fix I guess.
Created attachment 86546 [details] [review] Patch to close bug-buddy on Escape key
Comment on attachment 86546 [details] [review] Patch to close bug-buddy on Escape key thank you very much for the patch. some minor comments: >+static gint >+keypress_callback (GtkWidget *widget, GdkEventKey *event, gpointer data) >+{ The prototype for the "key-press-event" signal handler is gboolean instead of gint >+ if (event->keyval == GDK_Escape) { >+ close_callback(NULL, data); use a space after function name >+ return 1; you should return TRUE here >+ } >+ /* let others handle the event */ >+ return 0; and FALSE here.
> >+static gint > >+keypress_callback (GtkWidget *widget, GdkEventKey *event, gpointer data) > >+{ > > The prototype for the "key-press-event" signal handler is gboolean instead of > gint It was gint in GTK/GNOME Application Developement book :-) I suppose book became old now! > >+ if (event->keyval == GDK_Escape) { > >+ close_callback(NULL, data); > > use a space after function name OK. I will send correct patch! / bvk-chaitanya
Created attachment 86624 [details] [review] updated patch 86546 as suggested.
Thanks, committed to trunk. 2008-07-15 Cosimo Cecchi <cosimoc@gnome.org> * src/bug-buddy.c: (keypress_callback), (main): Close the window when pressing Escape. Patch from BVK Chaitanya (#328952).