Commit Graph

70 Commits

Author SHA1 Message Date
Moritz Lipp
60523c5506 Fix current page number check 2012-02-08 23:37:34 +01:00
Moritz Lipp
6fb95bc6cb Remove while loop 2012-02-08 23:33:31 +01:00
Moritz Lipp
70dbf39184 Merge branch 'develop' of pwmt.org:zathura into develop
Conflicts:
	document.c
2012-02-08 23:23:42 +01:00
Moritz Lipp
1d606ef027 Ask for password if file is encrypted 2012-02-08 23:21:27 +01:00
Sebastian Ramacher
7003df76a4 add method to get text from selection 2012-02-08 23:20:22 +01:00
Sebastian Ramacher
a5829b87ef off by one 2012-02-08 22:33:32 +01:00
Sebastian Ramacher
f4f24fe0cc Merge branch 'develop' of pwmt.org:zathura into develop
Conflicts:
	document.c
2012-02-08 22:33:10 +01:00
Sebastian Ramacher
e513cb5579 store rotation in history 2012-02-08 22:23:45 +01:00
Moritz Lipp
7ca0f3b20e Check current page number when read from history 2012-02-08 22:19:37 +01:00
Moritz Lipp
b0cf2749e2 Fix open_function call 2012-02-07 21:13:29 +01:00
Moritz Lipp
626fd50e32 Introduced zathura_plugin_error_t 2012-02-07 21:10:59 +01:00
Moritz Lipp
6a3fb02736 Fix automatic reload 2012-02-07 20:54:20 +01:00
Moritz Lipp
30f62a1f3a Implemented auto reload basics 2012-02-07 19:25:47 +01:00
Moritz Lipp
21a65cbe34 Rename PageViewWidget to PageWidget 2012-02-07 18:30:46 +01:00
Sebastian Ramacher
762f3819d4 add zathura_link_free 2012-02-07 17:41:40 +01:00
Sebastian Ramacher
aea5024ce3 add argument printing to zathura_page_render 2012-02-07 15:10:58 +01:00
Sebastian Ramacher
a1cdb48921 Create a page view widget (Closes: #90).
Add a widget derived from GtkDrawingArea that handles the drawing. It
automaticaly requests rerendering of the page if necessary (i.e on a scroll and
rotate).

This should solve all the rendering issues.
2012-02-05 11:24:34 +01:00
Moritz Lipp
419376f761 Add images_get and image_save functions 2012-01-22 22:15:13 +01:00
Sebastian Ramacher
82501190af add _attachment_save 2012-01-13 18:25:17 +01:00
Sebastian Ramacher
33173e018e more error handling 2012-01-13 18:07:21 +01:00
Sebastian Ramacher
c75eaf4c43 center the pages (Closes: #85, #87) 2012-01-13 17:39:46 +01:00
Sebastian Ramacher
10b5006828 reset scale if it is negative 2012-01-13 17:33:19 +01:00
Sebastian Ramacher
565104a769 coding style 2011-12-11 20:19:57 +01:00
Sebastian Ramacher
298daab365 don't loop indefinitly if a plugin directy doesn't exist 2011-11-22 18:57:09 +01:00
Moritz Lipp
133b127319 Skip '.' and '..' 2011-10-29 13:09:16 +02:00
Pavel Borzenkov
744320b8fa Fix build warning
The patch fixes the following warning:

document.c: In function ‘guess_type’:
document.c:174: warning: implicit declaration of function ‘read’

Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
Signed-off-by: Sebastian Ramacher <s.ramacher@gmx.at>
2011-10-24 08:39:39 +02:00
Sebastian Ramacher
c06a1a4df7 use BUFSIZ 2011-10-23 19:27:57 +02:00
Sebastian Ramacher
7ca688a964 read file blockwise to determine filetype 2011-10-23 19:26:06 +02:00
Sebastian Ramacher
911d84c908 update includes due to girara restructuring 2011-10-23 17:01:15 +02:00
Sebastian Ramacher
37189ece79 remove zathura_list_t 2011-10-22 00:11:42 +02:00
Sebastian Ramacher
f7e9c3d770 remove duplicated code 2011-10-21 23:40:16 +02:00
Sebastian Ramacher
4d7de4bb9f fix logic 2011-10-21 23:36:17 +02:00
Sebastian Ramacher
719557ff9e always close the plugin handle 2011-10-21 23:33:18 +02:00
Sebastian Ramacher
2572c2a5cc Guess the content from the actual data if it fails to do so from the file name alone. 2011-10-21 15:00:57 +02:00
Pavel Borzenkov
8608823613 Get file info earlier
We need to know the document's 'scale' value earlier (before cairo
surfaces are created). Otherwise, cairo surfaces will be re-created and
wrong page will be rendered (since zoom doesn't preserve page number).

Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
Signed-off-by: Sebastian Ramacher <s.ramacher@gmx.at>
2011-10-20 18:28:12 +02:00
Pavel Borzenkov
88be07272f There is no need to check return value of g_malloc()
It never returns NULL. If this function fails, the application is
terminated.

Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
Signed-off-by: Sebastian Ramacher <s.ramacher@gmx.at>
2011-10-20 18:27:56 +02:00
Sebastian Ramacher
10fbf29125 adopt to girara changes 2011-10-17 11:16:14 +02:00
Sebastian Ramacher
4f53b083ef Revert change from 481e52fd and change path_max to long.
pathconf returns -1 on error and if there is no limit. A buffer with size
(size_t) -1 would be too large.
2011-10-05 14:20:59 +02:00
Moritz Lipp
8d3cc43bbe Don't check if unsigned variable is less than zero 2011-10-05 13:49:40 +02:00
Moritz Lipp
8bf7587baf Show document information 2011-10-01 23:29:40 +02:00
Moritz Lipp
b5017f2396 Fix possible deallocation of a deallocated real_path 2011-09-30 12:32:29 +02:00
Sebastian Ramacher
b34d21afaf implement content type support 2011-09-29 15:23:13 +02:00
Moritz Lipp
c3ad7faf1a Use cairo to render page 2011-09-29 12:35:52 +02:00
Moritz Lipp
9f5d6cdd61 Added page_render_cairo function 2011-09-29 12:07:07 +02:00
Moritz Lipp
a6268788c0 Resolve warnings caused by -Wextra 2011-09-21 00:46:03 +02:00
Moritz Lipp
e20f425128 Some style updates 2011-09-21 00:25:41 +02:00
Moritz Lipp
86646affac Prevent segfault when closing zathura 2011-09-21 00:25:30 +02:00
Pavel Borzenkov
caccb94c69 Fix ':close' command
Currently, zathura crashes while performing ':close' command with the
following error:

GThread-ERROR **: file gthread-posix.c: line 226
(g_cond_free_posix_impl): error 'Device or resource busy' during
'pthread_cond_destroy ((pthread_cond_t *) cond)'

The error is because 'render' thread holds condition variable while
waiting for new pages to render. This patch modifies zathura's code to
correctly kill render thread and free allocated resources when the
document is being closed.

NOTE: should be applied on top of "Allow changing of "pages-per-row"
variable at runtime" commit to avoid conflicts in the
'page_view_set_mode()' function.

Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
2011-08-25 00:49:26 +02:00
Moritz Lipp
691b5c7697 Postscript support through libspectre 2011-04-26 17:09:39 +02:00
Moritz Lipp
5e4d584382 Merge branch 'render' into girara
Conflicts:
	Makefile
	config.c
	config.h
	document.c
	ft/djvu/Makefile
	ft/pdf-mupdf/Makefile
	ft/pdf-poppler/Makefile
	render.c
	zathura.c
2011-04-19 21:54:24 +02:00