After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 328952 - Doesn't dissappear on when pressing Escape
Doesn't dissappear on when pressing Escape
Status: RESOLVED FIXED
Product: bug-buddy
Classification: Deprecated
Component: general
2.13.x
Other Linux
: Normal normal
: ---
Assigned To: Bug-buddy Maintainers
Bug-buddy Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-01-28 12:30 UTC by Crispin Flowerday (not receiving bugmail)
Modified: 2008-07-15 16:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to close bug-buddy on Escape key (854 bytes, patch)
2007-04-18 03:30 UTC, BVK Chaitanya
needs-work Details | Review
updated patch 86546 as suggested. (866 bytes, patch)
2007-04-19 09:45 UTC, BVK Chaitanya
committed Details | Review

Description Crispin Flowerday (not receiving bugmail) 2006-01-28 12:30:38 UTC
- Start bug-buddy
- Hit Escape to cancel

I expect the window to go away, but it doesn't
Comment 1 Kjartan Maraas 2007-04-06 13:19:22 UTC
Should be easy to fix I guess.
Comment 2 BVK Chaitanya 2007-04-18 03:30:35 UTC
Created attachment 86546 [details] [review]
Patch to close bug-buddy on Escape key
Comment 3 Fernando Herrera 2007-04-18 13:32:08 UTC
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.
Comment 4 BVK Chaitanya 2007-04-19 09:43:06 UTC
> >+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
Comment 5 BVK Chaitanya 2007-04-19 09:45:16 UTC
Created attachment 86624 [details] [review]
updated patch 86546 as suggested.
Comment 6 Cosimo Cecchi 2008-07-15 16:59:32 UTC
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).