Commit Graph

171 Commits

Author SHA1 Message Date
Sebastian Ramacher
35f278e1f3 Add shortcuts for ^C and Esc in all modes
This should fix #392 and hopefully doesn't break anything else.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2014-02-14 12:59:25 +01:00
Sebastian Ramacher
26333fb20c Run D-Bus service all the time
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2014-01-11 22:03:36 +01:00
Sebastian Ramacher
bacdc19d23 Implement G and gg for index mode
Closes: #52

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2014-01-10 17:46:22 +01:00
Sebastian Ramacher
f504da0dd1 Implement TOGGLE for sc_navigate_index
Closes: #396

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2014-01-10 14:52:51 +01:00
Sebastian Ramacher
f41d372f75 Add mapping for SELECT
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2014-01-10 14:52:07 +01:00
Sebastian Ramacher
69e3851522 Merge branch 'feature/presentation-mode' of pwmt.org:zathura into feature/presentation-mode 2014-01-09 21:55:40 +01:00
Moritz Lipp
43aca4cb36 Add missing zoom key bindings 2014-01-09 21:39:16 +01:00
Sebastian Ramacher
5bdbebab7d Merge branch 'develop' into feature/presentation-mode
Conflicts:
	config.c
2014-01-09 17:16:56 +01:00
Sebastian Ramacher
68b665a49d Move config file loading to config.c 2014-01-06 16:02:58 +01:00
Sebastian Ramacher
4350053956 Some clean up
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2014-01-06 15:48:16 +01:00
Sebastian Ramacher
7b9fd65ce6 A const
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2014-01-06 15:34:03 +01:00
Sebastian Ramacher
f9ef7598a4 Add syntex-dbus-service setting to en/disable D-Bus service for synctex 2014-01-05 14:57:48 +01:00
Sebastian Neuser
e8bc7b1e49 Implement shortcuts for scrolling to page top/bottom 2013-12-17 17:47:20 +01:00
Sebastian Ramacher
60001b2ede A const
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-12-03 17:05:09 +01:00
Sebastian Ramacher
43c3ba86f4 Replace some more GdkColors with GdkRGBA
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-12-01 16:04:04 +01:00
Moritz Lipp
7f82bec71b Replace fullscreen mode with presentation mode 2013-11-25 23:10:35 +01:00
Sebastian Ramacher
f59a6f539e Remove GTK+2 support
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-11-25 18:57:59 +01:00
Sebastian Ramacher
e99be0fcce CS
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-10-30 03:29:45 +01:00
Abdo Roig-Maranges
0da491f78b merge callbacks for pages-per-row, first-page-column and page-padding
All of those callbacks are conceptually related (change the page
layout), and depend from one another.

Now the single callback page_layout_value_changed defers to
page_widget_set_mode to change whatever is needed in the GTK widgets.
2013-10-26 16:02:21 +02:00
Abdo Roig-Maranges
1d5efad36a add a config setting to prevent link_evaluate from changing scale
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-10-26 01:12:32 +02:00
Sebastian Ramacher
2c9e34fa8a Merge branch 'feature/renderer-take-2' into develop 2013-10-18 16:12:50 +02:00
Sebastian Ramacher
d48f1e023b Use primary selection as before
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-08-31 12:32:12 +02:00
Marwan Tanager
d09cd5c62c Make the X clipboard buffer configurable
This patch adds a new configuration setting, selection-clipboard, which allows
us to choose between the PRIMARY selection, and the CLIPBOARD selection, for
determining which X clipboard to use for storing mouse-selected data. It has
only two valid values: "primary" and "clipboard", with "clipboard" being set as
the it's default value.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-08-31 12:30:12 +02:00
Sebastian Ramacher
b02d3d4b8f Move recolor state to the renderer
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-08-24 00:07:32 +02:00
Guillaume Duranceau
12f7b393a6 new window-title-page option
When set to 'true', this option displays the page number in the title of
a zathura window.
2013-07-27 01:18:46 +02:00
Marwan Tanager
99b32ae109 Make the jumplist persistent on a per-file basis
This patch implements two new ZathuraDatabaseInterface functions, save_jumplist
and load_jumplist, for both the plain and sqlite backends (along with some
cleanups).

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-06-29 11:35:29 +02:00
Marwan Tanager
afd008f466 Enhancements/Cleanups for the jumplist mechansim
- Don't delete the elements on the right of the current one, when
	  appending a new jump to the jumplist, because this makes no sense at
	  all; the point of the jumplist in the first place is to remember
	  previously jumped-to positions in the document, so there is no need
	  to delete anythings except to trim the oldest entries from the
	  beginning to maintain the maximum size. This also makes us compatible
	  with the Vim way of doing things.

	- Make the jumplist mechanism functional on the same page; if we
	  followed a link to a target on the same page, remember the
	  adjustments before and after following the link. The same holds for
	  navigating search results on the same page.

	- Implement position_set and use it instead of position_set_delayed
	  when following links in order to give zathura_jumplist_save a chance
	  to record the exact adjustments of the link target. Otherwise, it
	  will always record the adjustments after going to the target page,
	  but before going to the exact position within it.

	- Don't consider movements with ^i and ^o as jumps :)

	- Don't use page_set followed by setting the adjustments in
	  sc_jumplist, because this is redundant and causes clutter when using
	  ^i and ^o, as the adjustments is set twice this way (once in page_set
	  and again in position_set_delayed).  It's enough to only update the
	  page number on the statusbar and then set the adjustments.

	- Hide implementation details (zathura_jumplist_save and
	  zathura_jumplist_append), and make things more consistent by
	  exporting and using only zathura_jumplist_add for adding new entries.

The end result: A more slick jumping experience :-)

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-06-10 14:48:10 +02:00
Abdo Roig-Maranges
49e5b053bf bisect functionality to navigate documents
This uses the jumplist to implement a bisect functionality between the
last two jump points. ^j and ^k are bound to bisect forward and backward
respectively.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-04-02 21:22:20 +02:00
Abdó Roig-Maranges
8e9631946d Option to keep horizontal position when following internal links
Added config parameter "link-hadjust" with default value true. When set to false,
following internal links do not change the horizontal position of the page, only
the vertical position.

Also updates page number when following links, now.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-04-02 14:30:44 +02:00
Sebastian Ramacher
ca2d279d10 Update translations
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-03-26 12:55:28 +01:00
Marwan Tanager
cb18fe8603 Replace the periodic page reclaiming code with a LRU caching algorithm.
This patch implements a page cache that is invalidated in a LRU fashion.

Pages are added to the cache as soon as they become visible. When the cache is
full and a new page that isn't in the cache becomes visible, the least recently
viewed page in the cache is evicted from memory and the new one takes it's
place.

The cache size is configurable using the page-cache-size configuration
variable, with a default value of 15 pages. Very large values for the cache
size are not recommended, though, as it will stress the system memory out.

The old periodic page reclaiming code is no longer necessary with this patch,
so I removed it.

Special thanks to Ignas Anikevičius, and Sebastian Ramacher for the
inspirations.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-03-26 12:45:43 +01:00
Benoît Knecht
f4b17f3389 Add 'q' and 'BackSpace' shortcuts in fullscreen mode
Now by default, 'q' quits zathura even in fullscreen mode, and
'BackSpace' does the reverse of 'space', i.e. go back one page.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-03-17 14:15:11 +01:00
Sebastian Ramacher
438c9cdc9f Add statusbar-basename option
Thanks to oblique for the patch.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-02-28 16:20:54 +01:00
Sebastian Ramacher
35adeacbf5 Implement colors for 'Loading ...'.
Thanks to oblique for the patch.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-02-23 17:33:03 +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
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
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
Moritz Lipp
31acb71078 Merge branch 'develop' of pwmt.org:zathura into develop 2012-12-06 22:34:33 +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
Moritz Lipp
05ab0a36f7 Update default key bindings 2012-11-02 13:17:59 +01:00
Sebastian Ramacher
f69bfcb5c1 Add shortcuts for +/- on the num pad
Thanks to Jean-Pierre Demailly for the patch.
2012-10-21 18:36:21 +02:00
Moritz Lipp
89e7832047 Update style 2012-10-09 01:12:18 +02:00
Moritz Lipp
94d8eef959 Toggle multi-page-mode with d 2012-10-06 14:58:07 +02:00
Moritz Lipp
f82845a0cb Merge branch 'develop' of pwmt.org:zathura into develop
Conflicts:
	config.c
2012-10-05 00:44:56 +02:00
Moritz Lipp
b24ae033ad Set fullscreen mode and custom button press events 2012-10-05 00:41:05 +02:00
Markus Scherer
92a75565a2 Enable horiontal mouse scrolling
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2012-10-02 19:07:32 +02:00
Moritz Lipp
7f42c4b7e7 Set scroll_full_overlap to zero by default 2012-09-19 21:31:52 +02:00
Jonas Hoersch
9c9d07a615 Introduce page aware scrolling
if scroll-page-aware is set, scrolling by full and half pages stops at
page boundaries (as djview4 does it on <space> and <backspace>).

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2012-09-17 16:42:56 +02:00
Jonas Hoersch
d76e33e3ec Add full page scroll overlap setting
The default of 0.1 keeps 10% of a page visible on a full-page scroll.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2012-09-17 16:30:39 +02:00