1. 26 Oct, 2013 4 commits
    • Abdo Roig-Maranges's avatar
      move adjustment code from sc_adjust_window to adjust_view · c4245600
      Abdo Roig-Maranges authored
      This new function adjust_view is in charge of recomputing the scale
      according to adjustment settings and trigger a render_all.
      
      adjust_view contains the old sc_adjust_window code, slightly simplified
      thanks to the availability of the document_get_viewport_size.
      
      Then it is used by sc_adjust_window, document_open and the
      cb_view_resized callback. Makes slightly more sense this way than
      calling the shortcut sc_adjust_window directly.
      c4245600
    • Abdo Roig-Maranges's avatar
      make position_set and page_set more asynchronous · 54b6f733
      Abdo Roig-Maranges authored
      Now page_set and position_set save the computed page and position to the
      document object, then trigger a refresh-view signal. They do not handle
      GTK adjustments anymore.
      54b6f733
    • Abdo Roig-Maranges's avatar
      add a custom refresh-view signal · 692e72ab
      Abdo Roig-Maranges authored
      Now we can trigger a gtk page refresh calling refresh_view. This
      function triggers a custom signal refresh-view, whose handler copies the
      position from the document object to the adjustments.
      692e72ab
    • Abdo Roig-Maranges's avatar
      page_widget_set_mode now sets the page-padding too · c5930c90
      Abdo Roig-Maranges authored
        - fix the computation of the number of rows in the table. Doing a ceil
          of an integer division has no effect...
      
        - set the page_padding in page_widget_set_mode function, instead of
          doing it independently.
      
        - call zathura_document_set_layout after calling page_widget_set_mode
          to save the page layout settings into the document object.
      c5930c90
  2. 18 Oct, 2013 1 commit
  3. 24 Aug, 2013 1 commit
  4. 21 Aug, 2013 1 commit
  5. 27 Jul, 2013 1 commit
  6. 07 Jul, 2013 1 commit
  7. 29 Jun, 2013 1 commit
  8. 10 Jun, 2013 2 commits
    • Marwan Tanager's avatar
      Use jumplist with marks · 092fe818
      Marwan Tanager authored and Sebastian Ramacher's avatar Sebastian Ramacher committed
      
      Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <sebastian+dev@ramacher.at>
      092fe818
    • Marwan Tanager's avatar
      Enhancements/Cleanups for the jumplist mechansim · afd008f4
      Marwan Tanager authored and Sebastian Ramacher's avatar Sebastian Ramacher committed
      
      
      	- Don't delete the elements on the right of the current one, when
      	  appending a new jump to the jumplist, because this makes no sense at
      	  all; the point of the jumplist in the first place is to remember
      	  previously jumped-to positions in the document, so there is no need
      	  to delete anythings except to trim the oldest entries from the
      	  beginning to maintain the maximum size. This also makes us compatible
      	  with the Vim way of doing things.
      
      	- Make the jumplist mechanism functional on the same page; if we
      	  followed a link to a target on the same page, remember the
      	  adjustments before and after following the link. The same holds for
      	  navigating search results on the same page.
      
      	- Implement position_set and use it instead of position_set_delayed
      	  when following links in order to give zathura_jumplist_save a chance
      	  to record the exact adjustments of the link target. Otherwise, it
      	  will always record the adjustments after going to the target page,
      	  but before going to the exact position within it.
      
      	- Don't consider movements with ^i and ^o as jumps :)
      
      	- Don't use page_set followed by setting the adjustments in
      	  sc_jumplist, because this is redundant and causes clutter when using
      	  ^i and ^o, as the adjustments is set twice this way (once in page_set
      	  and again in position_set_delayed).  It's enough to only update the
      	  page number on the statusbar and then set the adjustments.
      
      	- Hide implementation details (zathura_jumplist_save and
      	  zathura_jumplist_append), and make things more consistent by
      	  exporting and using only zathura_jumplist_add for adding new entries.
      
      The end result: A more slick jumping experience :-)
      Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <sebastian+dev@ramacher.at>
      afd008f4
  9. 02 Apr, 2013 1 commit
  10. 26 Mar, 2013 1 commit
    • Marwan Tanager's avatar
      Replace the periodic page reclaiming code with a LRU caching algorithm. · cb18fe86
      Marwan Tanager authored and Sebastian Ramacher's avatar Sebastian Ramacher committed
      
      
      This patch implements a page cache that is invalidated in a LRU fashion.
      
      Pages are added to the cache as soon as they become visible. When the cache is
      full and a new page that isn't in the cache becomes visible, the least recently
      viewed page in the cache is evicted from memory and the new one takes it's
      place.
      
      The cache size is configurable using the page-cache-size configuration
      variable, with a default value of 15 pages. Very large values for the cache
      size are not recommended, though, as it will stress the system memory out.
      
      The old periodic page reclaiming code is no longer necessary with this patch,
      so I removed it.
      
      Special thanks to Ignas Anikevičius, and Sebastian Ramacher for the
      inspirations.
      Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <sebastian+dev@ramacher.at>
      cb18fe86
  11. 23 Mar, 2013 1 commit
    • Benoît Knecht's avatar
      Use signals to readjust_view_after_zooming() · c9eef954
      Benoît Knecht authored and Sebastian Ramacher's avatar Sebastian Ramacher committed
      
      
      Instead of guesstimating the values of the scrollbars adjustments after
      a change in zoom level, connect callbacks to the "changed" GtkAdjustment
      event (which is emitted when the bounds or page_size of the adjustment
      change, e.g. when the zoom level changes), and compute the new values
      from there.
      
      The previous adjustment values are tracked in zathura->ui.hadjustment
      and zathura->ui.vadjustment (and updated by signal handlers as well), so
      that the view's position can be maintained while zooming.
      
      cb_view_hadjustment_changed() centers the page horizontally if a
      "best-fit" or "width" zoom is being performed, or if "zoom-center" is
      true; otherwise, it keeps the view horizontally centered around the same
      area of the page.
      
      cb_view_vadjustment_changed() always keeps the view vertically centered
      around the same area of the page.
      
      Many thanks to Marwan Tanager for thoroughly reviewing the various
      stages of this patch, and actually coming up with a working solution.
      Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <sebastian+dev@ramacher.at>
      c9eef954
  12. 17 Mar, 2013 1 commit
  13. 23 Feb, 2013 1 commit
  14. 19 Dec, 2012 1 commit
  15. 06 Dec, 2012 1 commit
  16. 02 Sep, 2012 2 commits
  17. 13 Aug, 2012 1 commit
  18. 05 Aug, 2012 2 commits
  19. 01 Aug, 2012 1 commit
  20. 13 Jul, 2012 1 commit
  21. 27 Jun, 2012 1 commit
  22. 22 Apr, 2012 1 commit
  23. 21 Apr, 2012 1 commit
  24. 03 Apr, 2012 2 commits
  25. 01 Apr, 2012 1 commit
  26. 27 Mar, 2012 1 commit
  27. 24 Mar, 2012 1 commit
  28. 19 Mar, 2012 1 commit
  29. 16 Mar, 2012 1 commit
  30. 09 Mar, 2012 1 commit
  31. 04 Mar, 2012 1 commit
  32. 02 Mar, 2012 1 commit
  33. 21 Feb, 2012 1 commit