1. 12 Nov, 2015 1 commit
  2. 05 Oct, 2015 1 commit
  3. 28 Apr, 2015 1 commit
  4. 08 Dec, 2014 1 commit
  5. 25 Nov, 2014 1 commit
  6. 07 Nov, 2014 1 commit
  7. 30 Sep, 2014 1 commit
  8. 04 Sep, 2014 1 commit
  9. 22 Aug, 2014 1 commit
  10. 07 Aug, 2014 1 commit
  11. 24 Jun, 2014 1 commit
  12. 23 Jun, 2014 2 commits
  13. 24 May, 2014 1 commit
  14. 25 Apr, 2014 1 commit
  15. 14 Feb, 2014 1 commit
  16. 17 Nov, 2013 1 commit
  17. 26 Oct, 2013 7 commits
    • Abdo Roig-Maranges's avatar
      get rid of tracking adjustments · 9367d646
      Abdo Roig-Maranges authored
      They are not used anywere, and do not seem to become useful anymore in
      the light of the new separation of document and view.
    • Abdo Roig-Maranges's avatar
      disable adjustment callbacks in index mode · 018e026e
      Abdo Roig-Maranges authored
      Otherwise the document object gets updated with wrong position values,
      because the adjustment belong to the index, not the document view.
    • Abdo Roig-Maranges's avatar
      adapt view_adjustment callbacks to new document/view separation · 36346362
      Abdo Roig-Maranges authored
      The adjustment callbacks act as an interface between position data in
      the document object, and the adjustments.
      We remove the horizontal centering code, as now it is done by
      position_set. Those callbacks should not change the position read from
      the document object in any way.
      Also, we split the adjustment_value_changed callback into a vertical and
      an horizontal version. Previously a single callback was reused for both,
      horizontal and vertical. That lead to a subtle problem when coming out
      of index mode. What happened was the following:
        1. horizontal adjustment bounds change coming out of index mode. This
           triggers an hadjustment changed signal.
        2. the hadjustment_changed callback handles it, and resets the
           hadjustment value, as the bound may have changed. This triggers a
           value_changed event.
        3. the value_changed callback handles the event, and captures the
           position for *BOTH*, horizontal and vertical adjustments, saving
           them to the document object.
        1..3 is repeated for the vertical adjustment.
        Now, if in 3. the horizontal adjustment bounds were not yet updated
        after the index mode, we got ourselves at the wrong vertical position.
      This race condition is avoided now because both value_changed callbacks
      *ONLY* handle their own direction, either vertical or horizontal, not
    • 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.
    • 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.
    • Abdo Roig-Maranges's avatar
      merge callbacks for pages-per-row, first-page-column and page-padding · 0da491f7
      Abdo Roig-Maranges authored
      All of those callbacks are conceptually related (change the page
      layout), and depend from one another.
      Now the single callback page_layout_value_changed defers to
      page_widget_set_mode to change whatever is needed in the GTK widgets.
    • 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.
  18. 21 Oct, 2013 2 commits
  19. 20 Oct, 2013 1 commit
  20. 19 Oct, 2013 1 commit
    • Sebastian Ramacher's avatar
      Finish moving of the page cache · 5df5357f
      Sebastian Ramacher authored
      Add two more signals to ZathuraRenderRequest to notify pages if they are cached
      or not. This allows us to move some logic away from
      cb_view_vadjutment_value_changed to more appropriate places.
      ZathuraPageWidget will now release the surface if
      * it gets the signal that the page is no longer cached and the page is
      * the page is not cached and the render request is aborted.
      Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <sebastian+dev@ramacher.at>
  21. 18 Oct, 2013 1 commit
  22. 31 Aug, 2013 1 commit
  23. 30 Aug, 2013 2 commits
  24. 24 Aug, 2013 1 commit
  25. 27 Jul, 2013 1 commit
  26. 26 Jul, 2013 1 commit
  27. 21 Jun, 2013 1 commit
    • Marwan Tanager's avatar
      Move calls to zathura_jumplist_add surrounding zathura_link_evaluate to... · d9f8750c
      Marwan Tanager authored and Sebastian Ramacher's avatar Sebastian Ramacher committed
      Move calls to zathura_jumplist_add surrounding zathura_link_evaluate to zathura_link_evaluate itself
      This is just in case that zathura_link_evaluate returns without evaluating the
      link, which would result in a new jump being added for the current position,
      but without adding a corresponding jump for the target position (actually a
      second one would be added but the check in zathura_jumplist_add would prevent
      it from being appended on the linked list since it's position would be the same
      as the current one, because the link haven't been evaluated).
      Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <sebastian+dev@ramacher.at>
  28. 10 Jun, 2013 2 commits
    • 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>
    • Marwan Tanager's avatar
      More Vim-like search behavior · cc3b9aea
      Marwan Tanager authored and Sebastian Ramacher's avatar Sebastian Ramacher committed
      This patch activates the last aborted search when pressing the search shortcuts
      ('n' or 'N').
      To avoid confusion, and to make things more predictable, I've chosen to always
      reactivate an aborted search starting from the beginning (or end, in case of
      'N' or '?') of the current page, as opposed to Vim which continues from the
      next search term each time the search is reactivated.
      Searching using '/' or '?' doesn't center the view at the current search term
      like when using 'n' or 'N', so we fix this here.
      Also, I managed to work around the issue of the thin rectangular margins that
      show around the previously-highlighted search terms after the search is aborted
      (either explicitly or as a result of following links), by redrawing the page
      widget (only if it's visible) instead of redrawing the rectangles covering the
      highlighted search terms.
      Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <sebastian+dev@ramacher.at>
  29. 29 Mar, 2013 1 commit
  30. 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
      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
      Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <sebastian+dev@ramacher.at>