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 732834 - Evince jumps to last bookmarked page when I create a bookmark
Evince jumps to last bookmarked page when I create a bookmark
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
: 784138 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-07-07 11:05 UTC by Adam Dingle
Modified: 2017-09-06 07:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed fix (1.88 KB, patch)
2017-08-26 17:57 UTC, Casey Jao
committed Details | Review

Description Adam Dingle 2014-07-07 11:05:57 UTC
Whenever I create a bookmark, Evince moves the view to the last page that has been bookmarked.  That isn't helpful.  The view should just remain on the current page, i.e. the one that is being bookmarked.
Comment 1 Casey Jao 2017-08-26 17:56:07 UTC
The same thing happens when one deletes a bookmark. The problem seems to lie in ev_sidebar_bookmarks_update(), which is called every time a bookmark is added or deleted.

When a bookmark is added, the tree_view’s model is cleared and then repopulated with the list of bookmarks. However, with every bookmark deleted a GtkTreeSelection->changed signal is  emitted, and the handler for that signal (ev_sidebar_bookmarks_selection_changed) changes the page accordingly. Consequently, the current page actually iterates through the bookmarked pages and ends up at the last bookmarked page.

A simple patch would be to block the "changed" signal when clearing the tree_view's model.
Comment 2 Casey Jao 2017-08-26 17:57:16 UTC
Created attachment 358490 [details] [review]
Proposed fix
Comment 3 Bruno Jiménez 2017-09-01 10:41:31 UTC
Tested that the fix works. It also fixes bug #784138 (https://bugzilla.gnome.org/show_bug.cgi?id=784138)
Comment 4 Carlos Garcia Campos 2017-09-06 07:39:48 UTC
*** Bug 784138 has been marked as a duplicate of this bug. ***
Comment 5 Carlos Garcia Campos 2017-09-06 07:43:45 UTC
Comment on attachment 358490 [details] [review]
Proposed fix

Thanks, pushed with minor cosmetic changes.