Commit graph

119 commits

Author SHA1 Message Date
Sebastian Ramacher
6c7479c35e Make zathura_set_xid always available
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-02-26 18:59:24 +01:00
Sebastian Ramacher
0b45a313b7 Update macro name
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-02-26 18:29:22 +01:00
Sebastian Ramacher
1c9bc2dbcd Check for integer overflow
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-02-26 18:22:12 +01:00
Sebastian Ramacher
bdceb15398 Switch to multiplicative zooming (fixes #614)
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-02-26 18:10:12 +01:00
Sebastian Ramacher
771e0513bb Compare with fabs
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-02-25 00:06:26 +01:00
Sebastian Ramacher
9bfe4f222e Simplify 2016-02-25 00:06:04 +01:00
Sebastian Ramacher
ea094f2393 Split off jumplist function declarations 2016-02-24 23:56:32 +01:00
Sebastian Ramacher
f6754d7a00 Split handle_method_call
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-02-24 23:22:15 +01:00
Sebastian Ramacher
eda1dcec63 Split out fileinfo save
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-02-24 22:57:01 +01:00
Sebastian Ramacher
1c6d31a8b1 Check if there is a database
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-02-19 10:03:56 +01:00
Louisvh
9af0064fe2 Added quickmark functions to bindable shortcuts.
`mark_add` and `mark_evaluate` are now available as rebindable
shortcuts. Also added an entry in the zathurarc.5 manpage.
2016-02-05 04:18:56 +01:00
Louisvh
ec615d562f Removed unnecessary ifdef, fixed compiler warning
If WITH_SYNCTEX is not defined, synctex_editor will always be NULL, so
the ifdef is not needed. This gets rid of the "unused variable" warning
when compiling without synctex.
2016-02-05 04:05:13 +01:00
Sebastian Ramacher
80a0ae9f18 Fix some spelling mistakes
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-01-30 12:06:12 +01:00
Sebastian Ramacher
8946015219 Fix return type
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-01-20 15:25:08 +01:00
Sebastian Ramacher
e550ab66ee Reduce amount of leaked memory by libmagic
libmagic always leaks 48 bytes. Now we leak those bytes only once instead of
every content type detection.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-01-20 13:45:51 +01:00
Sebastian Ramacher
d1c38a703c Use GIO so we can later move the operation into the background
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-01-20 04:12:10 +01:00
Sebastian Ramacher
241d302b09 Fix memory leak 2016-01-20 04:11:51 +01:00
Sebastian Ramacher
48cf3a22e0 Error out earlier
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-01-20 02:43:56 +01:00
Sebastian Ramacher
0683b78f9d Factor out some code in separate functions
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-01-20 02:43:20 +01:00
Sebastian Ramacher
2da759149b Remove signal handler when closing
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-01-20 02:21:15 +01:00
Sebastian Ramacher
274809be41 Remove another #ifdef
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-01-20 02:06:09 +01:00
Sebastian Ramacher
ec5268a975 Reduce some of the #ifdef madness
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-01-20 01:57:56 +01:00
Sebastian Ramacher
564ae2bdd6 Children should not fork
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-01-18 12:42:05 +01:00
Sebastian Ramacher
fec81cf40b Ignore extra -- from g_option_context_parse
Debian bug #811032

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-01-15 02:02:39 +01:00
Sebastian Ramacher
aecb648374 Fix issues from clang-tidy
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-01-09 15:28:10 +01:00
Sebastian Ramacher
f1d027e656 Exit without failure if instance found
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-01-09 15:11:48 +01:00
Sebastian Ramacher
3dd360a27d Fail if pid is given but there is something wrong with the given pid
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-01-09 15:09:03 +01:00
Petr Šabata
b78be80d13 Build even without SyncTeX
synctex_editor is used no matter whether we're building WITH_SYNCTEX or
not.  This fixes a build failure when WITH_SYNCTEX isn't defined.

Signed-off-by: Petr Šabata <contyk@redhat.com>
2015-12-21 16:57:59 +01:00
Sebastian Ramacher
601fb84048 Split cb_print_draw_page
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2015-12-21 03:06:54 +01:00
Sebastian Ramacher
6f6e8ea94e Check errors of cairo_image_surface_create properly
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2015-12-21 02:23:27 +01:00
Sebastian Ramacher
f240bdb93c Divide by 255
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2015-12-21 02:22:05 +01:00
Sebastian Ramacher
5afde94e3d Manipulating data directly requires to call flush and mark_dirty
See documentation of cairo_image_surface_get_data.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2015-12-21 02:01:48 +01:00
Sebastian Ramacher
14af953708 Merge remote-tracking branch 'carrotIndustries/develop' into develop 2015-12-09 00:30:32 +01:00
Lukas K
7dc30c9c14 move uri basename handling to zathura_document_open 2015-12-07 22:27:09 +01:00
Sebastian Ramacher
ca0b8e1953 Call correct free function
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2015-12-07 12:52:34 +01:00
Sebastian Ramacher
f1a5fb4544 Move jumplist code 2015-12-07 12:41:06 +01:00
Lukas K
337305457f display uri in statusbar/title 2015-12-07 01:13:59 +01:00
Lukas K
859e0efa0f open URLs from dbus 2015-12-06 21:27:18 +01:00
Sebastian Ramacher
73699b12ea Handle URIs in :open
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2015-12-06 21:04:24 +01:00
Sebastian Ramacher
d895ad32a1 White spaces
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2015-12-06 20:23:18 +01:00
Sebastian Ramacher
73e8eedc35 Remove unused parameter
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2015-12-06 19:12:51 +01:00
Sebastian Ramacher
3d14894549 Revert parts of c3337bdd80
We still need a copy for the plugins.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2015-12-06 17:38:14 +01:00
Sebastian Ramacher
c3337bdd80 Also handle file:// URIs
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2015-12-06 13:51:49 +01:00
Sebastian Ramacher
bf73069d14 Merge branch 'carrotIndustries/zathura-features/gio-download' into develop 2015-12-05 12:57:17 +01:00
Lukas K
1de8e2a568 add gio download 2015-12-02 22:56:47 +01:00
Sebastian Ramacher
b5df57c1e1 Use fork to start other instances
This should help with #472 when multiple files are opened.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2015-11-24 01:03:38 +01:00
Sebastian Ramacher
12f57fb76a Refactor
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2015-11-24 00:47:18 +01:00
Sebastian Ramacher
ba72d40fbd Initialize GTK+ as late as possible (fixes #471)
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2015-11-24 00:34:55 +01:00
Sebastian Ramacher
96597253c8 Error messages if setsid or fork fail
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2015-11-23 23:55:45 +01:00
Sebastian Ramacher
32ad46441c CS
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2015-11-23 23:28:45 +01:00