Pan gesture in RTL shows always next picture
A horizontal swipe/pan gesture in one direction should show the next picture, in the other direction the previous picture.
In right-to-left environments it shows the next picture, no matter which direction the gesture has.
Steps to reproduce:
- Open a few pictures in EOG
- If not in RTL, open GTK Inspector, tab "Visual", change "Text Direction"
- If no touchpad, open GTK Inspector, tab "Visual", check "Simulate touchscreen"
- Picture nr. 1 is shown
- Swipe from left to right: next picture shown, nr. 2
- Swipe the other way, from right to left
Result:
- next picture shown (nr. 3)
Expected result:
- previous picture shown (nr. 1)
- LTR pan from right to left: next picture
- LTR pan from left to right: previous picture
- RTL pan from right to left: previous picture
- RTL pan from left to right: next picture
This is due to an if statement in src/eog-scroll-view.c in pan_gesture_pan_cb()
which always evaluates TRUE in rtl environments, simplified quote:
if (whatever || widet_direction == RTL)
show_next();
else
show_previous();