Commit 1980629d authored by Sergios - Anestis Kefalidis's avatar Sergios - Anestis Kefalidis Committed by Alexander Schwinn
Browse files

Support shared thumbnail repositories (Issue #262)

        Issue #262
        MR !126
Libxfce4util MR !18
parent fe834bfb
Pipeline #10434 passed with stages
in 6 minutes
......@@ -152,7 +152,7 @@ XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.56.0])
XDT_CHECK_PACKAGE([GMODULE], [gmodule-2.0], [2.56.0])
XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [3.22.0])
XDT_CHECK_PACKAGE([GDK_PIXBUF], [gdk-pixbuf-2.0], [2.14.0])
XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.17.0])
XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.17.1])
XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-2], [4.17.0])
XDT_CHECK_PACKAGE([LIBXFCE4KBD_PRIVATE], [libxfce4kbd-private-3], [4.12.0])
XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.12.0])
......
......@@ -3617,7 +3617,6 @@ thunar_file_get_thumbnail_path (ThunarFile *file, ThunarThumbnailSize thumbnail_
g_free (uri);
filename = g_strconcat (g_checksum_get_string (checksum), ".png", NULL);
g_checksum_free (checksum);
/* The thumbnail is in the format/location
* $XDG_CACHE_HOME/thumbnails/(nromal|large)/MD5_Hash_Of_URI.png
......@@ -3642,14 +3641,29 @@ thunar_file_get_thumbnail_path (ThunarFile *file, ThunarThumbnailSize thumbnail_
filename, NULL);
if(!g_file_test(file->thumbnail_path, G_FILE_TEST_EXISTS))
{
/* Thumbnail doesn't exist in either spot */
g_free(file->thumbnail_path);
file->thumbnail_path = NULL;
}
{
g_free(file->thumbnail_path);
file->thumbnail_path = NULL;
if (thunar_file_is_directory (file) == FALSE)
{
/* Thumbnail doesn't exist in either spot, look for shared repository */
uri = thunar_file_dup_uri (file);
file->thumbnail_path = xfce_create_shared_thumbnail_path (uri, thunar_thumbnail_size_get_nick (thumbnail_size));
g_free (uri);
if (!g_file_test (file->thumbnail_path, G_FILE_TEST_EXISTS))
{
/* Thumbnail doesn't exist */
g_free (file->thumbnail_path);
file->thumbnail_path = NULL;
}
}
}
}
g_free (filename);
g_checksum_free (checksum);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment