Updating branch refs/heads/jannis/port-to-gio
         to dd52df43423c03ff543e4c1aa0598dbd38f3964b (commit)
       from 79a5beb017a029f5a0ae57655552578707f3467d (commit)

commit dd52df43423c03ff543e4c1aa0598dbd38f3964b
Author: Jannis Pohlmann <[email protected]>
Date:   Fri Oct 22 13:08:16 2010 +0200

    Use xfdesktop_file_icon_update_file_info() when a file icon has changed.

 src/xfdesktop-file-icon-manager.c |   17 ++++++-----------
 1 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/src/xfdesktop-file-icon-manager.c 
b/src/xfdesktop-file-icon-manager.c
index 0855183..4ffa7f1 100644
--- a/src/xfdesktop-file-icon-manager.c
+++ b/src/xfdesktop-file-icon-manager.c
@@ -2360,19 +2360,14 @@ xfdesktop_file_icon_manager_file_changed(GFileMonitor   
  *monitor,
             
             icon = g_hash_table_lookup(fmanager->priv->icons, file);
             if(icon) {
-                DBG("found file in HT");
+                file_info = g_file_query_info(file, 
XFDESKTOP_FILE_INFO_NAMESPACE,
+                                              G_FILE_QUERY_INFO_NONE, NULL, 
NULL);
                 
-                /* TODO remove this workaround to convert the GFile into a 
ThunarVfsInfo.
-                 * Instead, load the GFileInfo for it and call 
update_file_info */
-                pathname = g_file_get_path(file);
-                path = thunar_vfs_path_new(pathname, NULL);
-                info = thunar_vfs_info_new_for_path(path, NULL);
+                /* the file info query HAS to succeed because the file still 
exists */
+                g_assert(file_info);
 
-                xfdesktop_file_icon_update_info(icon, info);
-
-                /*thunar_vfs_info_unref(info);*/
-                thunar_vfs_path_unref(path);
-                g_free(pathname);
+                xfdesktop_file_icon_update_file_info(icon, file_info);
+                g_object_unref(file_info);
             }
             break;
         case G_FILE_MONITOR_EVENT_CREATED:
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to