Document viewer
Find a file
Benoît Knecht c9eef95492 Use signals to readjust_view_after_zooming()
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 <sebastian+dev@ramacher.at>
2013-03-23 16:02:56 +01:00
po Update French translation 2013-03-17 14:15:00 +01:00
tests Build tests with magic if WITH_MAGIC != 0 2013-02-22 15:58:13 +01:00
.gitignore
adjustment.c Use signals to readjust_view_after_zooming() 2013-03-23 16:02:56 +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 Update style 2012-10-09 01:12:18 +02:00
bookmarks.h
callbacks.c Use signals to readjust_view_after_zooming() 2013-03-23 16:02:56 +01:00
callbacks.h Use signals to readjust_view_after_zooming() 2013-03-23 16:02:56 +01:00
commands.c Add a '--page' option to open at the specified page 2013-03-17 11:30:22 +01:00
commands.h Implement cmd_exec with 2012-08-14 11:45:11 +02:00
common.mk
completion.c Update style 2012-10-09 01:12:18 +02:00
completion.h
config.c Add 'q' and 'BackSpace' shortcuts in fullscreen mode 2013-03-17 14:15:11 +01:00
config.h
config.mk replace g_content_type_guess with libmagic 2013-02-13 15:33:29 +01:00
database-plain.c Implement input history IO in plain database 2013-03-17 16:19:10 +01:00
database-plain.h
database-sqlite.c Implement sqlite backend for input history 2013-03-14 22:20:51 +01:00
database-sqlite.h
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 the logic in guess_type 2013-02-19 15:27:23 +01:00
document.h Wrap long comment introduced in 27d7973 2012-12-14 00:39:12 +01:00
Doxyfile
glib-compat.h g_get_real_time appeard in 2.28 2013-02-09 15:18:35 +01:00
internal.h
LICENSE Update copyright years 2013-01-22 21:56:43 +01:00
links.c Handle ZATHURA_LINK_NONE 2013-02-23 13:56:10 +01:00
links.h Add new shortcut function to display links 2012-12-07 18:05:59 +01:00
macros.h
main.c Add a '--page' option to open at the specified page 2013-03-17 11:30:22 +01:00
Makefile replace g_content_type_guess with libmagic 2013-02-13 15:33:29 +01:00
marks.c Use signals to readjust_view_after_zooming() 2013-03-23 16:02:56 +01:00
marks.h
page-widget.c Don't render same page multiple times 2013-02-24 03:27:57 +01:00
page-widget.h Fix typos. 2012-07-22 15:17:31 +02:00
page.c Hide plugin structure and introduce new functions 2012-06-13 16:08:24 +02:00
page.h
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 Update README 2013-02-24 12:29:01 +01:00
render.c Fix the off-by-one with the poppler plugin 2013-02-23 17:18:02 +01:00
render.h
shortcuts.c Use signals to readjust_view_after_zooming() 2013-03-23 16:02:56 +01:00
shortcuts.h Add new shortcut function to display links 2012-12-07 18:05:59 +01: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 expose zathura_jump_[st] in the public API. 2012-09-02 00:44:18 +02:00
utils.c Use signals to readjust_view_after_zooming() 2013-03-23 16:02:56 +01:00
utils.h Use signals to readjust_view_after_zooming() 2013-03-23 16:02:56 +01:00
version.h.in
zathura.1.rst Add a '--page' option to open at the specified page 2013-03-17 11:30:22 +01:00
zathura.c Use signals to readjust_view_after_zooming() 2013-03-23 16:02:56 +01:00
zathura.desktop Update translations of Comment. 2012-08-09 14:47:18 +02:00
zathura.h Use signals to readjust_view_after_zooming() 2013-03-23 16:02:56 +01:00
zathura.pc.in
zathurarc.5.rst Add statusbar-basename option 2013-02-28 16:20:54 +01: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. Please note that sqlite3
with meta data support is required, i.e. sqlite3 has to be built with
SQLITE_ENABLE_COLUMN_METADATA defined.

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