Commit Graph

1356 Commits

Author SHA1 Message Date
Sebastian Ramacher
f2ed53aa72 Fix the off-by-one with the poppler plugin
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-02-23 17:18:02 +01:00
Sebastian Ramacher
1fd5ca3ebb Remove some duplicated code
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-02-23 16:48:19 +01:00
Sebastian Ramacher
cad4b11764 Talk a bit more about flags.
Closes: #292
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-02-23 14:12:44 +01:00
Sebastian Ramacher
a079b05ddd Handle ZATHURA_LINK_NONE
Thanks to oblique for the patch.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-02-23 13:56:10 +01:00
Sebastian Ramacher
9134040300 Build tests with magic if WITH_MAGIC != 0
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-02-22 15:58:13 +01:00
Sebastian Ramacher
0a92abe720 Fix the logic in guess_type 2013-02-19 15:27:23 +01:00
Sebastian Ramacher
1899011a6c add some debug output 2013-02-19 15:19:10 +01:00
Sebastian Ramacher
4446456159 add some comments 2013-02-13 15:43:02 +01:00
Sebastian Ramacher
c6c0fd1ce2 Merge branch 'staging-mime' into develop
Conflicts:
	Makefile
	config.mk
	document.c
2013-02-13 15:41:38 +01:00
Diego Joss
1d23f466a2 replace g_content_type_guess with libmagic
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-02-13 15:33:29 +01:00
Sebastian Ramacher
4b1edf1a41 Be a bit more verbose in the README
There is another software called magic out there, so let's call it libmagic from
file(1).
2013-02-13 15:25:52 +01:00
Sebastian Ramacher
376aea65a0 Remove the note that glib >= 2.32 is required 2013-02-09 15:42:52 +01:00
Sebastian Ramacher
519c606923 g_get_real_time appeard in 2.28 2013-02-09 15:18:35 +01:00
Sebastian Ramacher
edde1bf00f Restore compatibility with earlier versions of glib
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-02-09 15:10:00 +01:00
Sebastian Ramacher
b0d5cdd7c0 Don't call g_threads_init with glib 2.31 and newer 2013-02-08 19:05:36 +01:00
Ignas Anikevicius (gns_ank)
c839e3fced Add Ignas to AUTHORS
Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-02-08 18:03:07 +01:00
Ignas Anikevicius (gns_ank)
7dd30a42cf Fix some mutex deprecation warnings in page-widget
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>
2013-02-08 18:03:07 +01:00
Ignas Anikevicius (gns_ank)
bb8bfc0dd3 Set the horizontal scroll step
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>
2013-02-08 18:03:06 +01:00
Marwan Tanager
815c51d066 Pass hadjustment to set_adjustment() instead of vadjustment.
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-02-08 14:24:18 +01:00
Sebastian Ramacher
3f20ede9ab Add Marwan and Diego to AUTHORS 2013-02-08 10:59:54 +01:00
Sebastian Ramacher
f51d66b8ed Update README 2013-02-08 10:59:43 +01:00
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