public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in gnome-base/gnome-desktop/files: gnome-desktop-2.32.1-thumbnails.patch
@ 2013-08-15 11:40 Alexandre Rostovtsev (tetromino)
  0 siblings, 0 replies; only message in thread
From: Alexandre Rostovtsev (tetromino) @ 2013-08-15 11:40 UTC (permalink / raw
  To: gentoo-commits

tetromino    13/08/15 11:40:05

  Added:                gnome-desktop-2.32.1-thumbnails.patch
  Log:
  Fix thumbnailing failure with glib-2.34 (bug #450930, thanks to Matthew Turnbull and Pacho Ramos for the patch). Update to EAPI5 and python-r1.eclass.
  
  (Portage version: 2.2.0/cvs/Linux x86_64, signed Manifest commit with key CF0ADD61)

Revision  Changes    Path
1.1                  gnome-base/gnome-desktop/files/gnome-desktop-2.32.1-thumbnails.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-base/gnome-desktop/files/gnome-desktop-2.32.1-thumbnails.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-base/gnome-desktop/files/gnome-desktop-2.32.1-thumbnails.patch?rev=1.1&content-type=text/plain

Index: gnome-desktop-2.32.1-thumbnails.patch
===================================================================
Originally from https://github.com/mate-desktop/mate-desktop/commit/fcede97471263b7f145ceeb988f569d4aa9129b8
Ported to gnome-desktop by Matthew Turnbull <sparky@bluefang-logic.com>

Fixes nautilus-2 thumbnailing with >=glib-2.34

https://bugs.gentoo.org/show_bug.cgi?id=450930

diff -rupN a/libgnome-desktop/gnome-desktop-thumbnail.c b/libgnome-desktop/gnome-desktop-thumbnail.c
--- a/libgnome-desktop/gnome-desktop-thumbnail.c
+++ b/libgnome-desktop/gnome-desktop-thumbnail.c
@@ -526,8 +526,13 @@ gnome_desktop_thumbnail_factory_lookup (
 
   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",
+#else
   path = g_build_filename (g_get_home_dir (),
 			   ".thumbnails",
+#endif
 			   (priv->size == GNOME_DESKTOP_THUMBNAIL_SIZE_NORMAL)?"normal":"large",
 			   file,
 			   NULL);
@@ -587,8 +592,13 @@ gnome_desktop_thumbnail_factory_has_vali
 
   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",
+#else
   path = g_build_filename (g_get_home_dir (),
 			   ".thumbnails/fail",
+#endif
 			   appname,
 			   file,
 			   NULL);
@@ -917,12 +927,17 @@ make_thumbnail_dirs (GnomeDesktopThumbna
 
   res = FALSE;
 
+#if GLIB_CHECK_VERSION (2, 34, 0)
+  thumbnail_dir = g_build_filename (g_get_user_cache_dir (),
+				    "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))
     {
-      g_mkdir (thumbnail_dir, 0700);
+      g_mkdir_with_parents (thumbnail_dir, 0700);
       res = TRUE;
     }
 
@@ -951,12 +966,17 @@ make_thumbnail_fail_dirs (GnomeDesktopTh
 
   res = FALSE;
 
+#if GLIB_CHECK_VERSION (2, 34, 0)
+  thumbnail_dir = g_build_filename (g_get_user_cache_dir (),
+				    "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))
     {
-      g_mkdir (thumbnail_dir, 0700);
+      g_mkdir_with_parents (thumbnail_dir, 0700);
       res = TRUE;
     }
 
@@ -1025,8 +1045,13 @@ gnome_desktop_thumbnail_factory_save_thu
 
   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",
+#else
   path = g_build_filename (g_get_home_dir (),
 			   ".thumbnails",
+#endif
 			   (priv->size == GNOME_DESKTOP_THUMBNAIL_SIZE_NORMAL)?"normal":"large",
 			   file,
 			   NULL);
@@ -1129,8 +1154,13 @@ gnome_desktop_thumbnail_factory_create_f
 
   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",
+#else
   path = g_build_filename (g_get_home_dir (),
 			   ".thumbnails/fail",
+#endif
 			   appname,
 			   file,
 			   NULL);
@@ -1221,8 +1251,13 @@ gnome_desktop_thumbnail_path_for_uri (co
   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",
+#else
   path = g_build_filename (g_get_home_dir (),
 			   ".thumbnails",
+#endif
 			   (size == GNOME_DESKTOP_THUMBNAIL_SIZE_NORMAL)?"normal":"large",
 			   file,
 			   NULL);





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-08-15 11:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-15 11:40 [gentoo-commits] gentoo-x86 commit in gnome-base/gnome-desktop/files: gnome-desktop-2.32.1-thumbnails.patch Alexandre Rostovtsev (tetromino)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox