1. 04 Nov, 2013 3 commits
  2. 02 Nov, 2013 1 commit
  3. 01 Nov, 2013 3 commits
  4. 31 Oct, 2013 7 commits
  5. 30 Oct, 2013 3 commits
  6. 27 Oct, 2013 1 commit
  7. 26 Oct, 2013 22 commits
    • Sebastian Ramacher's avatar
    • Abdó Roig-Maranges's avatar
      pkg-config is not happy with --atleast-version · 117a32c3
      Abdó Roig-Maranges authored
      Hi,
      
      It seems that pkg-config complains when using --atleast-version together with
      --cflags or --libs. I attach a patch.
      
      Abdó.
      
      From d01e128e7b4c2decb4d3a05e23b9b12cfda62879 Mon Sep 17 00:00:00 2001
      From: Abdo Roig-Maranges <abdo.roig@gmail.com>
      Date: Sat, 26 Oct 2013 16:51:39 +0200
      Subject: [PATCH] pkg-config complains about --atleast-version
      
      pkg-config spits out
      
        Ignoring incompatible output option "--atleast-version"
      
      when using --atleast-version together with --cflags or --libs.
      Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <sebastian+dev@ramacher.at>
      117a32c3
    • Abdo Roig-Maranges's avatar
      get rid of the hide_inputbar hack · e02806b6
      Abdo Roig-Maranges authored
      We no longer need to hide the inputbar to get the right jump position,
      since now showing or hiding the inputbar does not change the position
      stored in the document object.
      
      Wen the adjustments get resized, the changed_callback resets the value
      from what is stored in the document object, effectively recentering the
      position to the middle of the viewport.
      e02806b6
    • Abdo Roig-Maranges's avatar
      remove zathura->global.update_page_number global hack · 84736dc8
      Abdo Roig-Maranges authored
      The callbacks are no longer aware of it anyways
      84736dc8
    • 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.
      9367d646
    • Abdo Roig-Maranges's avatar
      remove delayed versions of page_set and position_set · 860c7488
      Abdo Roig-Maranges authored
      We don't need the anymore since the new page_set and position_set are
      already 'delayed'.
      860c7488
    • Abdo Roig-Maranges's avatar
      get rid of a couple of static variables to remember adjustment. · ab9338cb
      Abdo Roig-Maranges authored
      Now the document object remembers it! and refresh_view is the one who
      restores the position.
      ab9338cb
    • Abdo Roig-Maranges's avatar
      use the new document functions in sc_scroll · e51a3265
      Abdo Roig-Maranges authored
      This way we get rid of page_calculate_offset that involves explicit GTK
      calls. Also, we can make use of page_number_to_position to align page
      and viewport as desired.
      
      I've also tried to make the code for this function a bit more readable.
      e51a3265
    • Abdo Roig-Maranges's avatar
      use the new document functions in sc_search · ace0836a
      Abdo Roig-Maranges authored
      This way we can get rid of explicit GTK calls to the adjustment
      ace0836a
    • Abdo Roig-Maranges's avatar
      use the new document functions in link evaluation · efc7d23f
      Abdo Roig-Maranges authored
      We now use the data available on the document object to compute the
      exact positioning of the link target.
      
      This way we get rid of page_calculate_offset, which uses explicit GTK
      calls.
      efc7d23f
    • Abdo Roig-Maranges's avatar
      use the new document functions for the jumplist · 4a75efd4
      Abdo Roig-Maranges authored
      And get rid of explicit gtk calls to the adjustment
      4a75efd4
    • Abdo Roig-Maranges's avatar
      use the new document functions for marks, bookmarks and initialization · 6ca81e37
      Abdo Roig-Maranges authored
      We get the position data from the document object instead of the gtk
      adjustment itself.
      6ca81e37
    • Abdo Roig-Maranges's avatar
      replace some page_set with refresh_view · f94d43d2
      Abdo Roig-Maranges authored
      page_set changes page and aligns the page according to settings. In
      those cases we do not want to change the position, only refresh.
      f94d43d2
    • Abdo Roig-Maranges's avatar
      replace delayed versions of page_set and position_set · 1171bffb
      Abdo Roig-Maranges authored
      The new page_set and position_set behave as delayed, but with the
      immediate availability of the new positions through the document
      object. We no longer need to keep delayed and non-delayed versions!
      1171bffb
    • 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.
      018e026e
    • 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
       both.
      36346362
    • 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
      add functions to compute page positions · 030a8c65
      Abdo Roig-Maranges authored
      The plan is to put in adjustment.c every piece of code that has to do
      with document positioning, either computing it from data on the document
      side, or talking to GTK.
      
      We want to have at our disposal functions to compute sizes and positions
      without having to ask for it to a GTK widget. The new functions are:
      
       - move page_calc_height_width to adjustment.c
      
       - add page_calc_position that rotates a position relative to a page
         according to the rotation settings.
      
       - add position_to_page_number that computes the number of a page
         sitting at a given position (given in document-relative coordinates)
      
       - add page_number_to_position that computes the position (in document
         relative coordinates) that will be placed at the center of the viewport.
      
       - add page_is_visible that checks whether the given page intersects the
         viewport.
      030a8c65
    • Abdo Roig-Maranges's avatar
      let the document know about the current adjustments · bca5bcc5
      Abdo Roig-Maranges authored
      The document object now has functions to set and get the position and
      the viewport size.
      
      The position is a relative position with respect to the size of the
      entire document, i.e. position_y=0 means top of the document and
      position_y=1 bottom.
      
      The viewport size is stored in screen coordinates, in pixels.
      bca5bcc5
    • Abdo Roig-Maranges's avatar
      move zathura_get_document_size to document.c · a0a64832
      Abdo Roig-Maranges authored
      It makes more sense, plus now the document knows about the page layout
      and can do the computation.
      a0a64832