| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The request thumbnailer array no longer contains one thumbnailer per
URI, but the list of available thumbnailers for this URI (after applying
the filters of the configuration file), sorted by priority.
For a given URI, we browse the thumbnailer list until we succeed in
generating a thumbnail. An error signal is only issued if the last
thumbnailer has failed. Intermediate errors are only displayed if debug
logging is enabled.
Closes #50.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
Any path found in a plugin Excludes will be ignored,
code contributed by Markus Kolb xfce@tower-net.de Bug #16130.
|
| |
|
| |
|
|
|
|
|
|
| |
Settings that allow to change the plugin priority, max file
size to act on, white-listed locations or completely disable
them.
|
| |
|
|
|
|
| |
This breaks the API but it is not finalized anyway yet.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This required some major changes, most of which are documented in the
source code. It still needs to be tested but it should be fine. The
mutex locks in TumblerManager could probably be optimized and some other
parts are not optimal with regards to speed and memory usage yet.
All in all, what's done now is:
- overrides files are parsed into override info structs and kept in
a (hashkey -> override info list) hash table
- each of these override info lists is sorted in the order of the
directories the overrides files are located in (with higher priority
directories coming first)
- the first override info in each list determines which specialized
thumbnailer is set as preferred for the corresponding hash key in
the registry
- thumbnailer service files are parsed into thumbnailer info structs
and kept in a (basename -> thumbnailer info list) hash table
- each of these thumbnailer info lists is sorted in the order of
the directories the thumbnailer service infos come from
- the first thumbnailers in each list are added to the registry
- whenever something changes on the disk, this internal representation
is updated
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Refactor the entire code to use TumblerFileInfo instead of separate
URI/MIME/flavor arrays. We now support flavors which means that
applications can request "normal" and "large" thumbnails and thus have
more control over what is created. This simplifies the code in a lot of
places. We now use a real GObject class called TumblerThumbnailFlavor
instead of a fixed-size enum. Cache backends can return as many flavors
as they want, each consisting of a name, a width and a height. As a
consequence, we can also get rid of the configure flags to
enable/disable normal, large and cropped thumbnails. The default cache
plugin shipped with Tumbler only supports "normal" (128x128px) and
"large" (256x256px).
Optimize the code a little bit. We now load the TunarFileInfo and
ThunarThumbnail only *once* for each URI instead of loading them once in
the scheduler and again in thumbnailer plugins.
This needs careful testing. I might have introduced a few memory leaks
here and there, plus new bugs... you never know.
|
|
|
|
| |
Signed-off-by: Jannis Pohlmann <jannis@xfce.org>
|
| |
|
|
|
|
| |
This commit also contains a few fixes though.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a major refactoring of the source code. Amongst others, the
classes TumblerProviderFactory, TumblerThumbnailer,
TumblerAbstractThumbnailer, TumblerThumbnailerProvider, TumblerCache,
TumblerCacheProvider and TumblerFileInfo have been added.
From now on tumbler supports different storage backends and thumbnailers
as plugins. Storage backends have to implement TumblerCache,
thumbnailers have to implement TumblerThumbnailer.
Plugins have to implement three methods: tumbler_plugin_initialize(),
tumbler_plugin_shutdown() and tumbler_plugin_get_types(). The latter
is expected to return a list of provider types for cache or thumbnailer
implementations.
Two example plugins have been added, one for the XDG thumbnail cache
and one for a GdkPixbuf based thumbnailer.
The code of tumblerd was updated to reflect these changes in libtumbler.
|
|
|
|
|
|
|
|
|
| |
There's a library called tumbler (or tumbler-1) now which provides
utility classes and functions for writing specialized thumbnailers. The
libary is LGPL while the D-Bus service itself is GPL.
The tumbler service was renamed to tumblerd and the marshallers
were moved into the library.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When an org.freedesktop.thumbnailer.Generic.Queue request is sent to
TumblerService, it does three things:
1. It requests a TumblerThumbnailer array from its TumblerRegistry.
This array has the same length as the URIs and mime hints arrays
passed to org.freedesktop.thumbnailer.Generic.Queue. The Nth
thumbnailer in the array is responsible for generating the
thumbnailer for the Nth URI.
2. It allocates a TumblerSchedulerRequest.
3. It asks the TumblerScheduler to push the request.
Amongst others, the following functions were added in this commit:
- tumbler_registry_get_thumbnailer_array()
- tumbler_registry_lookup() (private function)
- tumbler_scheduler_request_new()
- tumbler_schedulre_request_free()
- tumbler_thumbnailer_array_copy()
- tumbler_thumbnailer_array_free()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use a (gchar *) to (GList **) hash table for managing thumbnailers in
TumblerRegistry. For each so-called hash key (a combination of an URI
scheme and a MIME type, e.g. "file-image/png") we store a list of
registered thumbnailers. Only the first thumbnailer in this list will
ever be used. The others can move forward in the list when a thumbnailer
is unregistered.
The order in which thumbnailers are inserted into a list is defined as
follows:
- thumbnailers registered dynamically over D-Bus go before anything
else. The thumbnailer registered latest goes first.
- specialized thumbnailers with most recent service files go first.
- built-in thumbnailers are always at the end of the list in the
order they were added to the registry.
Connect to the new "unregister" signal of all TumblerThumbnailers to
remove them when required. The signal is only emitted by
TumblerSpecializedThumbnailers when their proxy is destroyed.
TumblerSpecializedThumbnailer has two new properties: "foreign" and
"modified". Foreign thumbnailers are those registered dynamically over
D-Bus (using org.freedesktop.thumbnailer.Manager.Register()). The
"modified" property represents the timestamp of when the thumbnailer's
.service file was last modified. It is 0 for foreign thumbnailers.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add new properties "uri-schemes" and "hash-keys" to TumblerThumbnailer
and add getter functions for all TumblerThumbnailer properties.
Add URI schemes parameter to the TumblerBuiltinThumbnailer constructor
and compute hash keys for built-in thumbnailers based on the provided
URI schemes and mime types.
Adds TumblerSpecializedThumbnailer which is created for each thumbnailer
either found in $XDG_DATA_DIRS/thumbnailers/ or registered dynamically
via org.freedesktop.thumbnailer.Manager.Register(). Internally it uses a
DBusGProxy to talk to the specialized thumbnailer service.
Add a GMutex to TumblerManager and lock all functions for now. Implement
the Register() method which creates a new TumblerSpecializedThumbnailer
and adds it to the registry.
|
|
This commit introduces the TumblerThumbnailer interface which is
supposed to be implemented twice, once for built-in thumbnailers that
run in the same process as tumbler itself, and once for specialized
thumbnailers which talk to tumbler over D-Bus. TumblerThumbnailer
provides a function for creating a thumbnail plus "ready" and "error"
signals. Their signatures may still change though.
TumblerBuiltinThumbnailer is a new class for built-in thumbnailers. It
is a little similar to ExoSimpleJob in that it allows built-in
thumbnailers to be created by defining a create function and a list of
mime types.
Also new is tumbler_pixbuf_thumbnailer_new() which creates a pixbuf
thumbnailer. It's just a skeleton for now.
TumblerRegistry now has a method tumbler_registry_add() for adding a
new TumblerThumbnailer to the registry.
Last but not least, there's tumbler-marshal.list for custom marshallers
now.
|