[Xfce4-commits] [xfce/tumbler] 01/02: Use hash table to avoid loading xdg user path twice.

noreply at xfce.org noreply at xfce.org
Sat Sep 8 11:10:35 CEST 2018


This is an automated email from the git hooks/post-receive script.

a   l   i       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/tumbler.

commit a2a0e8ab5ee6ff71ed62e391412e5c560e08f2b3
Author: Ali Abdallah <ali at xfce.org>
Date:   Sat Sep 8 02:28:29 2018 +0200

    Use hash table to avoid loading xdg user path twice.
---
 plugins/desktop-thumbnailer/desktop-thumbnailer-provider.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/plugins/desktop-thumbnailer/desktop-thumbnailer-provider.c b/plugins/desktop-thumbnailer/desktop-thumbnailer-provider.c
index 7bf2a3f..f4b73a6 100644
--- a/plugins/desktop-thumbnailer/desktop-thumbnailer-provider.c
+++ b/plugins/desktop-thumbnailer/desktop-thumbnailer-provider.c
@@ -240,7 +240,10 @@ desktop_thumbnailer_provider_get_thumbnailers (TumblerThumbnailerProvider *provi
   data_dirs = g_get_system_data_dirs ();
 
   /* Create a ghash table to insert loaded directory path to avoid duplication */
-  single_path = g_hash_table_new_full (g_file_hash, (GEqualFunc)g_file_equal, g_object_unref, NULL);
+  single_path = g_hash_table_new_full (g_file_hash,
+                                       (GEqualFunc)g_file_equal,
+                                       g_object_unref,
+                                       NULL);
 
   for (n = 0; data_dirs[n] != NULL; ++n)
     {
@@ -252,6 +255,7 @@ desktop_thumbnailer_provider_get_thumbnailers (TumblerThumbnailerProvider *provi
         {
           dirname = g_build_filename (data_dirs[n], "thumbnailers", NULL);
           directories = g_list_prepend (directories, g_file_new_for_path (dirname));
+          g_hash_table_insert (single_path, path, path);
           g_free (dirname);
         }
       else

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list