Commit graph

53 commits

Author SHA1 Message Date
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
Moritz Lipp
5c5df5bf82 Fixed rendering 2011-04-19 21:42:18 +02:00
Sebastian Ramacher
a415666cc1 zathura_page_t: replace rendered by visible 2011-04-19 18:33:28 +02:00
Moritz Lipp
a80770a320 Save zathura object in zathura_ocument_t 2011-04-19 17:46:44 +02:00
Sebastian Ramacher
fd283c8873 memory leak 2011-04-19 16:02:54 +02:00
Sebastian Ramacher
b2fc17207e Make plugin path configurable
* We don't fail if we can't load a plugin. There can be anything.
* Reintroduce the command line parser from glib.
* Use fstatat as it is more reliable than d_type from dirent.
2011-04-19 00:36:56 +02:00
Moritz Lipp
fdf0bd5649 Save surface temporary in page_t 2011-04-18 22:59:59 +02:00
Moritz Lipp
8bcb79ea94 Update 2011-04-18 21:22:35 +02:00
Moritz Lipp
536862900e Updated document.c/zathura.c 2011-04-18 18:23:34 +02:00
Sebastian Ramacher
f57fe5dfde update document.c/.h 2011-04-18 18:19:41 +02:00
Moritz Lipp
15d51567aa Use girara debug functions 2011-04-02 23:40:57 +02:00
Moritz Lipp
801fe03009 Changed the strucure a bit 2011-03-20 02:53:24 +01:00
Moritz Lipp
c5491675aa Update rendering 2011-03-20 02:09:04 +01:00
Johannes Meng
fdeb73436a Fixed plugin file type determination to be more fs-independent.
Signed-off-by: Moritz Lipp <mlq@pwmt.org>
2011-03-19 15:42:30 +01:00
Moritz Lipp
dd97387715 Began to implement dual/multiple view 2011-03-18 18:40:20 +01:00
Moritz Lipp
7d18faa452 Replace GtkWidget with zathura_image_buffer_t 2011-03-18 13:27:21 +01:00
Moritz Lipp
dc660d2c56 Register plugin correctly and handle dlhandle correctly 2011-03-06 09:14:36 +01:00
Moritz Lipp
d1cef30ef3 FIXME: Close dlhandle 2011-03-06 02:39:25 +01:00