After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 562257 - scroll and change page in non-continuous mode
scroll and change page in non-continuous mode
Status: RESOLVED OBSOLETE
Product: evince
Classification: Core
Component: general
2.24.x
Other Linux
: Normal enhancement
: ---
Assigned To: Evince Maintainers
Evince Maintainers
: 437008 458105 540745 549632 655469 763002 (view as bug list)
Depends on: 557249
Blocks:
 
 
Reported: 2008-11-25 20:48 UTC by Michael Chudobiak
Modified: 2018-05-22 13:27 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
Allow key and wheel scrolling to change pages (4.31 KB, patch)
2008-11-27 19:18 UTC, Michael Chudobiak
rejected Details | Review
Let scroll wheel change page when in non-continuous best-fit mode (468 bytes, patch)
2009-08-05 15:09 UTC, Philip Langdale
committed Details | Review
Scroll small pages in non-continuous mode (3.20 KB, patch)
2014-05-19 14:58 UTC, Marek Kašík
none Details | Review
Scroll small pages in non-continuous mode (5.00 KB, patch)
2016-03-09 17:08 UTC, Marek Kašík
committed Details | Review

Description Michael Chudobiak 2008-11-25 20:48:33 UTC
In this non-continuous mode, scrolling to the bottom of a page with the mousewheel will not trigger a page change.

In contrast, scrolling to the bottom of a page with the PgDn button will trigger a page change.

It would be nice if the mousewheel would act in a similar fashion, so that the mousewheel could be used to change pages in both the continuous and non-continuous modes.

- Mike
Comment 1 Michael Chudobiak 2008-11-25 20:50:42 UTC
Also: is there a reason that the continuous mode is not on by default?

- Mike
Comment 2 Michael Chudobiak 2008-11-27 19:18:56 UTC
Created attachment 123567 [details] [review]
Allow key and wheel scrolling to change pages

Here is a patch that implements page changes when scrolling (using buttons or the mousewheels) to the edge of a page.

It seems to work very nicely in the forward/right modes.

It works OK in the backward/left modes, except that the page position is reset to top-left, which is visually jarring. Fixing that might be beyond me...

- Mike
Comment 3 Michael Chudobiak 2008-11-27 19:51:03 UTC
*** Bug 540745 has been marked as a duplicate of this bug. ***
Comment 4 Michael Chudobiak 2008-11-27 19:51:54 UTC
*** Bug 549632 has been marked as a duplicate of this bug. ***
Comment 5 Michael Chudobiak 2008-11-27 19:56:13 UTC
The reset-to-to-left issue mentioned in the last comment is bug 557249.

- Mike
Comment 6 Nickolay V. Shmyrev 2008-11-28 01:04:36 UTC
Thanks for the patch, this behaviour was decided long time ago actually:

http://bugzilla.gnome.org/show_bug.cgi?id=168449
Comment 7 Michael Chudobiak 2008-11-28 12:52:41 UTC
Can we re-visit that decision? People have asked for this feature in bug 168449, bug 437008, bug 540745, bug 557249, and bug 562257.

As far as I can tell, the only objection in bug 168449 was that people would get confused by the flipping (due to a lack of resistance).

I don't think that is true. People handle it OK in presentation mode. They handle it in continuous mode. They handle it in Adobe Acrobat (not that we should copy Acrobat blindly - I just mean that millions are people are perfectly comfortable with this behaviour). 

The whole point of the mousewheel is that it allows easy and rapid scrolling, so people will not be surprised when rapid scrolling causes a page flip. I'm always surprised that it doesn't!

The default behaviour (non-continuous + no page flips) is awkward. You can't rapidly scan a document with the mousewheel. This is a productivity / usability killer. It doesn't "just work".

The continuous mode is nice, but most users are unaware of this option.

- Mike
Comment 8 Nickolay V. Shmyrev 2008-11-28 20:36:46 UTC
Sorry, the default mode is continuous with scrolling. And there is already a plan to drop single page mode.
Comment 9 Michael Chudobiak 2008-11-28 20:48:50 UTC
Oops, my mistake. Continuous is the default mode, which is good!

- Mike
Comment 10 Michel Samia 2009-01-10 11:29:00 UTC
I think Michael Chudobiak is absolutely right. When scrolling wheel does not scroll, it is a bug. No matter whether in continuous/non-continuous or fullscreen/non-fullscreen mode. There is no excuse for this and it should be fixed ASAP because users expect it to work.
Comment 11 Philip Langdale 2009-08-05 15:09:53 UTC
Created attachment 139950 [details] [review]
Let scroll wheel change page when in non-continuous best-fit mode

I think the world has changed a little bit since this bug was last discussed and the code is significantly different.

Today, the scroll wheel will change pages in presentation mode. It seems reasonable to me to also scroll when in non-continuous best-fit mode and my proposed patch implements this functionality.
Comment 12 Carlos Garcia Campos 2009-08-08 14:38:52 UTC
Applied to git master, thanks Philip. 
Comment 13 Emmanuel Fleury 2009-11-02 08:56:27 UTC
Hi all,

What is exactly the status of this issue now ?

It seems to be linked to quite a lot of bugs: 152555, 168449, 437008, 458105, 540745, 549632, 557249, 562257.

If fixed, it will indeed removed quite a lot of issues from the database.
Comment 14 Emmanuel Fleury 2009-11-20 15:22:17 UTC
*** Bug 458105 has been marked as a duplicate of this bug. ***
Comment 15 Michael Chudobiak 2010-03-09 18:53:18 UTC
Well, you still can't flip pages with the scroll wheel in non-continuous mode, unless you happen to be in "best fit" mode.

So the status of the bug is basically unchanged - either NEW, or NOTABUG if the developers don't want that functionality.

- Mike
Comment 16 Liv 2013-09-14 20:04:44 UTC
I'm jumping late to the party, but a couple of thoughts. I'm using Evince 3.4.0 on Ubuntu Precise. 

I ended up on this bug report because I always found very awkward that in best-fit mode (& continuous mode, as it turns out) an up/down arrow button would flip the page, while the scrolling wheel would not flip the page. This is inconsistent with the presentation mode, in which both up/down and scrolling wheel both flip the page. In this sense, I'd say this feature is a bug. 

I'm happy though that in best-fit (& non-continuous mode) the behaviour is the same as in presentation. But I failed to discover this without the help of this bug report.
Comment 17 Germán Poo-Caamaño 2014-05-01 23:43:23 UTC
*** Bug 437008 has been marked as a duplicate of this bug. ***
Comment 18 Marek Kašík 2014-05-19 14:58:10 UTC
Created attachment 276785 [details] [review]
Scroll small pages in non-continuous mode

Maybe we could allow user to scroll the pages in non-continuous mode when the current page is smaller or equally big as it would be in "Page Fit" mode at least. Attached patch does this for me.
Comment 19 Marek Kašík 2015-09-04 11:33:58 UTC
The patch still applies and I think that it would improve user's experience :).
Comment 20 Carlos Garcia Campos 2015-12-02 12:26:51 UTC
*** Bug 655469 has been marked as a duplicate of this bug. ***
Comment 21 Carlos Garcia Campos 2015-12-02 12:32:16 UTC
I've just noticed that this patch is not exactly the same as the one in bug #655469, but I think it could be updated to handle that case at well.
Comment 22 Marek Kašík 2016-03-09 17:08:59 UTC
Created attachment 323525 [details] [review]
Scroll small pages in non-continuous mode

(In reply to Carlos Garcia Campos from comment #21)
> I've just noticed that this patch is not exactly the same as the one in bug
> #655469, but I think it could be updated to handle that case at well.

Hi,

this patch fixes both cases. It checks whether currently shown page fits actual view and allow user to scroll to previous/next page in that case (also in dual page mode). It does this also when the page fits only in one axis and the scroll happens in the same axis. It does this also for the key events in ev_view_scroll().
The only part I'm not sure about is the GDK_SCROLL_SMOOTH part. It works well for me but I'm not sure whether I was able to test all cases. I've tested it with my mouse and touchpad.
Comment 23 Jason Crain 2016-04-12 16:39:39 UTC
The patches from Philip and Marek have focused on allowing page changes when the entire page fits on the screen, but I think the original reporter was asking about the page changing no matter the page size.

I'm not advocating for either position, but I wondered what the developers say the correct behavior is.  In non-continuous mode, should the arrow keys and scroll wheel only change the page when the entire page fits in the view?  Or should the arrow keys and scroll wheel change the page no matter the page size?
Comment 24 Germán Poo-Caamaño 2016-04-14 15:38:02 UTC
*** Bug 763002 has been marked as a duplicate of this bug. ***
Comment 25 Christoph Doepmann 2016-04-15 16:34:34 UTC
I'd also appreciate a developer's opinion on this. However, if it turns out to be difficult to come to a decision in this regard, we might just as well implement it in to steps; as there seems to be consensus on the issue in the case of the page fitting the screen, we could go ahead with that first. Whenever a decision is made on the case of the page size being irrelevant, we could add that later on.
Comment 26 Marek Kašík 2016-04-15 17:11:42 UTC
I think that https://bugzilla.gnome.org/show_bug.cgi?id=168449#c4 still holds here.
Comment 27 Carlos Garcia Campos 2016-05-07 07:05:34 UTC
Review of attachment 323525 [details] [review]:

Ok, I think we can try this. Sorry for the delay reviewing this. I only have a couple of suggestions.

::: libview/ev-view.c
@@ +4180,3 @@
+	if (state == 0 &&
+	    !view->continuous &&
+	    (fit_width || fit_height)) {

Leave this if as a single line.

@@ +4187,3 @@
+			if (fit_height) {
+				ev_view_next_page (view);
+				handled = TRUE;

I think we can just return TRUE here.

@@ +4193,3 @@
+			if (fit_width) {
+				ev_view_next_page (view);
+				handled = TRUE;

Ditto.

@@ +4199,3 @@
+			if (fit_height) {
+				ev_view_previous_page (view);
+				handled = TRUE;

Ditto.

@@ +4205,3 @@
+			if (fit_width) {
+				ev_view_previous_page (view);
+				handled = TRUE;

Ditto.

@@ +4226,1 @@
+				handled = TRUE;

Ditto.

@@ +4230,3 @@
 		}
 
+		return handled;

And here you just return FALSE and you don't need the handled variable-

@@ +8578,3 @@
 
+static double
+ev_view_get_relative_page_width (EvView *view)

Since we are not actually using the return value, except for checking whether it's <= 1, I think it would be easier to make this a boolean function renamed as something like ev_view_page_fits or something similar. We could even make a single function that receives a GtkOrientation.

@@ +8585,3 @@
+
+	gtk_widget_get_allocation (GTK_WIDGET (view), &allocation);
+	ev_view_size_request (GTK_WIDGET (view), &requisition);

I guess we can avoid all this in case sizing mode is EV_SIZING_FIT_PAGE and in the horizontal case also if it's EV_SIZING_FIT_WIDTH or EV_SIZING_AUTOMATIC.
Comment 28 Marek Kašík 2016-05-09 11:02:47 UTC
Comment on attachment 323525 [details] [review]
Scroll small pages in non-continuous mode

Thank you for the review. I've incorporated all your comments to the patch and pushed it to master.
Comment 29 GNOME Infrastructure Team 2018-05-22 13:27:05 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/evince/issues/74.