mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-11 05:53:51 +01:00
Document viewer
87a7f2310f
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> |
||
---|---|---|
po | ||
tests | ||
.gitignore | ||
adjustment.c | ||
adjustment.h | ||
AUTHORS | ||
bookmarks.c | ||
bookmarks.h | ||
callbacks.c | ||
callbacks.h | ||
commands.c | ||
commands.h | ||
common.mk | ||
completion.c | ||
completion.h | ||
config.c | ||
config.h | ||
config.mk | ||
database-plain.c | ||
database-plain.h | ||
database-sqlite.c | ||
database-sqlite.h | ||
database.c | ||
database.h | ||
document.c | ||
document.h | ||
Doxyfile | ||
glib-compat.h | ||
internal.h | ||
LICENSE | ||
links.c | ||
links.h | ||
macros.h | ||
main.c | ||
Makefile | ||
marks.c | ||
marks.h | ||
page-widget.c | ||
page-widget.h | ||
page.c | ||
page.h | ||
plugin-api.h | ||
plugin.c | ||
plugin.h | ||
print.c | ||
print.h | ||
README | ||
render.c | ||
render.h | ||
shortcuts.c | ||
shortcuts.h | ||
synctex.c | ||
synctex.h | ||
types.c | ||
types.h | ||
utils.c | ||
utils.h | ||
version.h.in | ||
zathura.1.rst | ||
zathura.c | ||
zathura.desktop | ||
zathura.h | ||
zathura.pc.in | ||
zathurarc.5.rst |
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