summaryrefslogtreecommitdiff
path: root/tumbler
diff options
context:
space:
mode:
authorJannis Pohlmann <jannis@xfce.org>2011-02-13 13:37:55 +0100
committerJannis Pohlmann <jannis@xfce.org>2011-02-13 13:37:55 +0100
commit7aad7803fe9875d8b651ab174607a1943ac30fa2 (patch)
tree617960055a8fb2ad53ca0dc8aa9dfbae5e874409 /tumbler
parent80a231891c5d1e43fb727ec007a4ab7b8aff468f (diff)
downloadtumbler-7aad7803fe9875d8b651ab174607a1943ac30fa2.tar.gz
Make Cleanup() take an array of base URIs instead of just one.
The thumbnail management D-Bus specification was updated accordingly. This change makes sense due to the following reason: when trashing a directory we cannot simply call org.freedesktop.thumbnails.Cache1.Delete as this will only remove the thumbnail of the directory itself, not of its descendants. But we can use the Cleanup method for this. With Cleanup taking an array of base URIs instead of just one we can avoid hundreds of Cleanup calls when trashing a large number of files.
Diffstat (limited to 'tumbler')
-rw-r--r--tumbler/tumbler-cache.c10
-rw-r--r--tumbler/tumbler-cache.h6
2 files changed, 8 insertions, 8 deletions
diff --git a/tumbler/tumbler-cache.c b/tumbler/tumbler-cache.c
index cc554dd..a147743 100644
--- a/tumbler/tumbler-cache.c
+++ b/tumbler/tumbler-cache.c
@@ -1,6 +1,6 @@
/* vi:set et ai sw=2 sts=2 ts=2: */
/*-
- * Copyright (c) 2009 Jannis Pohlmann <jannis@xfce.org>
+ * Copyright (c) 2009-2011 Jannis Pohlmann <jannis@xfce.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -103,14 +103,14 @@ tumbler_cache_get_thumbnail (TumblerCache *cache,
void
-tumbler_cache_cleanup (TumblerCache *cache,
- const gchar *uri_prefix,
- guint64 since)
+tumbler_cache_cleanup (TumblerCache *cache,
+ const gchar *const *base_uris,
+ guint64 since)
{
g_return_if_fail (TUMBLER_IS_CACHE (cache));
g_return_if_fail (TUMBLER_CACHE_GET_IFACE (cache)->cleanup != NULL);
- (TUMBLER_CACHE_GET_IFACE (cache)->cleanup) (cache, uri_prefix, since);
+ (TUMBLER_CACHE_GET_IFACE (cache)->cleanup) (cache, base_uris, since);
}
diff --git a/tumbler/tumbler-cache.h b/tumbler/tumbler-cache.h
index d8c447e..a2745b7 100644
--- a/tumbler/tumbler-cache.h
+++ b/tumbler/tumbler-cache.h
@@ -1,6 +1,6 @@
/* vi:set et ai sw=2 sts=2 ts=2: */
/*-
- * Copyright (c) 2009 Jannis Pohlmann <jannis@xfce.org>
+ * Copyright (c) 2009-2011 Jannis Pohlmann <jannis@xfce.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -49,7 +49,7 @@ struct _TumblerCacheIface
const gchar *uri,
TumblerThumbnailFlavor *flavor);
void (*cleanup) (TumblerCache *cache,
- const gchar *uri,
+ const gchar *const *base_uris,
guint64 since);
void (*do_delete) (TumblerCache *cache,
const GStrv uris);
@@ -72,7 +72,7 @@ TumblerThumbnail *tumbler_cache_get_thumbnail (TumblerCache *ca
const gchar *uri,
TumblerThumbnailFlavor *flavor) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
void tumbler_cache_cleanup (TumblerCache *cache,
- const gchar *uri_prefix,
+ const gchar *const *base_uris,
guint64 since);
void tumbler_cache_delete (TumblerCache *cache,
const GStrv uris);