consume the Escape key only if we actually cancel a drag. Fixes bug

2006-10-30  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkrange.c (gtk_range_key_press): consume the Escape key
	only if we actually cancel a drag. Fixes bug #58389.
This commit is contained in:
Michael Natterer 2006-10-30 13:39:34 +00:00 committed by Michael Natterer
parent b863dba5ed
commit a94e212d01
2 changed files with 11 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2006-10-30 Michael Natterer <mitch@imendio.com>
* gtk/gtkrange.c (gtk_range_key_press): consume the Escape key
only if we actually cancel a drag. Fixes bug #58389.
2006-10-30 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_class_init): change left/right

View File

@ -1541,20 +1541,21 @@ static gboolean
gtk_range_key_press (GtkWidget *widget,
GdkEventKey *event)
{
GtkRange *range = (GtkRange *)widget;
GtkRange *range = GTK_RANGE (widget);
if (event->keyval == GDK_Escape)
if (event->keyval == GDK_Escape &&
range->layout->grab_location != MOUSE_OUTSIDE)
{
stop_scrolling (range);
update_slider_position (range,
update_slider_position (range,
range->slide_initial_coordinate,
range->slide_initial_coordinate);
return TRUE;
}
else
return GTK_WIDGET_CLASS (gtk_range_parent_class)->key_press_event (widget, event);
return GTK_WIDGET_CLASS (gtk_range_parent_class)->key_press_event (widget, event);
}
static gint