summaryrefslogtreecommitdiff
path: root/plugins
Commit message (Collapse)AuthorAgeFilesLines
* Add support for thumbnail size x-large and xx-largeGaël Bonithon2021-12-291-0/+6
| | | | Closes #51.
* desktop-thumbnailer: Allow to override configuration in desktop filesGaël Bonithon2021-12-291-37/+99
| | | | | | | The "X-Tumbler Settings" group is searched in each desktop file with the same keys as in `tumbler.rc`, where the default configuration is now. Closes #52.
* desktop-thumbnailer: Allow for thumbnailer overrideGaël Bonithon2021-12-292-9/+18
| | | | | | | By the usual rule: for a given thumbnailer name, the one placed in the highest priority directory overrides the others of the same name. Closes #53.
* Cleanup: Avoid code duplicationGaël Bonithon2021-12-291-48/+3
|
* gepub-thumbnailer: Add missing sanity checkGaël Bonithon2021-12-291-3/+2
|
* Reserve some third-party API messages to debug loggingGaël Bonithon2021-12-272-4/+16
| | | | | | | | FFmpegthumbnailer is known to be really verbose, and we don't have a priori control on the messages that can be displayed by external thumbnailers (it can be in particular FFmpegthumbnailer). Fixes #10, related to #29.
* Error handling: Fit to the spec and complete message if neededGaël Bonithon2021-12-2611-35/+60
| | | | | | | | | | | | | A parameter is added to Tumbler's internal error signals to account for the error domain, and the error code `TUMBLER_ERROR_OTHER_ERROR_DOMAIN` is added to indicate that the error originated from a third-party API. When sending the error signal via D-Bus, cancelling errors are filtered out, and when the error originates from a third-party API, the error message is prefixed with the domain and code of that error, in a possibly parsable format. Fixes #49.
* Debug: Add or adjust some traces and dumpsGaël Bonithon2021-12-2622-7/+71
|
* Debug: Prefer runtime to compile-time check for loggingGaël Bonithon2021-12-2615-75/+27
| | | | | | | This is more convenient for both the developer and the user, especially when it comes to providing logs in a bug report. As for the loss in terms of performance, it is minimal, and this is normally not an issue where these functions are used.
* Cleanup: Use `g_file_peek_path()` when appropriateGaël Bonithon2021-12-269-82/+32
| | | | | This simplifies the code, fixes leaks in `g_debug()` calls, and GLib 2.56 will be required when moving to Xfce 4.18.
* xdg-cache: Add missing sanity checkGaël Bonithon2021-12-231-1/+1
|
* xdg-cache: Remove temporary file when saving failedGaël Bonithon2021-12-231-0/+1
|
* xdg-cache: Set thumbnail permissions to 600Gaël Bonithon2021-12-221-2/+1
| | | | See https://specifications.freedesktop.org/thumbnail-spec/thumbnail-spec-latest.html#THUMBSAVE
* Fix mistake in previous commitGaël Bonithon2021-12-221-4/+4
| | | | I took the exception for the rule: let's hope this time it's good.
* Fix typo in previous commitGaël Bonithon2021-12-2211-11/+11
|
* Refactoring: Avoid code duplicationGaël Bonithon2021-12-2211-466/+21
|
* pixbuf-thumbnailer: Stop animated image loading at first frameGaël Bonithon2021-12-221-2/+19
| | | | Fixes #48.
* pixbuf-thumbnailer: Try to ignore `GDK_PIXBUF_ERROR_CORRUPT_IMAGE`Gaël Bonithon2021-12-221-35/+21
| | | | | Some images reported as corrupt are still displayable, see e.g. https://gitlab.xfce.org/apps/ristretto/-/issues/39.
* jpeg-thumbnailer: Add missing sanity checkGaël Bonithon2021-12-211-1/+1
| | | | Completes afb365a2e8cc57be895f4dc2d78d5f56d21700f9, related to #37.
* Use microsecond precision for last modification timeGaël Bonithon2021-12-214-27/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the file system allows it, this prevents Tumbler from believing that the original file has not been modified since the last time the thumbnail was created, when in fact modifications have taken place in the second that the thumbnail was created. The time of last modification is stored internally in a `gdouble`, and written to the PNG thumbnail in `%.6f` format. This complies well with the Freedesktop specification [1], as the stat command returns this format when invoked as `stat -c%.6Y file`, although it is likely that the specification was written with the idea that this value be an integer. The extraction of the thumbnail information is done via `g_ascii_strtod()`, so an integer or less precision is not a problem. As for a code expecting to find an integer, it is likely to simply ignore the decimal part, as Tumbler used to do by extracting the information via `atol()`. It is possible, however, that an error will be found if a more complete extractor is used, such as `strtol()`. The changes this causes to the exposed Tumbler APIs should also be inconsequential, as it is a conversion to a higher type. This should therefore result in implicit conversions, except perhaps for `tumbler_file_info_get_mtime()`, if its return value is explicitly stored in a `gint64`. [1] https://specifications.freedesktop.org/thumbnail-spec/thumbnail-spec-latest.html#CREATION Fixes #15, see !20 for more details.
* poppler-thumbnailer: Fix error handlingGaël Bonithon2021-12-201-4/+2
|
* pixbuf-thumbnailer: Simplify error handlingGaël Bonithon2021-12-201-24/+11
|
* font-thumbnailer: Fix error handlingGaël Bonithon2021-12-201-6/+7
|
* jpeg-thumbnailer: Do not use low quality embedded thumbnailGaël Bonithon2021-12-191-5/+14
| | | | Fixes #37.
* Do not translate warning messagesGaël Bonithon2021-12-1814-16/+16
| | | | Completes d6aeb7d65acf6e41738c78b9d137fab3502d1c58.
* gst-thumbnailer: Fix error handlingGaël Bonithon2021-12-171-7/+24
| | | | | | | | Ensures that Tumbler emits the "error" signal if the pixbuf generation didn't succeed and wasn't cancelled before the plugin handles the request. Similar to previous commit, related to #10.
* ffmpeg-thumbnailer: Fix error handlingGaël Bonithon2021-12-171-4/+9
| | | | | | | | Ensures that Tumbler emits the "error" signal if the pixbuf generation didn't succeed and wasn't cancelled before the plugin handles the request. Similar to 3eeec3c58adc0b2761d8d0dd3cdd4f6ac62ef6d7, related to #10.
* Define error messages in `tumbler/tumbler-error.h`Gaël Bonithon2021-12-176-16/+15
|
* odf-thumbnailer: Fix error handlingGaël Bonithon2021-12-161-5/+13
| | | | | | | Ensures that `pixbuf == NULL` => `error != NULL` and Tumbler emits the "error" signal (and not emit the "ready" signal). Similar to 1de05df20d52fb45e3c06e1d5ff36984341cb55d, Related to #7.
* xdg-cache: Ensure read_thumbnail_info() always sets an error on failurePhilip Withnall2021-12-161-0/+8
| | | | | | | | | It’s GError convention to set the GError exactly when returning FALSE from a boolean-valued function. read_thumbnail_info() didn’t do that if libpng reported an error loading the PNG; fix that by returning TUMBLER_ERROR_INVALID_FORMAT in that case. Related to #12.
* xdg-cache: Chain-up to parent in `finalize()`Gaël Bonithon2021-12-141-0/+2
|
* desktop-thumbnailer: Fill in `finalize()`Gaël Bonithon2021-12-141-0/+4
|
* gepub-thumbnailer: Fix a memory leakGaël Bonithon2021-12-141-0/+1
|
* desktop-thumbnailer: Fix some memory leaksGaël Bonithon2021-12-141-4/+5
|
* poppler-thumbnailer: Fix deprecation warningGaël Bonithon2021-12-131-4/+24
|
* ffmpeg-thumbnailer: Fix deprecation warningGaël Bonithon2021-12-131-0/+10
|
* desktop-thumbnailer: Fix error handlingGaël Bonithon2021-12-121-23/+16
| | | | | | | | | Pass the GError to all sub-functions of `load_thumbnail()` so that * `pixbuf == NULL` <=> `error != NULL` <=> Tumbler emits the "error" signal * `pixbuf != NULL` <=> `error == NULL` <=> Tumbler emits the "ready" signal (if there is no error afterwards when saving the thumbnail to disk)
* Fix some priority issuesGaël Bonithon2021-12-121-2/+3
| | | | | | | | | * Preserve the directory order in $XDG_DATA_DIRS and the priority of $XDG_DATA_HOME over $XDG_DATA_DIRS for desktop thumbnailers. * Fix some logical errors in `tumbler_registry_compare()`. * Keep the priority of the pixbuf thumbnailer plugin higher than that of the desktop thumbnailer plugin by default in `tumbler.rc` (it was lowered in 6935184665902097511db1708eaaf78015ff61ac).
* Fix copy-paste errors when creating pluginsGaël Bonithon2021-12-122-2/+2
|
* pixbuf-thumbnailer: Increase loader buffer sizeGaël Bonithon2021-12-111-2/+18
| | | | | | | | | | | See code comment for the rationale. Previously tested in Ristretto: https://gitlab.xfce.org/apps/ristretto/-/commit/178f6c74e19e1eb138b2730fe4e81e6eec6bdb37 https://gitlab.xfce.org/apps/ristretto/-/issues/16 https://gitlab.xfce.org/apps/ristretto/-/issues/73 See !19 for more details.
* pixbuf-thumbnailer: Use a mime-type-specific loader when possibleGaël Bonithon2021-12-111-2/+8
| | | | | | | | | | | | | | | | This allows to fully use the capabilities of the specific pixbuf loader for the considered mime type according to the installed optional libraries. This is especially necessary to load some SVG or HEIF thumbnails. On the other hand, if this specific loader doesn't work properly, it may be even more noticeable. This is the case for libopenraw, for which a dedicated plugin using another API has fortunately been implemented. So we just have to prioritize it in `tumbler.rc`. Fixes #20, #32, #36, see !18 for more details. Co-authored-by: @Krifa75 (Gitlab ID)
* Fix warnings from scan-build (Clang 13.0)Gaël Bonithon2021-12-112-1/+3
|
* Fix `-Wclobbered` compilation warningsGaël Bonithon2021-12-112-3/+5
| | | | | | | | | | These warnings appear only under certain conditions and/or for certain versions of the compilers. For example with GCC 11.1 when building with `--disable-debug` and with Clang 13.0. They had been left out in !16 with doubts about their validity, but they are actually understandable in view of `setjmp()` calls, and can be fixed easily.
* Fix compilation warningsGaël Bonithon2021-11-1016-52/+60
|
* Support shared thumbnail repositories of the freedesktop.org thumbnail specSergios - Anestis Kefalidis2021-07-243-7/+57
| | | | | | | Related: https://gitlab.xfce.org/xfce/libxfce4util/-/merge_requests/18 https://gitlab.xfce.org/xfce/thunar/-/merge_requests/126 https://gitlab.xfce.org/xfce/thunar/-/issues/262
* Fix missing parenthesesOlivier Duchateau2020-11-052-2/+2
|
* Add libgepub thumbnailer pluginOlivier Duchateau2020-11-057-0/+645
|
* Fix GTimeVal deprecationOlivier Duchateau2020-08-091-4/+5
|
* Use exif jpeg orientation hintAli Abdallah2020-08-061-7/+28
| | | | | | If tvtj_exif_extract_thumbnail fails to load a thumbnail, use what it has found as an orientation to generate a correctly oriented thumbnail image. This commit Fixes #28.
* Fix thumbnail orientation (Bug #15011)Andre Miranda2019-10-281-36/+34
| | | | | Use separated structs instead of union to avoid garbled values when a file (apparently) contains both types of metadata.