forked from AuroraMiddleware/gtk
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:
parent
b863dba5ed
commit
a94e212d01
@ -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>
|
2006-10-30 Kristian Rietveld <kris@gtk.org>
|
||||||
|
|
||||||
* gtk/gtktreeview.c (gtk_tree_view_class_init): change left/right
|
* gtk/gtktreeview.c (gtk_tree_view_class_init): change left/right
|
||||||
|
@ -1541,20 +1541,21 @@ static gboolean
|
|||||||
gtk_range_key_press (GtkWidget *widget,
|
gtk_range_key_press (GtkWidget *widget,
|
||||||
GdkEventKey *event)
|
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);
|
stop_scrolling (range);
|
||||||
|
|
||||||
update_slider_position (range,
|
update_slider_position (range,
|
||||||
range->slide_initial_coordinate,
|
range->slide_initial_coordinate,
|
||||||
range->slide_initial_coordinate);
|
range->slide_initial_coordinate);
|
||||||
|
|
||||||
return TRUE;
|
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
|
static gint
|
||||||
|
Loading…
Reference in New Issue
Block a user