Commit Graph

77 Commits

Author SHA1 Message Date
Sebastian Ramacher
a91108b078 Translate fields in cmd_info
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-11-01 14:06:56 +01:00
Sebastian Ramacher
a85074614d Fix typo in cmd_info (Closes: #353)
Thanks to tharvik for the patch.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-11-01 14:01:49 +01:00
Sebastian Ramacher
f10d847a95 CS
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-10-30 03:35:56 +01:00
Abdo Roig-Maranges
6ca81e3716 use the new document functions for marks, bookmarks and initialization
We get the position data from the document object instead of the gtk
adjustment itself.
2013-10-26 17:13:56 +02:00
Sebastian Ramacher
10115db62f Rewrite render thread as request based system
ZathuraRenderer is a thread pool rendering the pages. Every page widget holds a
ZathuraRenderRequest instance to request its page to be rendered. This object
can also be used to abort the request in case the page is not visible anymore.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-08-21 18:32:18 +02:00
Marwan Tanager
ae59da30c8 Bookmark the exact position, not just the page number (along with a number of fixes).
This patch adds some enhancements/fixes to the bookmarking feature of Zathura:

    - Bookmark the exact vertical and horizontal adjustments values, along with
      the page number. This is done in a backward-compatible way for both the
      plain and sqlite database backends, so that bookmarks that was taken
      previously (bookmarking only the page number) will still work as expected
      and won't be lost.

    - Fix the issue of not being able to remove bookmarks from the plain
      database; removing a bookmark in plain_remove_bookmark using
      g_key_file_remove_key corrupts the bookmarks file.  This is due to not
      truncating the entire bookmarks file in zathura_db_write_key_file_to_file
      prior to overriding it with a new one not containing the removed line.
      This is why, I guess, plain_remove_bookmark hadn't been implemented as
      expected using g_key_file_remove_key, because apparently, someone thought
      that the problem is caused by this API.

    - Fix not being able to update existing bookmarks persistently; updating a
      bookmark works only during the current session, but after the file is
      closed and reopened, the updated bookmark still has it's old value. This
      is due to changing only the bookmark structure in memory; the proper way
      to do it, is to call zathura_db_remove_bookmark on the old bookmark, then
      follow that by a call to zathura_db_add_bookmark on a bookmark structure
      containing the new position and the same old ID.

    - Make zathura_bookmark_add updates the bookmark if it already exists,
      rather than doing this externally in cmd_bookmark_create. This allows us
      to have all the relevant girara_notify messages in cmd_bookmark_create.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-06-21 09:45:36 +02:00
Marwan Tanager
a0c12d4cdd Save position on the jumplist before and after jumping to a bookmark
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-06-10 14:48:11 +02:00
Marwan Tanager
cc3b9aea18 More Vim-like search behavior
This patch activates the last aborted search when pressing the search shortcuts
('n' or 'N').

To avoid confusion, and to make things more predictable, I've chosen to always
reactivate an aborted search starting from the beginning (or end, in case of
'N' or '?') of the current page, as opposed to Vim which continues from the
next search term each time the search is reactivated.

Searching using '/' or '?' doesn't center the view at the current search term
like when using 'n' or 'N', so we fix this here.

Also, I managed to work around the issue of the thin rectangular margins that
show around the previously-highlighted search terms after the search is aborted
(either explicitly or as a result of following links), by redrawing the page
widget (only if it's visible) instead of redrawing the rectangles covering the
highlighted search terms.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-06-10 14:35:19 +02:00
Moritz Lipp
87f10baffc Allow negative offsets 2013-05-08 18:28:32 +02:00
Benoît Knecht
27c291758e Add a '--page' option to open at the specified page
If '--page [number]' (or '-P [number]') is given on the command-line,
the document is opened at the specified page number. Negative numbers
are allowed, and denote a page number starting from the end of the
document.

See issue 275 <http://bugs.pwmt.org/issue275>.

Reported-by: bob <sean258@gmail.com>
2013-03-17 11:30:22 +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
Moritz Lipp
89e7832047 Update style 2012-10-09 01:12:18 +02:00
Sebastian Ramacher
07fbbd514a Lock the render thread while searching.
This is a temporary workaround because of issues in the poppler plugin. We
really need to introduce locking in the poppler plugin and remove the render
locks agains.

Closes: #253
2012-09-22 12:50:11 +02:00
Moritz Lipp
a08520a33d Implement cmd_exec with 2012-08-14 11:45:11 +02:00
Moritz Lipp
66b6fa65a1 Add --version command line argument 2012-07-12 10:37:58 +02:00
Moritz Lipp
d3203905f1 Implement :version command 2012-06-13 16:08:33 +02:00
Moritz Lipp
83f55ff24a Implement sc_print 2012-05-08 16:47:34 +02:00
Moritz Lipp
c69eebd87f Export images and attachments 2012-05-01 11:54:52 +02:00
Moritz Lipp
036dc0cd57 Implement hlsearch/nohlsearch 2012-04-22 19:12:45 +02:00
Sebastian Ramacher
1e2ff0557e Hide some structs from the plugins. 2012-04-06 13:54:17 +02:00
Moritz Lipp
97247f41ca Unhitch zathura_t from document_t/page_t/plugin_manager_t 2012-04-03 09:02:45 +02:00
Moritz Lipp
7a9c7d762c Prevent possible null pointer dereference 2012-04-01 11:38:38 +02:00
Moritz Lipp
ab4c364e56 Update document information plugin api 2012-03-30 18:24:00 +02:00
Moritz Lipp
334b4fbb95 Introduce and use zathura_document wrapper functions 2012-03-27 21:59:35 +02:00
Moritz Lipp
4ade2c1472 Introduced plugin.h and plugin-api.h 2012-03-27 13:30:04 +02:00
Moritz Lipp
5bf32f33a5 Rename page_get_id to page_get_index 2012-03-26 15:30:58 +02:00
Moritz Lipp
efc108fbe2 Introduced page.h 2012-03-26 14:44:56 +02:00
Moritz Lipp
90796b5b5c Added :offset command and some style updates 2012-03-24 18:27:10 +01:00
Moritz Lipp
3908c70eec Implemented cmd_quit 2012-03-24 10:38:48 +01:00
Sebastian Ramacher
66bc63f5a7 Rename page_widget to page-widget. 2012-03-16 14:37:54 +01:00
Moritz Lipp
4144bcf5a0 Display error message if no document information is available 2012-03-06 21:55:10 +01:00
Sebastian Ramacher
82c38fa336 Update de.po 2012-03-05 17:27:17 +01:00
Sebastian Ramacher
d1cd82fe68 Don't overwrite existing files in :save 2012-03-05 15:04:29 +01:00
Sebastian Ramacher
81e5d60ad7 Make strings in cmd_save and cmd_savef translateable. 2012-03-05 12:25:34 +01:00
Moritz Lipp
0049b6fa4b Notify if an error occurs in the :write command 2012-03-04 23:54:03 +01:00
Sebastian Ramacher
b7a20a5e2b Make all strings passed to girara_notify translateable. 2012-03-04 18:45:58 +01:00
Moritz Lipp
625db90579 Removed some obsolete checks 2012-02-20 20:54:21 +01:00
Moritz Lipp
b6f1868e7f Fix automatic file reloading 2012-02-20 20:07:24 +01:00
Moritz Lipp
bf0bb66503 Abort search if page_search_text is not implemented 2012-02-18 09:21:34 +01:00
Moritz Lipp
3facd5beb0 Replace image_save with image_get_cairo 2012-02-11 17:53:28 +01:00
Moritz Lipp
626fd50e32 Introduced zathura_plugin_error_t 2012-02-07 21:10:59 +01:00
Sebastian Ramacher
b60804ef78 implement search forward and backward 2012-02-07 19:15:01 +01:00
Moritz Lipp
21a65cbe34 Rename PageViewWidget to PageWidget 2012-02-07 18:30:46 +01:00
Sebastian Ramacher
ed61553309 jump to first result if it is not one the current page 2012-02-07 18:19:48 +01:00
Sebastian Ramacher
ba0ee61dfe draw search results again 2012-02-07 16:59:42 +01:00
Moritz Lipp
d3967d9bde Save links in page_view_widget 2012-02-07 16:39:02 +01:00
Sebastian Ramacher
c2b9d22ad1 don't search on hidden pages 2012-02-07 15:05:22 +01:00
Sebastian Ramacher
01bdd58104 implement cmd_search 2012-02-07 12:08:00 +01:00
Sebastian Ramacher
82525556a3 implement :export 2012-01-13 18:54:09 +01:00
Sebastian Ramacher
777e19baf4 const correctness 2011-12-09 14:48:16 +01:00