Commit graph

1335 commits

Author SHA1 Message Date
Sebastian Ramacher
7c3fa7fd1a Add support to detect mimetypes with magic
Thanks to Diego Joss <djego.joss@gmail.com> for the patch.
2013-02-08 10:59:26 +01:00
Sebastian Ramacher
74330c6459 Merge branch 'master' into develop 2013-02-08 10:45:41 +01:00
Moritz Lipp
ce6e7351ca Respect padding in sc_adjust_window
Thanks to Marwan Tanager
2013-02-07 09:26:37 +01:00
Moritz Lipp
88f1866fc4 Update README 2013-01-31 08:01:14 +01:00
Sebastian Ramacher
a45c58f0b5 Add tests for replace_substring 2013-01-25 23:19:26 +01:00
Sebastian Ramacher
b47d55338c Update copyright years 2013-01-22 21:56:43 +01:00
Sebastian Ramacher
9bffd42556 Import new translations from transifex 2013-01-22 21:42:10 +01:00
Sebastian Ramacher
f896b787e9 Update translations 2013-01-22 21:38:41 +01:00
Moritz Lipp
f8bc1302f5 Merge branch 'develop' 2013-01-20 16:39:52 +01:00
Moritz Lipp
1999c3552e Version 0.2.2 2013-01-20 16:39:48 +01:00
Moritz Lipp
de5b93dd55 Use GMutex instead of deprecated GStaticMutex 2013-01-20 16:38:36 +01:00
Sebastian Ramacher
c556a34daf Add Rob Cornish to AUTHORS 2013-01-17 14:34:54 +01:00
Rob Cornish
723f1535e1 Document saves with current basename if given a directory
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>
2013-01-17 14:28:19 +01:00
Sebastian Ramacher
9765b43113 Cover all cases of read.
Files smaller than GT_MAX_READ cause guess_type to hang in an endless loop.

Closes: #285
2013-01-17 10:13:31 +01:00
Sebastian Ramacher
a6e6c3f108 demote some info-level messages to debug 2013-01-15 11:31:35 +01:00
Sebastian Ramacher
67d4ba0768 fix fuzzy translations 2013-01-13 15:12:35 +01:00
Sebastian Ramacher
410e47a5d7 Update pos 2013-01-13 15:09:04 +01:00
Rob Cornish
1a6b03fc62 Fixed reverse searching behaviour to be more like less/vi
Signed-off-by: Sebastian Ramacher <sebastian@ramacher.at>
2012-12-19 00:29:31 +01:00
Benoît Knecht
8f50bf5ea0 Fix fence post error in page-widget's redraw_rect()
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>
2012-12-14 15:35:54 +01:00
Benoît Knecht
006724bc75 Update French translation
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2012-12-14 00:39:21 +01:00
Benoît Knecht
20def5bd78 Update translations
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2012-12-14 00:39:12 +01:00
Benoît Knecht
cdf1428050 Wrap long comment introduced in 27d7973
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2012-12-14 00:39:12 +01:00
Benoît Knecht
92c26ed28d Account for scrollbars when fitting page into window
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>
2012-12-13 18:18:03 +01:00
Benoît Knecht
99fbf0d17b Add function to get the size of the laid out document
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>
2012-12-13 18:18:03 +01:00
Benoît Knecht
27d7973586 Add document method to compute the size of a cell
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>
2012-12-13 18:18:03 +01:00
Benoît Knecht
ff305e6972 Initialize GdkRectangle structs in cb_view_vadjustment_value_changed
Initializing page_rect makes Valgrind happy; it was complaining before,
even though all the values were properly initialized, but it's more
obvious this way.

Initialize the other two structs in the same way for consitency.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2012-12-13 18:18:03 +01:00
Sebastian Ramacher
30fd662794 Support empty LINGUAS
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2012-12-13 14:01:40 +01:00
Benoît Knecht
a16819fdf0 Always free the GtkTreePath in sc_navigate_index
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2012-12-10 00:01:37 +01:00
Sebastian Ramacher
e929a5bd5a Readd set to list of mappings 2012-12-08 18:13:26 +01:00
Benoît Knecht
6c5d8c9b5e Declare missing shortcut functions and document them
"focus_inputbar" and "toggle_page_mode" were defined in code but not
declared as shortcut functions (and thus could not be mapped to
different keys by the user using "map").

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2012-12-08 17:59:33 +01:00
Benoît Knecht
7982efde00 Update the shortcut functions list in documentation
Also alphabetize the shortcut functions declarations in code, to make it
easier to keep the documentation and code in sync.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2012-12-08 17:59:24 +01:00
Benoît Knecht
5e53580808 Document display_link shortcut and its key binding
Update the zathura(1) and zathurarc(5) man pages.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2012-12-08 17:59:09 +01:00
Sebastian Ramacher
6df59353a7 Mention Benoît Knecht in AUTHORS 2012-12-07 18:09:48 +01:00
Benoît Knecht
2192b7172c Add new shortcut function to display links
This is useful when the text of the link doesn't match its target. The
default key is set to 'F'.

See issue 266 <http://bugs.pwmt.org/issue266>.

Reported-by: Iron <o380770@rtrtr.com>

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2012-12-07 18:05:59 +01:00
Sebastian Ramacher
526e76b6d8 Replace Report-Msgid-Bugs-To in update-po 2012-12-07 15:30:13 +01:00
Sebastian Ramacher
1a2b195ce9 Add some comments 2012-12-07 15:24:57 +01:00
Sebastian Ramacher
98510e7420 Try printing to the cairo object first 2012-12-07 15:11:57 +01:00
Sebastian Ramacher
e6f77735ba Improve printing quality again 2012-12-07 14:53:09 +01:00
Sebastian Ramacher
aef1b3b346 Call gtk_print_operation_cancel on failure 2012-12-07 14:52:49 +01:00
Sebastian Ramacher
1312825438 Draw white background on correct cairo instance 2012-12-07 14:36:24 +01:00
Sebastian Ramacher
895a0dfbfe Merge branch 'develop' of pwmt.org:zathura into develop 2012-12-07 14:26:07 +01:00
Sebastian Ramacher
cc9f047c76 Enabled embedded page setup 2012-12-07 14:24:14 +01:00
Moritz Lipp
31acb71078 Merge branch 'develop' of pwmt.org:zathura into develop 2012-12-06 22:34:33 +01:00
Sebastian Ramacher
23649bc0bc Fix printing
The plugins expect an image surface but the target of the print context might
not be one.
2012-12-06 21:43:21 +01:00
Benoît Knecht
48d12f49be Also wrap when scrolling with 'j' and 'k'
The scroll-wrap option used to only change the behavior of 'J' and 'K'
(i.e.  moving one page forward/backward).

Now, if scroll-wrap is true and the top of the first page is shown,
pressing 'k' will show the bottom of the last page; conversely, when at
the bottom of the last page, pressing 'j' will show the top of the first
page.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2012-12-06 20:39:16 +01:00
Benoît Knecht
c06d353eb7 Reverse scroll-wrap's logic
When set to true, it used to _not_ wrap around the begining/end. Now it
wraps if set to true, and it doesn't if set to false.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2012-12-06 20:38:51 +01:00
Benoît Knecht
824843a917 Correct misspellings of the word "synctex"
Both in the documentation and in function names, "synctex" was sometimes
spelled "syntex" or "syntec".

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2012-12-06 20:34:14 +01:00
Benoît Knecht
8047332b8e Update and correct French translation
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2012-12-06 20:34:09 +01:00
Benoît Knecht
a093e19ac2 Fix the "n=" shortcut to zoom to size n
No matter what the value of n was, the "n=" shortcut would set the zoom
value to 100%. It is now set to n% instead.

See issue #273 <http://bugs.pwmt.org/issue273>.

Reported-by: Kamil Smardzewski <roderyk197@gmail.com>

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2012-12-06 20:29:12 +01:00
Sebastian Ramacher
668973a8b9 Update translations 2012-11-21 23:45:47 +01:00