[gnome-photos/wip/rishi/collection: 43/44] utils: remove get_thumbnail_path
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/collection: 43/44] utils: remove get_thumbnail_path
- Date: Mon, 29 Jan 2018 21:31:42 +0000 (UTC)
commit 68a5fc344150222801a3b16bcc5c85d4af767f3d
Author: Debarshi Ray <debarshir gnome org>
Date: Wed Jan 24 22:22:42 2018 +0100
utils: remove get_thumbnail_path
src/photos-utils.c | 46 ----------------------------------------------
src/photos-utils.h | 4 ----
2 files changed, 50 deletions(-)
---
diff --git a/src/photos-utils.c b/src/photos-utils.c
index 1c18cdee..9f333e8b 100644
--- a/src/photos-utils.c
+++ b/src/photos-utils.c
@@ -73,11 +73,6 @@
static const gdouble EPSILON = 1e-5;
-enum
-{
- THUMBNAIL_GENERATION = 0
-};
-
GdkPixbuf *
photos_utils_center_pixbuf (GdkPixbuf *pixbuf, gint size)
@@ -1027,47 +1022,6 @@ photos_utils_get_selection_mode (void)
}
-gchar *
-photos_utils_get_thumbnail_path_for_file (GFile *file)
-{
- gchar *path;
- g_autofree gchar *uri = NULL;
-
- uri = g_file_get_uri (file);
- path = photos_utils_get_thumbnail_path_for_uri (uri);
-
- return path;
-}
-
-
-gchar *
-photos_utils_get_thumbnail_path_for_uri (const gchar *uri)
-{
- const gchar *cache_dir;
- g_autofree gchar *filename = NULL;
- g_autofree gchar *md5 = NULL;
- gchar *path;
- g_autofree gchar *thumbnails_subdir = NULL;
- gint size;
-
- md5 = g_compute_checksum_for_string (G_CHECKSUM_MD5, uri, -1);
- filename = g_strconcat (md5, ".png", NULL);
-
- cache_dir = g_get_user_cache_dir ();
- size = photos_utils_get_icon_size ();
- thumbnails_subdir = g_strdup_printf ("%d-%d", size, THUMBNAIL_GENERATION);
-
- path = g_build_filename (cache_dir,
- PACKAGE_TARNAME,
- "thumbnails",
- thumbnails_subdir,
- filename,
- NULL);
-
- return path;
-}
-
-
GList *
photos_utils_get_urns_from_items (GList *items)
{
diff --git a/src/photos-utils.h b/src/photos-utils.h
index 025b6a3f..b1662451 100644
--- a/src/photos-utils.h
+++ b/src/photos-utils.h
@@ -140,10 +140,6 @@ const gchar *photos_utils_get_provider_name (PhotosBaseManager *sr
gboolean photos_utils_get_selection_mode (void);
-gchar *photos_utils_get_thumbnail_path_for_file (GFile *file);
-
-gchar *photos_utils_get_thumbnail_path_for_uri (const gchar *uri);
-
GList *photos_utils_get_urns_from_items (GList *items);
const gchar *photos_utils_get_version (void);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]