From dde83216598b3ff17340cba41dece446c6172fa1 Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Fri, 16 Mar 2012 15:45:42 +0100 Subject: Remove slider mouse button hack This should be a global setting for all sliders and fixed in gtk. --- src/idoscalemenuitem.c | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'src') diff --git a/src/idoscalemenuitem.c b/src/idoscalemenuitem.c index 4b60b8b..499c28f 100644 --- a/src/idoscalemenuitem.c +++ b/src/idoscalemenuitem.c @@ -217,21 +217,6 @@ ido_scale_menu_item_toggle_size_allocate (IdoScaleMenuItem *item, priv->toggle_size = toggle_size; } -static gboolean -on_scale_button_press_or_release_event (GtkWidget * widget G_GNUC_UNUSED, - GdkEventButton * event, - gpointer unused G_GNUC_UNUSED) -{ - /* HACK: we want the behaviour you get with the middle button, so we - * mangle the event. clicking with other buttons moves the slider in - * step increments, clicking with the middle button moves the slider to - * the location of the click. */ - if (event->button == 1) - event->button = 2; - - return FALSE; -} - static void ido_scale_menu_item_constructed (GObject *object) { @@ -250,12 +235,7 @@ ido_scale_menu_item_constructed (GObject *object) priv->scale = ido_range_new (adj, range_style); g_object_ref (priv->scale); gtk_scale_set_draw_value (GTK_SCALE (priv->scale), FALSE); - g_signal_connect (G_OBJECT (priv->scale), "button-press-event", - G_CALLBACK (on_scale_button_press_or_release_event), NULL); - g_signal_connect (G_OBJECT (priv->scale), "button-release-event", - G_CALLBACK (on_scale_button_press_or_release_event), NULL); - #ifdef USE_GTK3 hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); #else -- cgit v1.2.3 From 0d4d88db5127bbda61346429ab6ae32df5640fb0 Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Fri, 16 Mar 2012 19:16:04 +0100 Subject: ido-range: chain up constructed() to base class --- src/idorange.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/idorange.c b/src/idorange.c index 7d7ee85..a97d770 100644 --- a/src/idorange.c +++ b/src/idorange.c @@ -189,6 +189,8 @@ ido_range_constructed (GObject *object) } gtk_range_set_slider_size_fixed (GTK_RANGE (range), TRUE); + + G_OBJECT_CLASS (ido_range_parent_class)->constructed (object); } static void -- cgit v1.2.3