gtk,range: Remove gtk-touchscreen-mode usage

Emulated crossing events with mode GDK_CROSSING_TOUCH_PRESS/RELEASE
already catter dinamically for the "don't prelight on touch devices"
usecase.
This commit is contained in:
Carlos Garnacho
2011-12-12 19:14:43 +01:00
parent d45dc8f3c3
commit 355a4cdc14

View File

@@ -2005,14 +2005,10 @@ gtk_range_draw (GtkWidget *widget,
GtkStateFlags state = 0;
gint focus_line_width = 0;
gint focus_padding = 0;
gboolean touchscreen;
gboolean draw_trough = TRUE;
GtkStyleContext *context;
context = gtk_widget_get_style_context (widget);
g_object_get (gtk_widget_get_settings (widget),
"gtk-touchscreen-mode", &touchscreen,
NULL);
if (GTK_IS_SCALE (widget) &&
gtk_adjustment_get_upper (priv->adjustment) == gtk_adjustment_get_lower (priv->adjustment))
@@ -2282,7 +2278,7 @@ gtk_range_draw (GtkWidget *widget,
if (!sensitive)
state = GTK_STATE_FLAG_INSENSITIVE;
else if (!touchscreen && priv->mouse_location == MOUSE_SLIDER)
else if (priv->mouse_location == MOUSE_SLIDER)
state = GTK_STATE_FLAG_PRELIGHT;
if (priv->grab_location == MOUSE_SLIDER)
@@ -2314,25 +2310,25 @@ gtk_range_draw (GtkWidget *widget,
draw_stepper (range, STEPPER_A, cr,
priv->orientation == GTK_ORIENTATION_VERTICAL ? GTK_ARROW_UP : GTK_ARROW_LEFT,
priv->grab_location == MOUSE_STEPPER_A,
!touchscreen && priv->mouse_location == MOUSE_STEPPER_A);
priv->mouse_location == MOUSE_STEPPER_A);
if (priv->has_stepper_b)
draw_stepper (range, STEPPER_B, cr,
priv->orientation == GTK_ORIENTATION_VERTICAL ? GTK_ARROW_DOWN : GTK_ARROW_RIGHT,
priv->grab_location == MOUSE_STEPPER_B,
!touchscreen && priv->mouse_location == MOUSE_STEPPER_B);
priv->mouse_location == MOUSE_STEPPER_B);
if (priv->has_stepper_c)
draw_stepper (range, STEPPER_C, cr,
priv->orientation == GTK_ORIENTATION_VERTICAL ? GTK_ARROW_UP : GTK_ARROW_LEFT,
priv->grab_location == MOUSE_STEPPER_C,
!touchscreen && priv->mouse_location == MOUSE_STEPPER_C);
priv->mouse_location == MOUSE_STEPPER_C);
if (priv->has_stepper_d)
draw_stepper (range, STEPPER_D, cr,
priv->orientation == GTK_ORIENTATION_VERTICAL ? GTK_ARROW_DOWN : GTK_ARROW_RIGHT,
priv->grab_location == MOUSE_STEPPER_D,
!touchscreen && priv->mouse_location == MOUSE_STEPPER_D);
priv->mouse_location == MOUSE_STEPPER_D);
return FALSE;
}