| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
This is primarily for Flatpak packaging, where a "private service" is
desirable, although one could imagine using it in other contexts. The
prefix must be specified via the environment variable
`TUMBLER_SERVICE_NAME_PREFIX`.
Related to xfconf#27, see !21 for more details.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Plus a few gtk-doc droppings.
https://bugzilla.xfce.org/show_bug.cgi?id=12049
Signed-off-by: Philip Withnall <philip.withnall@collabora.co.uk>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds the TUMBLER_ERROR_DOMAIN and TUMBLER_ERROR defines and
a TumblerErrorEnum with currently only containing TUMBLER_ERROR_FAILED.
Also new is the TumblerThumbnailFlavor enum type, together with a few
utility functions related to creating thumbnails:
- tumbler_thumbnail_get_flavors() returns all flavors supported by
the current build of tumbler,
- tumbler_thumbnail_flavor_get_size() returns the size corresponding
to a flavor (e.g. 128 for TUMBLER_THUMBNAIL_FLAVOR_NORMAL),
- tumbler_thumbnail_flavor_get_directory() returns a GFile pointing
to the flavor directory (e.g. $HOME/.thumbnails/normal/ for
TUMBLER_THUMBNAIL_FLAVOR_NORMAL),
- tumbler_thumbnail_get_file() returns a GFile pointing to the
thumbnail destination file of an URI and a flavor,
- tumbler_thumbnail_create_and_open_file() tries to create such a
GFile and also tries to open it for writing, returning the
GFileOutputStream if possible.
|
|
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.
|