Commit Graph

254 Commits

Author SHA1 Message Date
Sebastian Ramacher
58723a9313 support reading from stdin (closes #32)
This is highly experimental but should work in principal. If there is a better
way to dump the contents of stdin to a temporary file, send me a patch, please.
2010-09-27 17:01:09 +02:00
Sebastian Ramacher
6d3a5bae92 add function to get home dir if for some weird reason $HOME is not set 2010-09-27 15:57:29 +02:00
Sebastian Ramacher
17c5ec66d0 follow XDG specification (closes #35)
Use XDG_* environment variables to locate the config directory and data
directory. Uses ~/.config/zathura and ~/.local/share/zathura as fallback (the
directories specified in config.h's CONFIG_DIR and DATA_DIR respectively) if the
environment variables are not set.

Uncomment the ZATHURA_NO_XDG define in config.h to always use CONFIG_DIR and
DATA_DIR.

One can specify --config-dir and --data-dir to overwrite the precomputed config
and data location.
2010-09-27 15:22:23 +02:00
Moritz Lipp
2a0ed76de9 Fixed printing 2010-08-01 13:40:04 +02:00
Moritz Lipp
5fb26bd6c1 Fixed segmentation fault when mapping keys 2010-07-30 11:11:43 +02:00
Moritz Lipp
3213792ba1 Fix some memory leaks 2010-07-25 20:26:16 +02:00
Moritz Lipp
bc791ca517 Reset inputbar handler 2010-07-24 00:52:36 +02:00
Moritz Lipp
72fcf073c7 Change to NORMAL mode in isc_abort 2010-07-24 00:52:06 +02:00
Moritz Lipp
8847f34afe Allow configurable modes 2010-07-24 00:51:47 +02:00
Moritz Lipp
babaeacbf8 Fixed some quoating issues
Thanks to Sebastinas
2010-07-23 14:06:05 +02:00
Moritz Lipp
b541f617ae Specify configuration directory
With this commit it is possible to pass the path to an configuration
directory. Thanks to Sebastinas

Other changes:
  * Updated Makefile
  * Update Manpage
2010-07-22 23:40:55 +02:00
Moritz Lipp
98bf13102c Read global configuration file
Thanks to Sebastinas
2010-07-22 23:27:17 +02:00
Moritz Lipp
49e4e8abe1 Updated clear command 2010-07-20 20:42:33 +02:00
Moritz Lipp
4ff2e92630 Began to clean up some memory issues in the complete function (TODO) 2010-07-18 20:08:51 +02:00
Moritz Lipp
14b7cb633e Fixed some memory issues 2010-07-18 19:52:05 +02:00
Moritz Lipp
2c0b6d936a Escape uri/filename in open_uri/cmd_print 2010-07-15 22:39:48 +02:00
Moritz Lipp
047c6976d4 Fix segmentation fault in nav_index 2010-07-13 08:36:16 +02:00
Moritz Lipp
8a20451527 Delete line to start
Thanks to n0nsense
2010-07-08 12:35:57 +02:00
Moritz Lipp
66ebc2e198 Updated completion 2010-07-05 17:57:19 +02:00
Moritz Lipp
6293069f54 Optional parameters for print command 2010-07-05 12:35:38 +02:00
Moritz Lipp
543dc82d71 Improved completion 2010-07-04 21:47:19 +02:00
Moritz Lipp
6153f743c7 Fixed completion groups 2010-07-04 11:19:43 +02:00
Moritz Lipp
eaed702e2d Simplified development of cc functions 2010-07-04 10:35:15 +02:00
Moritz Lipp
a35da19b6e Define number of completion items 2010-07-04 10:25:11 +02:00
Moritz Lipp
a70cd3c900 Completion fix 1 2010-07-03 19:10:07 +02:00
Moritz Lipp
5cbc7de33f Smooth scrolling
With this commit it is possible to activate a smoother scrolling
by setting smooth_scrolling in the zathurarc file to e.g. 2.0.
2010-06-27 09:38:48 +02:00
Moritz Lipp
10526bf794 Append slashes to directories in cc_open
This patch appends slashes to directories in cc_open. In addition
lines in zathurarc that do not end with a new line won't be
ignored anymore.

Thanks to Trundle
2010-06-24 14:07:26 +02:00
Moritz Lipp
741e247551 Updated statusbar string manipulation 2010-06-22 01:57:08 +02:00
Moritz Lipp
0b5ad16f54 Set show_inputbar/statusbar 2010-06-21 21:00:59 +02:00
Moritz Lipp
58b5584afd Clean event->state 2010-06-21 18:27:44 +02:00
Moritz Lipp
b4415870a3 Restore adjustment after reloading the document 2010-06-21 16:27:38 +02:00
Moritz Lipp
f31279c204 Fix shortcut evaluation 2010-06-21 16:19:06 +02:00
Moritz Lipp
3bd6523074 Behaviour when buffer is not empty
This commit does not allow every shortcut
when the buffer is not empty
2010-06-19 16:42:53 +02:00
Moritz Lipp
e1d76edcf6 Clean event->state
Thanks to vimprobable
2010-06-19 16:19:40 +02:00
Moritz Lipp
bd3f292afc Clean up shortcuts 2010-06-19 10:33:36 +02:00
Moritz Lipp
2913fd5dac Update shortcut detection 2010-06-19 09:58:40 +02:00
Moritz Lipp
0e472ee74d Bindings for special keys
This commit makes it possible to define and use special keys
like <Space> on their own or in combination with a modifier:
<C-<Space>>.

In addition the evaluation of the keypress has been changed, so
that the order of the bindings do not matter any longer.
2010-06-18 12:58:20 +02:00
Moritz Lipp
37b591905b Set adjust_open and map zoom command 2010-06-18 11:03:11 +02:00
Moritz Lipp
ad0d890303 Do not process empty lines
This patch checks the length of a line in the zathurarc file: If
the line is empty it wont be processed to prevent a segmentation
fault.

Thanks to escherdragon.
2010-06-18 10:35:15 +02:00
Moritz Lipp
a2edaff96f Merge branch 'zathurarc'
Conflicts:
	zathura.c
2010-06-17 00:53:41 +02:00
Moritz Lipp
58d42bf329 Arguments and mode for mappings
It is now possible to define an argument and an additional
mode for the mapping.
2010-06-17 00:37:43 +02:00
Moritz Lipp
c6a9d72f36 Simple map function without any parsing 2010-06-16 23:13:25 +02:00
Moritz Lipp
fb2d8cc830 Added error message 2010-06-16 22:52:28 +02:00
Moritz Lipp
ac0461d357 Introduce a shortcut list
This commit introduces a shortcut list that is used
now to check given keybindgins: On the contrary to
the static shortcut array it can be easily modified
and extended.

In addition some malloc-checks have been introduced
and a named shortcut list that will be used to evaluate
the cmd_map parameters.
2010-06-16 22:46:02 +02:00
Moritz Lipp
dff4535c35 Added blank map function 2010-06-16 21:50:28 +02:00
Moritz Lipp
50fda82a0d Support for tabbed
This commit makes it possible to use zathura inside of tabbed by
running zathura with the -e argument.
2010-06-16 20:25:08 +02:00
Moritz Lipp
4b62f58b31 More options available in zathurarc
This commit makes much more settings available in the
zathurarc file.
2010-06-15 12:50:43 +02:00
Moritz Lipp
0d93bfb570 Update sc_reload behaviour 2010-06-15 10:17:38 +02:00
Moritz Lipp
27892b7d36 Check document health in sc_reload
This hack checks if the PDF file is damaged when
zathura tries to automatically reload it. Now even
if the document is damaged, zathura does not close
the current document session.
2010-06-15 09:39:22 +02:00
Moritz Lipp
a27d31d9b5 Introduced zathurarc 2010-06-14 21:52:19 +02:00
Moritz Lipp
766097ff92 Define colors and fonts with the set function
With this changes it is possible to set the colors
with the :set function.
2010-06-14 21:06:26 +02:00
Moritz Lipp
2d0e05ec8b Update scroll behaviour for half/full page scrolling 2010-06-14 17:22:06 +02:00
Moritz Lipp
a61192c314 Introduced page-wise scrolling
It is now possible to scroll one page or an half page up or down.
2010-06-14 17:16:10 +02:00
Moritz Lipp
24b8294369 Updated sc_scroll behaviour 2010-06-13 16:39:46 +02:00
Moritz Lipp
020e175817 Change window title to filename 2010-06-12 09:47:07 +02:00
Moritz Lipp
6d3bce6920 Prevent buffer overflow in realpath
This patch prevents a buffer overflow in the
realpath function.

Thanks to Abel Abraham Camarillo Ojeda
2010-06-06 19:27:10 +02:00
Moritz Lipp
af1f0f9dac Updated print command 2010-06-03 20:05:17 +02:00
Moritz Lipp
81d5a6e2a3 Added reload shortcut 2010-06-03 18:12:45 +02:00
Moritz Lipp
44374569fe Use GFileMonitor instead of inotify 2010-06-03 18:05:34 +02:00
neldoreth
189ce7c433 Fix toggle index 2010-06-03 17:11:49 +02:00
Moritz Lipp
9a5f94df41 Free some strings 2010-05-25 20:16:12 +02:00
Moritz Lipp
7a4c105705 Fixed off-by-one error 2010-05-25 09:03:02 +02:00
Moritz Lipp
fab51efea3 Enter password dialog
If the user tries to open an encrypted file, zathura aks for the password
in form of a dialog.
2010-05-24 21:26:40 +02:00
Moritz Lipp
b6f367612b Fixed cmd_open 2010-05-24 17:25:12 +02:00
Moritz Lipp
9936e31095 Added fullscreen mode for special shortcuts 2010-05-24 11:41:08 +02:00
Moritz Lipp
ecfe451807 Fullscreen
It is now possible to enable a fullscreen mode.
2010-05-24 09:38:54 +02:00
Moritz Lipp
f0c0c7b8ee Fixed search result highlighting 2010-05-19 12:13:28 +02:00
Moritz Lipp
eadca8d216 Scroll after switching page 2010-05-18 23:11:38 +02:00
Moritz Lipp
b5531fed3e Fixed redrawing search result 2010-05-18 22:24:15 +02:00
Moritz Lipp
742f687da6 Merge branch 'mouse' of 93.90.177.129:zathura into mouse
Conflicts:
	config.def.h
	zathura.c
2010-05-18 01:09:59 +02:00
Moritz Lipp
af4a487da7 Rebase from master 2010-05-18 01:01:52 +02:00
Moritz Lipp
b33e33fd36 Custom selection style 2010-05-18 00:59:50 +02:00
Moritz Lipp
c38d89bb15 Select right text in rectangle
With this commit zathura selects the text in the selected
rectangle and copies it to the clipboard.
2010-05-18 00:59:23 +02:00
Moritz Lipp
ca9a381bb0 Calculate drawing rectangle and copy text to cb
This commit calculates the rectangle that will be drawn
correctly. Now the mapped rectangle is calculated wrong,
but it gets the text of the document and copies it to
the clipboard.
2010-05-18 00:59:23 +02:00
Moritz Lipp
6e0616d35b Draw marked area
This commit draws an rectangle in the marked area.
2010-05-18 00:58:25 +02:00
Moritz Lipp
7007394634 Added GtkEventBox to catch mouse events
This commited introduces a GtkEventBox called document
that is responsible for catching all mouse events like
"released" or "motion".
2010-05-18 00:58:12 +02:00
Moritz Lipp
742c9770a2 Implemented scrolling 2010-05-18 00:57:37 +02:00
Moritz Lipp
6b852bec6d Scroll and click event callbacks defined
Two callbacks for "scroll" and "click" events
has been defined and connected to the view.
2010-05-18 00:57:37 +02:00
Moritz Lipp
d2973805c0 Custom selection style 2010-05-18 00:48:46 +02:00
Moritz Lipp
ee182e035a Select right text in rectangle
With this commit zathura selects the text in the selected
rectangle and copies it to the clipboard.
2010-05-18 00:22:42 +02:00
int3
ac0445457c Fix leak in State.pages 2010-05-14 17:30:00 +08:00
Moritz Lipp
1192099f65 Do not redraw search results 2010-05-13 11:39:20 +02:00
Moritz Lipp
5d7f332909 Fixed sc_follow 2010-05-13 11:36:05 +02:00
Moritz Lipp
fe3de42925 Merge branch 'master' of 93.90.177.129:zathura 2010-05-13 11:31:45 +02:00
Moritz Lipp
b2e511692d Highlight results: Wrong coordinates
This patch fixes the wrong re-recalculation of the
search item - rectangles.
2010-05-13 11:31:02 +02:00
int3
2cb8b250fa Fix some locking issues
Replaced document_lock with a more general pdf_obj_lock
2010-05-12 18:27:15 +08:00
Moritz Lipp
ebf76efdd6 Removed unnecessary check 2010-05-11 22:06:07 +02:00
Moritz Lipp
88d76762f5 Fixed typo on mutex 2010-05-11 20:55:21 +02:00
Moritz Lipp
5a0e067dce Highlight search results again
This commit is a incomplete patch to highlight the search
results again.
2010-05-11 20:45:47 +02:00
Moritz Lipp
bdc6f33325 Escape filenames 2010-05-11 20:09:20 +02:00
Moritz Lipp
473e51b8dc Fix document update feature 2010-05-09 22:28:25 +02:00
Moritz Lipp
0b2c7c3a12 Activate label mode only when reasonable
This patch checks while opening the pdf document
if it is reasonable to activate the goto label mode:
Sometimes all labels match their page number and then
the label goto mode will slow the navigation down.
2010-05-06 20:31:53 +02:00
Moritz Lipp
63c0312b57 Optional page offset mode
This commit is build on the idea of Renato Florentino to be able to
correct the page offset that some documents have. His patch, where
most of the code has been adapted to this commit ( thanks! ), made
it able to correct the current page and automatically calculate the
correct page offset. Now this patch will introduce a third mode to
the bcmd_goto command: You are now able to set the page directly,
calculate it over the offset or search the labels for it.
2010-05-05 20:05:06 +02:00
Moritz Lipp
5e45c8d608 Use labels in buffered goto command
The page labels are now used in the buffered command bcmd_goto, so
if this option is enabled and you try to reach page number 20, zathura
first seraches for a label named like that and moves to that page instead
of moving to page 20 in the document.
2010-05-05 12:51:18 +02:00
Moritz Lipp
52b4eb464f Added page labels
With this commit it is possible to show and use the labels of a page,
which makes it possible to use a page offset. E.g.: Sometimes the page
numbers written on the page in the document differ from the order in the
file, which can be annoying by e.g. trying to go to the page number >20<
that is instead page number >24< in the document.
2010-05-05 12:36:14 +02:00
Moritz Lipp
e4f80b864b Keyboard navigation for the index
This patch provides the functionality to browse through the index
via the keyboard hence the mouse is not needed anymore. The original
author of this patch is int3 <jezreel@gmail.com>, in addition there
has been introduced a fix solving problems with named destinations.
2010-04-27 16:07:49 +02:00
Moritz Lipp
273ba0c642 Updated key bindings
This commit fixes a typo concerning the scrolling command and adds
additional bindings for the spacebar, the arrow keys and two keys
you find on thinkpad keyboards.
2010-04-27 11:28:17 +02:00
Moritz Lipp
e17a8b433a Calculate drawing rectangle and copy text to cb
This commit calculates the rectangle that will be drawn
correctly. Now the mapped rectangle is calculated wrong,
but it gets the text of the document and copies it to
the clipboard.
2010-04-13 09:47:47 +02:00
Moritz Lipp
97a878a317 Draw marked area
This commit draws an rectangle in the marked area.
2010-04-13 00:22:56 +02:00
Moritz Lipp
68d74e09f8 Added GtkEventBox to catch mouse events
This commited introduces a GtkEventBox called document
that is responsible for catching all mouse events like
"released" or "motion".
2010-04-12 23:55:14 +02:00