Commit Graph

260 Commits

Author SHA1 Message Date
Sebastian Ramacher
426fef1eb9 reload and write bookmarks before/after adding and deleting a bookmark 2011-07-08 17:03:05 +02:00
Sebastian Ramacher
54223aea6f Fix memory leaks in cb_inputbar_activate and handle empty bookmark names in
cmd_bookmark.

Thanks to Pavel Borzenkov for noticing the issue with empty bookmark names.
2011-07-07 14:00:10 +02:00
Pavel Borzenkov
e96ffc0379 Fix GString related memory leaks
This patch fixes a couple of GString related memory leaks. There is one
left in the cmd_set() function for the 's' type settings, but to fix it
we need to rework settings architecture a bit.

Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
Signed-off-by: Sebastian Ramacher <s.ramacher@gmx.at>
2011-07-07 13:22:45 +02:00
Pavel Borzenkov
f6120b5c19 Don't allow to set bookmarks with reserved names
Currently, 'page', 'offset' and 'scale' are reserved bookmark names.
We should not allow to set arbitary bookmarks with such names.

Also, this patch fixes memory leaks in the cmd_bookmark() function.

Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
Signed-off-by: Sebastian Ramacher <s.ramacher@gmx.at>
2011-07-07 13:21:04 +02:00
Pavel Borzenkov
14ef558b0d Fix bookmarks completion
My previous patch a206e5bb1f
(Save zoom level in the bookmarks file) added third varible with special
meaning into the bookmarks file. Add it to the exception list.

Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
Signed-off-by: Sebastian Ramacher <s.ramacher@gmx.at>
2011-07-05 14:59:43 +02:00
Pavel Borzenkov
a206e5bb1f Save zoom level in the bookmarks file
This patch introduces new configuration option: save_zoom_level.
If this option is set (default) zathura will store zoom level
in the bookmarks file on quit and restore it on open.

Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
Signed-off-by: Sebastian Ramacher <s.ramacher@gmx.at>
2011-07-05 13:11:58 +02:00
Pavel Borzenkov
a5e9c12651 Don't update status bar when scrolling left/right
Don't update Zathura.State.scroll_percentage when scrolling left/right
to avoid wrong values in the status bar.

Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
Signed-off-by: Sebastian Ramacher <s.ramacher@gmx.at>
2011-07-05 13:11:58 +02:00
Sebastian Ramacher
ac4faec443 Fix blinking while switching pages (Closes: #13)
Thanks to sagesag for the patch. If this breaks anything feel free to revert
this change.
2011-07-01 14:42:08 +02:00
Sebastian Ramacher
f13fd80f9b Fix input issues in fullscreen mode (Closes: #33)
Thanks to sagesag for the patch.
2011-07-01 14:37:33 +02:00
Sebastian Ramacher
63f18edb79 Support :digits (Closes: #41)
Thanks to Serge Guelton for the patch. Applied with some small modifications.
2011-07-01 14:00:33 +02:00
Sebastian Ramacher
98094f05fb Fix index navigation issues (Closes: #40).
Thanks to Serge Guelton for the patch.
2011-07-01 13:43:16 +02:00
Sebastian Ramacher
8a61d93e75 'cherry-pick' changes from jumanji 2011-06-26 02:55:56 +02:00
Sebastian Ramacher
8719eaa50c 'cherry-pick' e84bb6f from jumanji 2011-06-25 21:17:40 +02:00
Moritz Lipp
03348ccbf5 Fixed backwards searching 2011-05-19 10:57:42 +02:00
Sebastian Ramacher
061294b0ca make :write save and make it work with relative paths 2011-04-03 16:29:39 +02:00
Sebastian Ramacher
a48ee6be46 Fix regression from a1fe0f0b
In some cases sc_reload could still segfault. This should fix it.
2011-03-21 02:09:38 +01:00
Sebastian Ramacher
315f61b157 Fix GOptionEntries
... to make GLib 2.28 happy.
2011-03-21 01:49:01 +01:00
Moritz Lipp
2648c3f28d Fixed print command with additional arguments.
Previous version ignored second argument if more than 2 were given and
quoted the additional arguments leading to lp thinking they represented
a filename.

Before:
:print HPF300 14-15 -o side=onesided
-> lp -d HPF300 -P 1-38 ' -o side=onesided' 'filename'

Now:
:print HPF300 14-15 -o side=onesided
-> lp -d HPF300 -P 14-15  -o side=onesided 'filename'

Signed-off-by: mlq <mlq@pwmt.org>
2011-03-09 22:34:48 +01:00
Sebastian Ramacher
a1fe0f0b4b Don't segfault if reloaded document has less pages. 2011-02-17 19:45:02 +01:00
Moritz Lipp
1b835ed2f3 Hide inputbar frame 2011-01-11 02:35:01 +01:00
Sebastian Ramacher
e75a645621 fix build error with poppler >= 0.15 2011-01-02 11:05:30 +01:00
Sebastian Ramacher
91a2c6d3d1 redraw search result on NO_SEARCH 2010-12-21 15:20:03 +01:00
Sebastian Ramacher
e98ec46bd1 remove a memory leak 2010-12-21 15:11:14 +01:00
Sebastian Ramacher
765bd612b0 Fix some memory problems in search 2010-12-21 14:40:05 +01:00
Moritz Lipp
6ee1d48eaa Renamed functions 2010-12-21 11:57:31 +01:00
Moritz Lipp
10659ac545 Text searching problems
Updates the behaviour of the search function. Thanks to qnikst.
2010-12-21 11:53:40 +01:00
Moritz Lipp
9f8441461d Hide inputbar 2010-12-17 03:40:57 +01:00
Sebastian Ramacher
53cd5852b2 Remove two memory leaks. 2010-12-11 17:24:09 +01:00
Sebastian Ramacher
05f22f8f6a Make :open ~/some/file.pdf work again. 2010-12-11 17:17:31 +01:00
Sebastian Ramacher
1ef74826e6 Fix a regression from f91bea5f. 2010-12-11 17:16:19 +01:00
Sebastian Ramacher
205298bce7 Add option to disable auto-generated bookmarks (closes #73)
Applying patch from Minoru with some modifications since we already have
read_bookmarks_file.
2010-12-11 10:12:50 +01:00
Sebastian Ramacher
7627aa1752 more memory cleanup 2010-12-11 10:06:43 +01:00
Sebastian Ramacher
af61d097ed Reread bookmarks file before writing (closes #74)
Applying patch from Minoru with some simple adapations. Therefor
read_bookmarks_file doesn't leak (bookmarks is never freed).
2010-12-11 09:51:35 +01:00
Sebastian Ramacher
18da0bf228 Make it build without warnings if -Wno-zero-length is not set. 2010-12-01 23:07:09 +01:00
Sebastian Ramacher
8ea7af2c95 Fix some memory issues related to bookmarks (closes #26). 2010-12-01 11:19:35 +01:00
Sebastian Ramacher
cc580e0f4f remove double g_mutex_static_init 2010-11-17 18:56:51 +01:00
Sebastian Ramacher
8014327d50 Fix a memory leak in init_look.
init_look may be called from cmd_set so we've to free Zathura.Style.font first.
2010-11-17 09:46:05 +01:00
Sebastian Ramacher
5ad6af63c3 Make 'set scroll_wrap' work as expected.
Thank's to wart_.
2010-11-09 16:03:53 +01:00
Sebastian Ramacher
66b3bd32b3 Display scoll percentage in statusbar (Closes #58).
Thank's to acieroid.
2010-11-03 20:33:39 +01:00
Sebastian Ramacher
454b356f37 Implement wrap-around scrolling (closes #44)
Applied a modified version of raylu's patch. One can enable/disable wrap-around
scrolling with `set scroll_wrap 1/0". It's disabled per default.
2010-10-31 10:11:25 +01:00
Moritz Lipp
06c9f742a9 Check for ~ in save command 2010-10-30 22:57:39 +02:00
Moritz Lipp
325b63d49e Reload fix when no file is opened 2010-10-30 10:08:57 +02:00
Moritz Lipp
70ab033a2b Color window and viewport
Thanks to Strom
2010-10-25 14:10:10 +02:00
Moritz Lipp
c77d79ed47 Merge branch 'master' of pwmt.org:zathura 2010-10-18 20:16:51 +02:00
Moritz Lipp
4ccfee59da Open command with appended current filepath
Closes #30

Thanks to thorsten
2010-10-18 20:14:38 +02:00
Sebastian Ramacher
3c53e78433 Remove those NOTREACHED comments 2010-10-13 09:02:59 +02:00
Sebastian Ramacher
a23456e695 Add noreturn attribute to out_of_memory (closes #43)
Add __attribute__((noreturn)) to out_of_memory if supported by the compiler
(gcc, icc and clang).
2010-10-11 19:54:42 +02:00
Sebastian Ramacher
9605418e83 Apply patches from #43
* Protect LENGTH with surrounding parantheses.
* Use foo(void) for functions taking no arguments.
* Remove dead assignments.

Thanks to kaworu.
2010-10-11 19:41:43 +02:00
Sebastian Ramacher
de62b47577 some error handling and close handle before deleting the temporary file 2010-10-04 10:08:21 +02:00
Sebastian Ramacher
57f4ae817a don't hardcode stdin fileno 2010-10-04 09:57:46 +02:00