If we have already requested a page to be rendered, we don't have to request it
once again.
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
According to my compiler output and the page on glib deprecated APIs
[1], some of the stuff needed to be removed or changed.
[1] - http://developer.gnome.org/glib/2.31/glib-Deprecated-Thread-APIs.html
Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
Previously it was set to -1, which was essentially disabling the
horizontal scrolling. This enables the scrolling by default by setting
it to be the same as the vertical scrolling.
Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
Currently, if :write is given a directory name as its argument, it fails with the "Failed to save document." error. This can sometimes be quite annoying: for instance, when viewing documents that have been downloaded to /tmp from the web, I often find myself wanting to hang on to file without changing its file name. In order to do so, I either have to leave Zathura and cp the file or else retype the whole filename after :write, neither of which are too convenient.
The following patch would make :write work sort of how mv does: if its argument is a currently existing directory, it will be inferred that the user wants to save the document in that directory using its current basename.
Signed-off-by: Sebastian Ramacher <sebastian@ramacher.at>
A rectangle whose horizontal coordinates are x1 on the left and x2 on
the right is (x2 + 1) - x1 pixels wide, not x2 - x1.
This error caused the search result highlighting to leave a
one-pixel-wide border behind, on the right and bottom side of the
result.
See issue 242 <http://bugs.pwmt.org/issue242>.
Reported-by: Abdó Roig <abdo.roig@gmail.com>
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
The width of the vertical scrollbar (if there is one) needs to be
substracted from the width of the GtkScrolledWindow in order to obtain
the correct dimensions of the view area.
See issue 27 <http://bugs.pwmt.org/issue27>.
It also deals better with documents where pages don't all have the same
size.
Reported-by: Andreas Weinlich <business@weinlich.org>
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
zathura_get_document_size computes the size of the document to be
displayed (in pixels), given the size of the individual cells. It takes
padding between the cells into account.
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
A document is laid out on a homogeneous gtk table/grid. This new method,
zathura_document_get_cell_size, computes the size of the cells in that
table/grid, at the current scale.
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>