1. 26 Oct, 2013 5 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.
    • 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.
    • 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
      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.
    • Abdo Roig-Maranges's avatar
      change arguments to page_calc_height_width · 7329209d
      Abdo Roig-Maranges authored
      now accepts a document object and explicit width and height. This will
      make it easier to reuse this function for computing the document page
      cell width and height.
  2. 18 Oct, 2013 1 commit
  3. 31 Aug, 2013 1 commit
  4. 30 Aug, 2013 3 commits
  5. 24 Aug, 2013 1 commit
  6. 21 Aug, 2013 1 commit
  7. 14 Aug, 2013 2 commits
    • Sebastian Ramacher's avatar
      Document that workaround · 033833c5
      Sebastian Ramacher authored
      And a remainder that we want to drop this once we don't support GTK+2 anymore.
      Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <sebastian+dev@ramacher.at>
    • Marawan Tanager's avatar
      Don't hide the inputbar in case of incremental search · c5e593d3
      Marawan Tanager authored and Sebastian Ramacher's avatar Sebastian Ramacher committed
      Hiding the inputbar immediately before jumping breaks incremental search, as
      Guillaume Duranceau stated in an earlier mail.
      This patch makes an exception for the case of incremental search, at the cost
      of a slight displacement when jumping back (^o) after ending the incremental
      search (pressing the ESC key). The rest of the jump cases are unaffected.
      This should makes things usable for now, until we move to GTK3 (link to it by
      default) which has a new widget that suits this problem nicely (GtkOverlay), as
      demonstrated by an earlier patch by Abdo Roig-Maranges which is now included on
      the develop branch in girara repo as commit
      70fd1cf354ee1300d4a9bdab9e939d5cc975979e, but is compiled only with GTK3.
      Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <sebastian+dev@ramacher.at>
  8. 27 Jul, 2013 2 commits
  9. 25 Jul, 2013 1 commit
  10. 07 Jul, 2013 2 commits
  11. 30 Jun, 2013 2 commits
  12. 29 Jun, 2013 4 commits
    • Sebastian Ramacher's avatar
    • Marwan Tanager's avatar
      Make the jumplist persistent on a per-file basis · 99b32ae1
      Marwan Tanager authored and Sebastian Ramacher's avatar Sebastian Ramacher committed
      This patch implements two new ZathuraDatabaseInterface functions, save_jumplist
      and load_jumplist, for both the plain and sqlite backends (along with some
      Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <sebastian+dev@ramacher.at>
    • Marwan Tanager's avatar
      Hide the inputbar and completion menu before saving the adjustments ratios... · 87a7f231
      Marwan Tanager authored and Sebastian Ramacher's avatar Sebastian Ramacher committed
      Hide the inputbar and completion menu before saving the adjustments ratios into a new jump structure
      Since we are now saving the adjustments ratios in the jump structures, we need
      to take care of the following scenario:
          - We do an action that results in a new jump structure being added to the
            jumplist while the inputbar is visible (e.g., search, jumping to a
            specific page, jumping to a bookmark, or following a link).
          - Since we are now storing the adjustments ratios in the jump structures,
            all of the above actions would result in the vertical adjustment ratio
            being saved while the inputbar and/or the completion menu is visible.
          - Now we are exactly on the target of the jump (note that the inputbar and
            completion menu now are hidden), so suppose that we want to go back using
            ^o (assuming that we didn't change the adjustments after jumping), then
            the check at sc_jumplist that compares the current adjustments ratios
            with that of the current jump (the jump that has just been added and
            which we are currently on it's position) would fail, because after the
            inputbar (with possibly the completion menu in case of bookmarks) is
            activated it is hidden, which results in the vertical adjustment upper
            bound to change, which in turn results in the vertical adjustment ratio
            returned by zathura_adjustment_get_ratio to become different from what is
            stored in the current jump structure, even though we haven't changed the
            adjustments at all after the jump.  This would always result in taking us
            back to the exact position of the jump (which would be slightly different
            from the current position) when we press ^o.  This can be annoying,
            because it would happen, for example, every time we need to go back
            quickly after jumping to a link target, a search result, or a bookmark.
      So, what this patch does is essentially to make the vertical adjustment ratio
      reflecting the current vertical adjustment after a jump, to always be the same
      as the one stored in the newly added jump structure, since both are calculated
      with zathura_adjustment_get_ratio while the inputbar is _not_ visible, so they
      should be the same.
      I've elaborated just to make things clear, in case the purpose of the patch
      isn't obvious.
      Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <sebastian+dev@ramacher.at>
    • Marwan Tanager's avatar
      Jumplist: record the adjustments ratios, rather than their values · 7465ad68
      Marwan Tanager authored and Sebastian Ramacher's avatar Sebastian Ramacher committed
      This makes jumping works accurately, even if the document is scaled up or down.
      Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <sebastian+dev@ramacher.at>
  13. 10 Jun, 2013 1 commit
    • 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>
  14. 28 May, 2013 2 commits
  15. 17 Apr, 2013 1 commit
  16. 02 Apr, 2013 2 commits
  17. 29 Mar, 2013 1 commit
  18. 26 Mar, 2013 3 commits
  19. 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>
  20. 17 Mar, 2013 3 commits
  21. 14 Mar, 2013 1 commit