summaryrefslogtreecommitdiff
path: root/libmate-desktop
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2012-11-02 11:50:47 +0100
committerStefano Karapetsas <[email protected]>2012-11-02 11:50:47 +0100
commitbbcb0fa4e357fa2a1f30ca74a0e68f6b053a014e (patch)
tree4b63233505c63572c62e8ffd2631b456155cbea7 /libmate-desktop
parent190358bed6eb05cdd570df1771f6db62bf921b2f (diff)
downloadmate-desktop-bbcb0fa4e357fa2a1f30ca74a0e68f6b053a014e.tar.bz2
mate-desktop-bbcb0fa4e357fa2a1f30ca74a0e68f6b053a014e.tar.xz
fix thumbnails path for glib >= 2.34
Diffstat (limited to 'libmate-desktop')
-rw-r--r--libmate-desktop/mate-desktop-thumbnail.c42
1 files changed, 28 insertions, 14 deletions
diff --git a/libmate-desktop/mate-desktop-thumbnail.c b/libmate-desktop/mate-desktop-thumbnail.c
index 6e3616c..a2c9b7b 100644
--- a/libmate-desktop/mate-desktop-thumbnail.c
+++ b/libmate-desktop/mate-desktop-thumbnail.c
@@ -929,11 +929,13 @@ mate_desktop_thumbnail_factory_lookup (MateDesktopThumbnailFactory *factory,
file = g_strconcat (g_checksum_get_string (checksum), ".png", NULL);
- /*
+#if GLIB_CHECK_VERSION (2, 34, 0)
path = g_build_filename (g_get_user_cache_dir (),
- "thumbnails", */
+ "thumbnails",
+#else
path = g_build_filename (g_get_home_dir (),
".thumbnails",
+#endif
(priv->size == MATE_DESKTOP_THUMBNAIL_SIZE_NORMAL)?"normal":"large",
file,
NULL);
@@ -993,11 +995,13 @@ mate_desktop_thumbnail_factory_has_valid_failed_thumbnail (MateDesktopThumbnailF
file = g_strconcat (g_checksum_get_string (checksum), ".png", NULL);
- /*
+#if GLIB_CHECK_VERSION (2, 34, 0)
path = g_build_filename (g_get_user_cache_dir (),
- "thumbnails/fail", */
+ "thumbnails/fail",
+#else
path = g_build_filename (g_get_home_dir (),
".thumbnails/fail",
+#endif
appname,
file,
NULL);
@@ -1354,11 +1358,13 @@ make_thumbnail_dirs (MateDesktopThumbnailFactory *factory)
res = FALSE;
- /*
+#if GLIB_CHECK_VERSION (2, 34, 0)
thumbnail_dir = g_build_filename (g_get_user_cache_dir (),
- "thumbnails", */
+ "thumbnails",
+#else
thumbnail_dir = g_build_filename (g_get_home_dir (),
".thumbnails",
+#endif
NULL);
if (!g_file_test (thumbnail_dir, G_FILE_TEST_IS_DIR))
{
@@ -1391,11 +1397,13 @@ make_thumbnail_fail_dirs (MateDesktopThumbnailFactory *factory)
res = FALSE;
- /*
+#if GLIB_CHECK_VERSION (2, 34, 0)
thumbnail_dir = g_build_filename (g_get_user_cache_dir (),
- "thumbnails", */
+ "thumbnails",
+#else
thumbnail_dir = g_build_filename (g_get_home_dir (),
".thumbnails",
+#endif
NULL);
if (!g_file_test (thumbnail_dir, G_FILE_TEST_IS_DIR))
{
@@ -1469,11 +1477,13 @@ mate_desktop_thumbnail_factory_save_thumbnail (MateDesktopThumbnailFactory *fact
file = g_strconcat (g_checksum_get_string (checksum), ".png", NULL);
- /*
+#if GLIB_CHECK_VERSION (2, 34, 0)
path = g_build_filename (g_get_user_cache_dir (),
- "thumbnails", */
+ "thumbnails",
+#else
path = g_build_filename (g_get_home_dir (),
".thumbnails",
+#endif
(priv->size == MATE_DESKTOP_THUMBNAIL_SIZE_NORMAL)?"normal":"large",
file,
NULL);
@@ -1580,11 +1590,13 @@ mate_desktop_thumbnail_factory_create_failed_thumbnail (MateDesktopThumbnailFact
file = g_strconcat (g_checksum_get_string (checksum), ".png", NULL);
- /*
+#if GLIB_CHECK_VERSION (2, 34, 0)
path = g_build_filename (g_get_user_cache_dir (),
- "thumbnails/fail", */
+ "thumbnails/fail",
+#else
path = g_build_filename (g_get_home_dir (),
".thumbnails/fail",
+#endif
appname,
file,
NULL);
@@ -1674,11 +1686,13 @@ mate_desktop_thumbnail_path_for_uri (const char *uri,
file = g_strconcat (md5, ".png", NULL);
g_free (md5);
- /*
+#if GLIB_CHECK_VERSION (2, 34, 0)
path = g_build_filename (g_get_user_cache_dir (),
- "thumbnails", */
+ "thumbnails",
+#else
path = g_build_filename (g_get_home_dir (),
".thumbnails",
+#endif
(size == MATE_DESKTOP_THUMBNAIL_SIZE_NORMAL)?"normal":"large",
file,
NULL);