diff options
author | Matthias Clasen <maclas@gmx.de> | 2003-12-13 01:33:17 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2003-12-13 01:33:17 +0000 |
commit | 6326e9df0f7c7b1b86ad56590a69347ca5271411 (patch) | |
tree | 1170d99eff51026c9366adeeb60a5bcc1f2f21bb /gtk | |
parent | 802e094bd3500fa9a0f9591b5347346a5d3e2efc (diff) | |
download | gtk+-6326e9df0f7c7b1b86ad56590a69347ca5271411.tar.gz |
Undo the last change, since it broke logical keynav. Fix stepper direction
Sat Dec 13 02:33:17 2003 Matthias Clasen <maclas@gmx.de>
* gtk/gtkrange.c (gtk_range_scroll): Undo the last change,
since it broke logical keynav.
* gtk/gtkrange.c (range_get_scroll_for_grab): Fix stepper
direction in inverted scrollbars here instead.
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkrange.c | 47 |
1 files changed, 16 insertions, 31 deletions
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c index a2ed95ca8c..301728613c 100644 --- a/gtk/gtkrange.c +++ b/gtk/gtkrange.c @@ -1084,7 +1084,10 @@ range_grab_remove (GtkRange *range) static GtkScrollType range_get_scroll_for_grab (GtkRange *range) -{ +{ + gboolean invert; + + invert = should_invert (range); switch (range->layout->grab_location) { /* Backward stepper */ @@ -1093,13 +1096,13 @@ range_get_scroll_for_grab (GtkRange *range) switch (range->layout->grab_button) { case 1: - return GTK_SCROLL_STEP_BACKWARD; + return invert ? GTK_SCROLL_STEP_FORWARD : GTK_SCROLL_STEP_BACKWARD; break; case 2: - return GTK_SCROLL_PAGE_BACKWARD; + return invert ? GTK_SCROLL_PAGE_FORWARD : GTK_SCROLL_PAGE_BACKWARD; break; case 3: - return GTK_SCROLL_START; + return invert ? GTK_SCROLL_END : GTK_SCROLL_START; break; } break; @@ -1110,13 +1113,13 @@ range_get_scroll_for_grab (GtkRange *range) switch (range->layout->grab_button) { case 1: - return GTK_SCROLL_STEP_FORWARD; + return invert ? GTK_SCROLL_STEP_BACKWARD : GTK_SCROLL_STEP_FORWARD; break; case 2: - return GTK_SCROLL_PAGE_FORWARD; + return invert ? GTK_SCROLL_PAGE_BACKWARD : GTK_SCROLL_PAGE_FORWARD; break; case 3: - return GTK_SCROLL_END; + return invert ? GTK_SCROLL_START : GTK_SCROLL_END; break; } break; @@ -1601,17 +1604,11 @@ gtk_range_scroll (GtkRange *range, break; case GTK_SCROLL_STEP_BACKWARD: - if (should_invert (range)) - step_forward (range); - else - step_back (range); + step_back (range); break; case GTK_SCROLL_STEP_FORWARD: - if (should_invert (range)) - step_back (range); - else - step_forward (range); + step_forward (range); break; case GTK_SCROLL_PAGE_LEFT: @@ -1643,31 +1640,19 @@ gtk_range_scroll (GtkRange *range, break; case GTK_SCROLL_PAGE_BACKWARD: - if (should_invert (range)) - page_forward (range); - else - page_back (range); + page_back (range); break; case GTK_SCROLL_PAGE_FORWARD: - if (should_invert (range)) - page_back (range); - else - page_forward (range); + page_forward (range); break; case GTK_SCROLL_START: - if (should_invert (range)) - scroll_end (range); - else - scroll_begin (range); + scroll_begin (range); break; case GTK_SCROLL_END: - if (should_invert (range)) - scroll_begin (range); - else - scroll_end (range); + scroll_end (range); break; case GTK_SCROLL_JUMP: |