From dd709addf0e8bfa6d40cf63b8327dfb609a36337 Mon Sep 17 00:00:00 2001 From: Cody Russell Date: Wed, 14 Apr 2010 09:53:17 -0500 Subject: reverse-scroll-events property only affects GDK_SCROLL_UP and GDK_SCROLL_DOWN --- src/idoscalemenuitem.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/idoscalemenuitem.c b/src/idoscalemenuitem.c index dc57479..39a09f6 100644 --- a/src/idoscalemenuitem.c +++ b/src/idoscalemenuitem.c @@ -107,7 +107,19 @@ ido_scale_menu_item_scroll_event (GtkWidget *menuitem, if (priv->reverse_scroll) { - event->direction = !event->direction; + switch (event->direction) + { + case GDK_SCROLL_UP: + event->direction = GDK_SCROLL_DOWN; + break; + + case GDK_SCROLL_DOWN: + event->direction = GDK_SCROLL_UP; + break; + + default: + break; + } } gtk_widget_event (scale, @@ -198,7 +210,7 @@ ido_scale_menu_item_class_init (IdoScaleMenuItemClass *item_class) PROP_REVERSE_SCROLL_EVENTS, g_param_spec_boolean ("reverse-scroll-events", "Reverse scroll events", - "Reverses how scroll events are interpreted", + "Reverses how up/down scroll events are interpreted", FALSE, G_PARAM_READWRITE)); -- cgit v1.2.3