Document viewer
Go to file
Marwan Tanager 87a7f2310f 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 <sebastian+dev@ramacher.at>
2013-06-29 11:35:13 +02:00
po Update translations 2013-05-04 15:37:12 +02:00
tests Build tests with magic if WITH_MAGIC != 0 2013-02-22 15:58:13 +01:00
.gitignore Add girara version check. 2012-03-16 13:32:09 +01:00
adjustment.c CS 2013-03-23 16:12:38 +01:00
adjustment.h Use signals to readjust_view_after_zooming() 2013-03-23 16:02:56 +01:00
AUTHORS Add oblique 2013-03-09 18:54:42 +01:00
bookmarks.c Bookmark the exact position, not just the page number (along with a number of fixes). 2013-06-21 09:45:36 +02:00
bookmarks.h Bookmark the exact position, not just the page number (along with a number of fixes). 2013-06-21 09:45:36 +02:00
callbacks.c Move calls to zathura_jumplist_add surrounding zathura_link_evaluate to zathura_link_evaluate itself 2013-06-21 10:56:08 +02:00
callbacks.h Use signals to readjust_view_after_zooming() 2013-03-23 16:02:56 +01:00
commands.c Bookmark the exact position, not just the page number (along with a number of fixes). 2013-06-21 09:45:36 +02:00
commands.h Implement cmd_exec with 2012-08-14 11:45:11 +02:00
common.mk add verbose build output 2011-08-31 16:04:55 +02:00
completion.c Update style 2012-10-09 01:12:18 +02:00
completion.h Add completion for :write (Closes: #138) 2012-03-20 00:54:12 +01:00
config.c Enhancements/Cleanups for the jumplist mechansim 2013-06-10 14:48:10 +02:00
config.h Update documentation 2012-02-08 15:30:13 +01:00
config.mk Version 0.2.3 2013-05-12 23:28:20 +02:00
database-plain.c Bookmark the exact position, not just the page number (along with a number of fixes). 2013-06-21 09:45:36 +02:00
database-plain.h Implement support to use both database backends. 2012-03-04 15:56:54 +01:00
database-sqlite.c Use sqlite3_mprintf for proper escaping 2013-06-21 10:36:52 +02:00
database-sqlite.h Update typo in function description 2012-03-14 08:15:23 +01:00
database.c Drop zathura_db_free 2013-03-14 21:30:40 +01:00
database.h Drop zathura_db_free 2013-03-14 21:30:40 +01:00
document.c Fix 2013-05-28 23:39:18 +02:00
document.h Allow negative offsets 2013-05-08 18:28:32 +02:00
Doxyfile Update Doxyfile 2012-02-08 15:38:54 +01:00
glib-compat.h g_get_real_time appeard in 2.28 2013-02-09 15:18:35 +01:00
internal.h Improve zathura_link_t 2012-05-28 12:43:22 +02:00
LICENSE Update copyright years 2013-01-22 21:56:43 +01:00
links.c Move calls to zathura_jumplist_add surrounding zathura_link_evaluate to zathura_link_evaluate itself 2013-06-21 10:56:08 +02:00
links.h Add new shortcut function to display links 2012-12-07 18:05:59 +01:00
macros.h Mark zathura->global.page_padding as deprecated. 2012-03-16 15:56:37 +01:00
main.c Add a '--page' option to open at the specified page 2013-03-17 11:30:22 +01:00
Makefile Add support to detect mimetypes with magic 2013-02-08 10:59:26 +01:00
marks.c Use jumplist with marks 2013-06-10 14:48:11 +02:00
marks.h Implemented marks 2012-04-21 04:59:58 +02:00
page-widget.c More Vim-like search behavior 2013-06-10 14:35:19 +02:00
page-widget.h Replace the periodic page reclaiming code with a LRU caching algorithm. 2013-03-26 12:45:43 +01:00
page.c Hide plugin structure and introduce new functions 2012-06-13 16:08:24 +02:00
page.h There is no need to include zathura.h anymore. 2012-04-03 18:39:00 +02:00
plugin-api.h Hide plugin structure and introduce new functions 2012-06-13 16:08:24 +02:00
plugin.c demote some info-level messages to debug 2013-01-15 11:31:35 +01:00
plugin.h Hide plugin structure and introduce new functions 2012-06-13 16:08:24 +02:00
print.c Add some comments 2012-12-07 15:24:57 +01:00
print.h Remove unnecessary include. 2012-06-08 18:10:54 +02:00
README Remove note about SQLITE_ENABLE_COLUMN_METADATA 2013-06-21 10:30:35 +02:00
render.c Fix some types 2013-04-02 11:39:06 +02:00
render.h Use a lock to lock the render thread for printing. 2012-06-03 22:06:57 +02:00
shortcuts.c Jumplist: record the adjustments ratios, rather than their values 2013-06-29 11:35:11 +02:00
shortcuts.h bisect functionality to navigate documents 2013-04-02 21:22:20 +02:00
synctex.c Update style 2012-10-09 01:12:18 +02:00
synctex.h Synctex backwards synchronization 2012-07-13 15:39:16 +02:00
types.c Update style 2012-10-09 01:12:18 +02:00
types.h Don't scroll the document when focusing the inputbar 2013-03-23 16:03:11 +01:00
utils.c Use strrchr in file_get_extension 2013-05-04 19:33:14 +02:00
utils.h Use signals to readjust_view_after_zooming() 2013-03-23 16:02:56 +01:00
version.h.in Fix version.h misspelling 2012-05-28 10:08:03 +02:00
zathura.1.rst Document new bisect functionality 2013-04-02 21:22:20 +02:00
zathura.c Hide the inputbar and completion menu before saving the adjustments ratios into a new jump structure 2013-06-29 11:35:13 +02:00
zathura.desktop Put %f back. 2013-06-19 21:26:21 +02:00
zathura.h Use jumplist with marks 2013-06-10 14:48:11 +02:00
zathura.pc.in Don't need to depend on GTK+ anymore. 2012-04-06 13:46:35 +02:00
zathurarc.5.rst Update documentation 2013-06-18 12:52:01 +02:00

zathura - a document viewer
===========================
zathura is a highly customizable and functional document viewer based on the
girara user interface library and several document libraries.

Requirements
------------
gtk2 (>= 2.28)
girara
sqlite3 (optional, >= 3.5.9)
check (for tests)
intltool
python-docutils (optional, for man pages)
libmagic from file(1) (optional, for mime-type detection)

Please note that you need to have a working pkg-config installation and that the
Makefile is only compatible with GNU make. If you don't have a working
pkg-config installation please set the GTK_INC, GTK_LIB, GIRARA_INC, GIRARA_LIB,
SQLITE_INC and SQLITE_LIB variables accordingly.

And also note that rst2man from python-docutils is needed to build the man pages.
If it is not installed, the man pages won't be built.

If you don't want to build with support for sqlite databases, you can set
WITH_SQLITE=0 and sqlite support won't be available.

The use of magic to detect mime types is optional and can be disabled by setting
WITH_MAGIC=0.

If you pass these flags as a command line argument to make, you have to ensure
to pass the same flags when executing the install target.

Installation
------------
To build and install zathura:

  make install

Uninstall:
----------
To delete zathura from your system, just type:

  make uninstall