From 1956cf8d2859f65ce75200dc6c1a605cf1c23a16 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 1 Sep 2010 22:09:44 -0400 Subject: [PATCH] Remove GtkRange::activate-slider This was a style property to let theme engines 'opt-in' to more correct behaviour while maintaining compatibility with existing themes. GTK+ 3 engines are expected to handle the more correct behaviour. --- gtk/gtkrange.c | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c index e24d2f232a..27fa34b4a5 100644 --- a/gtk/gtkrange.c +++ b/gtk/gtkrange.c @@ -559,13 +559,6 @@ gtk_range_class_init (GtkRangeClass *class) 0, GTK_PARAM_READABLE)); - gtk_widget_class_install_style_property (widget_class, - g_param_spec_boolean ("activate-slider", - P_("Draw slider ACTIVE during drag"), - P_("With this option set to TRUE, sliders will be drawn ACTIVE and with shadow IN while they are dragged"), - FALSE, - GTK_PARAM_READABLE)); - /** * GtkRange:trough-under-steppers: * @@ -2116,15 +2109,8 @@ gtk_range_expose (GtkWidget *widget, if (priv->grab_location == MOUSE_SLIDER) { - gboolean activate_slider; - - gtk_widget_style_get (widget, "activate-slider", &activate_slider, NULL); - - if (activate_slider) - { - state = GTK_STATE_ACTIVE; - shadow_type = GTK_SHADOW_IN; - } + state = GTK_STATE_ACTIVE; + shadow_type = GTK_SHADOW_IN; } if (gdk_rectangle_intersect (&expose_area, @@ -2444,7 +2430,6 @@ gtk_range_button_press (GtkWidget *widget, priv->mouse_location == MOUSE_SLIDER) { gboolean need_value_update = FALSE; - gboolean activate_slider; /* Any button can be used to drag the slider, but you can start * dragging the slider with a trough click using button 2; @@ -2493,13 +2478,7 @@ gtk_range_button_press (GtkWidget *widget, range_grab_add (range, device, MOUSE_SLIDER, event->button); - gtk_widget_style_get (widget, "activate-slider", &activate_slider, NULL); - - /* force a redraw, if the active slider is drawn differently to the - * prelight one - */ - if (activate_slider) - gtk_widget_queue_draw (widget); + gtk_widget_queue_draw (widget); if (need_value_update) update_slider_position (range, event->x, event->y);