aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCody Russell <crussell@canonical.com>2010-04-14 09:53:17 -0500
committerCody Russell <crussell@canonical.com>2010-04-14 09:53:17 -0500
commitdd709addf0e8bfa6d40cf63b8327dfb609a36337 (patch)
tree0835e78aeda3c659d3169f6507fa70264c71f8f4
parent172006cab457fdd544cbd9d9080a8ae102454d83 (diff)
downloadayatana-ido-dd709addf0e8bfa6d40cf63b8327dfb609a36337.tar.gz
ayatana-ido-dd709addf0e8bfa6d40cf63b8327dfb609a36337.tar.bz2
ayatana-ido-dd709addf0e8bfa6d40cf63b8327dfb609a36337.zip
reverse-scroll-events property only affects GDK_SCROLL_UP and GDK_SCROLL_DOWN
-rw-r--r--src/idoscalemenuitem.c16
1 files changed, 14 insertions, 2 deletions
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));