[gnome-photos/wip/rishi/import-6: 4/5] base-item: Support disabling the creation of collection thumbnails
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/import-6: 4/5] base-item: Support disabling the creation of collection thumbnails
- Date: Wed, 14 Feb 2018 16:27:47 +0000 (UTC)
commit 45373a149a7679b44ce92816b38e454f5a03eb3f
Author: Debarshi Ray <debarshir gnome org>
Date: Wed Jan 24 20:01:45 2018 +0100
base-item: Support disabling the creation of collection thumbnails
The subsequent patches will introduce the use of BaseItem APIs in
places where the corresponding GFile and TrackerSparqlCursor APIs are
being currently used. The main objective is to allow different BaseItem
sub-classes to have different thumbnail caches. The secondary benefit
would be to avoid doing the same thing, parsing the TrackerSparqlCursor
in this case, in subtly different ways through different code paths.
Some of these new use-cases, such as the search provider, shouldn't
initiate thumbnailing. Therefore, it is necessary to cast a wider net
when disabling the creation of thumbnails.
https://gitlab.gnome.org/GNOME/gnome-photos/issues/29
src/photos-base-item.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/photos-base-item.c b/src/photos-base-item.c
index 4ea6b0c1..0f1624df 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -2596,15 +2596,15 @@ photos_base_item_refresh_icon (PhotosBaseItem *self)
photos_base_item_set_thumbnailing_icon (self);
+ if (priv->failed_thumbnailing)
+ return;
+
if (priv->collection)
{
photos_base_item_refresh_collection_icon (self);
return;
}
- if (priv->failed_thumbnailing)
- return;
-
file = g_file_new_for_uri (priv->uri);
photos_utils_file_query_info_async (file,
G_FILE_ATTRIBUTE_THUMBNAIL_PATH,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]