[Xfce4-commits] [xfce/thunar] 01/01: Renaming a file from another file manager... (bug #11430)

noreply at xfce.org noreply at xfce.org
Thu Jan 29 00:36:14 CET 2015


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

andrzejr pushed a commit to branch master
in repository xfce/thunar.

commit ff58ed28bcab826445216b97ce981890c90a8e83
Author: Andrzej <ndrwrdck at gmail.com>
Date:   Wed Jan 28 23:36:07 2015 +0000

    Renaming a file from another file manager... (bug #11430)
    
    (Matt32)
    
    When renaming a file from $HOME directory with midnight commander, it will disappear almost immediately in Thunar window but the renamed file does not show up.
    
    Steps to reproduce the bug:
    - Open Thunar to $HOME
    - In a terminal, use 'mc' to rename a file in $HOME directory
    - The file disappears in Thunar window
    - The file with the new name does not show up in Thunar window.
    
    The same test will work with Caja (MATE Desktop) file manager.
---
 thunar/thunar-folder.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/thunar/thunar-folder.c b/thunar/thunar-folder.c
index 7448ccd..c8acc3b 100644
--- a/thunar/thunar-folder.c
+++ b/thunar/thunar-folder.c
@@ -555,7 +555,7 @@ thunar_folder_finished (ExoJob       *job,
 
   /* add us to the file alteration monitor */
   folder->monitor = g_file_monitor_directory (thunar_file_get_file (folder->corresponding_file),
-                                              G_FILE_MONITOR_NONE, NULL, NULL);
+                                              G_FILE_MONITOR_SEND_MOVED, NULL, NULL);
   if (G_LIKELY (folder->monitor != NULL))
     g_signal_connect (folder->monitor, "changed", G_CALLBACK (thunar_folder_monitor), folder);
 
@@ -741,6 +741,11 @@ thunar_folder_monitor (GFileMonitor     *monitor,
           /* update/destroy the file */
           if (event_type == G_FILE_MONITOR_EVENT_DELETED)
             thunar_file_destroy (lp->data);
+          else if (event_type == G_FILE_MONITOR_EVENT_MOVED)
+            {
+              thunar_file_destroy (lp->data);
+              thunar_file_reload (folder->corresponding_file);
+            }
           else
             {
 #if DEBUG_FILE_CHANGES

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


More information about the Xfce4-commits mailing list