Commit graph

350 commits

Author SHA1 Message Date
Sebastian Ramacher
324d88100d Mark functions as const 2018-02-15 12:09:03 +01:00
Jeremie Knuesel
09d8a37c8e Add zoom column to sqlite database if missing 2018-02-13 20:00:56 +01:00
Jeremie Knuesel
4f3837c372 Remove Cairo 1.14 version checks
They're no longer needed since GTK+ 3.22 depends on Cairo >= 1.14
2018-02-12 15:18:18 +01:00
Jeremie Knuesel
1a12214a8c Bump GTK+ to 3.22 2018-02-12 14:50:14 +01:00
Jeremie Knuesel
f6dd3682a8 Fix compilation for GTK+ < 3.22 2018-02-12 11:16:49 +01:00
Jeremie Knuesel
55055758fa Assume PPI=100 (typical value) if info unavailable 2018-02-12 11:16:49 +01:00
Jeremie Knuesel
b4eca29d3a Replace monitor "dpi" with "ppi"
This should avoid some confusion with the font DPI
2018-02-12 11:16:49 +01:00
Jeremie Knuesel
d625c0d9bd Distinguish zoom and scale, always apply DPI correction on scale
Replace scale with zoom in most cases. Scale means pixels per point, as
before. The zoom is the screen-size / document-size ratio: a zoom of 1
means that the document should have the same size on screen as on paper.

This fixes many issues with the previous DPI changes, e.g. with link and
search rectangles.
2018-02-12 11:15:03 +01:00
Jeremie Knuesel
9bfefaf905 Check GTK+ version for monitor methods 2018-02-11 15:13:01 +01:00
Jeremie Knuesel
250547cabd Use DPI to scale documents to physical size 2018-02-11 15:11:43 +01:00
Jeremie Knuesel
fc5a344dc1 Use signals to detect DPI change 2018-02-11 15:11:43 +01:00
Jeremie Knuesel
553a8ff428 Store monitor DPI in document structure 2018-02-11 15:11:37 +01:00
Jeremie Knuesel
ff679a310b Comment fixes 2018-02-11 15:00:47 +01:00
Sebastian Ramacher
68ebb6f139 Debug output for content type mapping
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2018-02-10 21:13:30 +01:00
Sebastian Ramacher
4ea9d46584 Convert all MIME types to glib "content" types
On Linux they are the same, but somewhere else they might be different.
2018-02-10 21:09:22 +01:00
Sebastian Ramacher
21a9aed968 Fix return type 2018-02-10 13:31:13 +01:00
Sebastian Ramacher
b777e8487c Remove extra defines 2018-02-10 13:31:06 +01:00
Sebastian Ramacher
85458ef87e Convert to meson based build system 2018-02-10 13:27:45 +01:00
Sebastian Ramacher
49e1bd1b8c Use consistent debug messages
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2018-02-08 21:36:54 +01:00
Sebastian Ramacher
a0a07be99d Avoid explicit iterator
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2018-02-08 21:23:47 +01:00
Sebastian Ramacher
eb5c7079d2 Remove useless cast
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2018-02-08 21:16:06 +01:00
Sebastian Ramacher
821dc79117 Re-factor plugin loading
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2018-02-08 21:14:08 +01:00
Sebastian Ramacher
c46fc2a5ba Remove extra new lines 2018-02-04 10:47:41 +01:00
Sebastian Ramacher
cb887221e1 Drop register function
Do not forget to bump ZATHURA_ABI_VERSION before the next release.
2018-02-03 14:28:35 +01:00
Sebastian Ramacher
ad49cfa419 Display page label
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2018-02-03 13:27:18 +01:00
Sebastian Ramacher
bba265ccfe Add function to get page labels
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2018-02-03 13:27:07 +01:00
Sebastian Ramacher
a08150cfc6 Fix typo 2018-02-02 19:06:30 +01:00
Sebastian Ramacher
ba113fd21c Warn if color cannot be parsed
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2018-02-02 18:52:30 +01:00
Sebastian Ramacher
a6e419d724 Merge branch 'yitzchak-fix-dbus-edit' into develop 2018-01-31 13:17:11 +01:00
Tarn Burton
658fd4fe3b
Pass line and column to Edit signal 2018-01-31 06:22:24 -05:00
Sebastian Ramacher
abd52e45fa Use new foreach macros
Also fixes some memory leaks.
2018-01-29 01:16:28 +01:00
Sebastian Ramacher
93336db1b5 Start file monitor explicitly
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2018-01-29 00:04:43 +01:00
Sebastian Ramacher
8a003fb4cd Add start and stop functions 2018-01-29 00:04:19 +01:00
Sebastian Ramacher
1dbec870cb Rename arguments
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2018-01-29 00:04:00 +01:00
valoq
739a18540a
code cleanup 2018-01-28 15:50:00 +01:00
Sebastian Ramacher
0c7ed64c0a Merge remote-tracking branch 'knuesel/feature/links-font' into develop 2018-01-26 20:20:13 +01:00
Jeremie Knuesel
76e5f7dc7a Fix display of link hint
The link hint was truncated when the link rectangle was too small to
contain in. With this commit the link hint area is also redrawn.
2018-01-26 14:05:33 +01:00
Jeremie Knuesel
bab38fc636 Fix setting of link font 2018-01-26 14:03:37 +01:00
Sebastian Ramacher
c72e02d65d Merge remote-tracking branch 'knuesel/feature/hidpi' into develop 2018-01-25 13:39:31 +01:00
Jeremie Knuesel
a7f42769c6 Fix GTK+ version in README, other minor fixes
Minor fixes include a rewording of "user size" to "unscaled size": Cairo
has user units, (unscaled) device units and (scaled) device pixels.
2018-01-25 08:40:54 +01:00
Sebastian Ramacher
19645cf608 Merge branch 'knuesel/zathura-feature/hidpi' into develop 2018-01-24 22:16:21 +01:00
Jeremie Knuesel
9752b8f03b HiDPI: fix initial-zooming artifact 2018-01-24 21:48:20 +01:00
Jeremie Knuesel
4e9f8a7b1d HiDPI: refactor handling of device scale factors
The document scale factors are now guaranteed to be non-zero.

A new Cairo helper function get_safe_device_factors() and a type
zathura_device_factors_t are introduced to simplify the code and avoid
some #ifdef blocks.
2018-01-24 21:48:20 +01:00
Jeremie Knuesel
9cf3239708 HiDPI: zero check using DBL_EPSILON 2018-01-23 22:38:45 +01:00
Jeremie Knuesel
e0cf06ff05 Remove HAVE_HIDPI_SUPPORT
One can simply check the Cairo version now that GTK+ has been bumped to
3.10.
2018-01-23 22:22:40 +01:00
Jeremie Knuesel
29b6e45c02 Bump GTK+ to 3.10 2018-01-23 22:19:02 +01:00
Jeremie Knuesel
e487df053d HiDPI: use original notify callback signature 2018-01-23 21:55:12 +01:00
Jeremie Knuesel
7f4acdb0f4 HiDPI: fix thumbnail scaling 2018-01-23 11:34:22 +01:00
Jeremie Knuesel
36d9ece978 HiDPI: add preprocessor conditionals 2018-01-23 10:23:01 +01:00
Jeremie Knuesel
5fa4b8907e HiDPI: watch GtkWidget scale-factor property
The scale-factor property is more specific than the GDK configure event
and is the recommended way to watch for scale factor changes.
2018-01-23 09:17:01 +01:00
Jeremie Knuesel
b5d0b28bb9 Implement support for HiDPI displays 2018-01-22 22:51:36 +01:00
qwence
51f4bba5f5 Cases for vertical_center were swapped 2018-01-03 20:38:38 +01:00
valoq
4bde3d793f
seccomp implementation 2017-12-30 13:46:07 +01:00
Sebastian Ramacher
9cd6353cf8 Save some allocations
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2017-12-09 11:35:01 +01:00
Sebastian Ramacher
9514ee4e9e Make blist without arguments list all bookmarks (fixes #697)
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2017-12-09 11:25:13 +01:00
Moritz Lipp
28337773ec Escape document index titles
Fixes #692
2017-10-30 15:57:19 +01:00
Sebastian Ramacher
93775267fc Display notification after copying image
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2017-09-12 10:41:12 +02:00
Sebastian Ramacher
0fb57ad15c Include interface specification in resource
This commit essentially reverts
4ee323a89a. We now duplicate the data
again, but loading the interface specification from somewhere else does
not make much sense, since the specification must match the actually
implemented interface.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2017-07-08 12:28:49 +02:00
Sebastian Ramacher
e28598a07d Rename resources
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2017-07-08 12:19:05 +02:00
Sebastian Ramacher
1bf887edc5 Simplify 2017-06-30 20:24:32 +02:00
Sebastian Ramacher
30f5779828 CS
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2017-06-30 20:24:32 +02:00
Arkadiusz Drabczyk
7cf66fb685 Generate error when search fails
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2017-06-25 21:56:08 +02:00
Sebastian Ramacher
903548b902 Cast to correct type
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2017-06-20 21:31:31 +02:00
Sebastian Ramacher
e597921125 Fix placing of break
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2017-06-20 21:29:23 +02:00
Sebastian Ramacher
a3115e2c92 Clean up
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2017-06-13 19:48:28 +02:00
Sebastian Ramacher
801a28cdf4 Move mappings to girara
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2017-06-08 22:14:00 +02:00
Sebastian Ramacher
5a106c56f4 Also replace $FILE and % in shortcut
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2017-06-07 19:14:14 +02:00
Sebastian Ramacher
b4c87e05aa CS
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2017-06-07 18:50:56 +02:00
Sebastian Ramacher
e49bc8aa4a Sort list
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2017-06-07 13:14:59 +02:00
Sebastian Ramacher
2c6ab6b092 Use glib-compile-resource instead of sed magic
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2017-05-30 23:10:06 +02:00
Sebastian Ramacher
8c5b4a83cf Add a const
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2017-05-22 11:29:09 +02:00
Deven Lahoti
4be0983080 add continuous history save 2017-05-21 15:57:58 -05:00
Sebastian Ramacher
19df03f0ff Fix memory leak
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2017-05-02 21:57:33 +02:00
Sebastian Ramacher
39b54cddb3 Fix SQL statement
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2017-05-02 21:38:30 +02:00
Sebastian Ramacher
39cdfdb99a Bind correctly
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2017-04-30 12:38:31 +02:00
Sebastian Ramacher
ae97de3ab5 Check basepath in database backend
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2017-04-30 12:07:29 +02:00
Sebastian Ramacher
1317675c47 Mark _get_types as G_GNUC_CONST
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2017-04-28 21:20:47 +02:00
Sebastian Ramacher
f477f7a2a6 Allow plugin init without calls back to the plugin 2017-03-17 19:28:55 +01:00
Sebastian Ramacher
63314cfbc9 Simplify
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2017-03-17 18:00:07 +01:00
Sebastian Ramacher
49aa419568 CS
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2017-02-23 18:50:12 +01:00
Deven Lahoti
9f3f5b34e2 add vertical centering option 2017-02-22 19:18:25 -05:00
Sebastian Ramacher
0ca4789d66 Print name instead of path
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2017-01-26 22:27:06 +01:00
Sebastian Ramacher
be7b4c1ad1 Replace plugin register function call with const struct
This gets rid of a lot of back and forth between zathura and the plugins.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2017-01-26 22:23:12 +01:00
Sebastian Ramacher
b64b7132a2 Return const char
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2017-01-26 22:09:52 +01:00
Sebastian Ramacher
0263a7fa84 Fix memory leak on error 2017-01-24 23:59:18 +01:00
Sebastian Ramacher
7c5ec27314 Fix type
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2017-01-24 23:58:05 +01:00
Sebastian Ramacher
4ee323a89a Load D-Bus interface XML data during runtime
We already install the XML data anyway, so there is no reason to ship it
twice (once in the binary and once as a file).

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2017-01-24 22:50:40 +01:00
Sebastian Ramacher
1ae7ac0b9c Rename --debug to --log-level
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2017-01-06 20:11:54 +01:00
Sebastian Ramacher
16394a3a1f Switch to log functions
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2017-01-06 20:09:03 +01:00
Sebastian Ramacher
17f0e740b4 Use g_build_filename isntead
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-12-20 00:48:42 +01:00
Sebastian Ramacher
0890d1bb19 Use symbolic constant 2016-12-04 12:10:29 +01:00
Felix Kaiser
49e96c68e5 Make clicking a page set the current page number
This allows fast visual navigation through the 'd'ouble page
shortcut in combination with a high pages-per-row setting.

Resolves #635
2016-12-03 19:08:16 +01:00
Felix Kaiser
2371550807 Make page mode toggling predictable
Previously, toggling page mode would jump to near page, but usually
not the one your were looking at before.
2016-12-03 19:08:16 +01:00
Sebastian Ramacher
6aa5420f37 Simplify
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-11-07 23:10:18 +01:00
Sebastian Ramacher
4341a09473 Use constant instead of magic value
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-11-07 22:56:26 +01:00
Sebastian Ramacher
79a5d1fa68 Use constant instead of magic value
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-11-07 22:54:33 +01:00
Sebastian Ramacher
40d032b034 Update check for context menu creation
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-11-07 22:48:41 +01:00
Sebastian Ramacher
2948580edd Fix deprecation warning
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-11-07 22:45:09 +01:00
Sebastian Ramacher
9bc80b7733 Update handling of event == NULL
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-11-07 22:39:44 +01:00
Sebastian Ramacher
5026cbb9e3 Debug output 2016-11-06 23:39:27 +01:00
Sebastian Ramacher
527e260957 CS 2016-11-06 23:39:18 +01:00
Sebastian Ramacher
9b5dceac17 Debug output for sc_zoom
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-11-06 18:40:55 +01:00
Sebastian Ramacher
bcdc7aba05 Check adjust mode argument
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-11-06 18:23:25 +01:00
Sebastian Ramacher
10641d688d CS
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-11-04 19:37:13 +01:00
Sebastian Ramacher
32607326a9 Fix more callback return types
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-10-25 21:04:30 +02:00
Sebastian Ramacher
9ee80714d4 Fix return type of callbacks
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-10-25 20:59:33 +02:00
Sebastian Ramacher
be717529c2 Remove function pointer casts
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-10-25 13:37:51 +02:00
Sebastian Ramacher
945929ce5f Remove redundant check 2016-08-02 11:36:46 +02:00
Sebastian Ramacher
d913eda04a Simplify
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-06-24 19:46:09 +02:00
Sebastian Ramacher
cbfcd8a1b4 Remove unnecessary code
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-06-24 19:17:18 +02:00
Sebastian Ramacher
97cbbe7c06 More debug output
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-06-24 19:14:39 +02:00
Sebastian Ramacher
b85e8c389f Add debug output
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-06-24 19:06:04 +02:00
Sebastian Ramacher
b93ebeb327 Merge branch 'develop' of git.pwmt.org:pwmt/zathura into develop 2016-05-31 23:34:33 +02:00
Sebastian Ramacher
c9672357d2 Include girara/session.h so that Window is available in any case 2016-05-29 12:05:21 +02:00
Sebastian Ramacher
0069ef2860 Simplify check
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-05-01 18:26:29 +02:00
Sebastian Ramacher
67d1131bbb Fix infinite loop on NULL
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-04-29 20:48:49 +02:00
Sebastian Ramacher
2805cf1f2c Use g_get_current_dir instead
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-04-29 19:25:29 +02:00
Sebastian Ramacher
d3612f3c9b Remove useless g_strdup
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-04-29 18:57:35 +02:00
Sebastian Ramacher
25b276246b More debug output
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-04-29 18:15:49 +02:00
Sebastian Ramacher
19429574f4 CS
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-04-29 18:14:59 +02:00
Sebastian Ramacher
c7236aa8da Debug output for file completion
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-04-29 13:38:19 +02:00
Sebastian Ramacher
019416f943 Print debug output on invalid filemonitor type 2016-04-24 18:49:37 +02:00
Sebastian Ramacher
09c7f540ab Refactor file monitor and add option to reload on SIGHUP
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-04-24 18:26:54 +02:00
Sebastian Ramacher
d428ba3c77 Fix a macro 2016-04-24 17:43:12 +02:00
Sebastian Ramacher
e70316b236 CS
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-04-23 23:59:06 +02:00
Sebastian Ramacher
7717d7691e Fix typo 2016-04-23 23:58:50 +02:00
Sebastian Ramacher
f28d913ff9 Update string 2016-04-18 21:08:14 +02:00
Sebastian Ramacher
0e095c1a24 Use the last value for all unspecified pages per row
This change ensures that configs with "first-page-column=2" before 0.3.4 will
upgrade more sanely.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-04-03 20:38:51 +02:00
Sebastian Ramacher
4696e10cd8 Some clean up
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2016-04-01 17:19:39 +02:00
Moritz Lipp
3bc1d819a4 Assign document object iff pages exist
Only saves the document object iff the opened document contains pages. In
addition a check is implemented such that the nrow calculation does not crash.
2016-03-09 16:21:48 +01:00
Sebastian Ramacher
898d348770 Reduce another #ifdef 2016-02-26 19:01:17 +01:00
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