[nautilus/wip/csoriano/destktop-split2: 52/54] desktop-icon-file, file: override invalidate_attributes



commit 8409e632308d6dfce319aaae190fb1cf95b2c270
Author: Carlos Soriano <csoriano gnome org>
Date:   Wed Mar 30 15:08:42 2016 +0200

    desktop-icon-file, file: override invalidate_attributes
    
    Since the desktop files needs to do nothing at all.
    
    This removes the last desktop dependency from nautilus file (yay).

 libnautilus-private/nautilus-desktop-icon-file.c |   11 +++++++++++
 libnautilus-private/nautilus-file.c              |    9 ---------
 2 files changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/libnautilus-private/nautilus-desktop-icon-file.c 
b/libnautilus-private/nautilus-desktop-icon-file.c
index bd1b31d..c0d27bd 100644
--- a/libnautilus-private/nautilus-desktop-icon-file.c
+++ b/libnautilus-private/nautilus-desktop-icon-file.c
@@ -345,6 +345,16 @@ nautilus_desktop_icon_file_eject (NautilusFile                   *file,
        }
 }
 
+static void
+real_invalidate_attributes_internal (NautilusFile *file)
+{
+        /* Desktop icon files are always up to date.
+         * If we invalidate their attributes they
+         * will lose data, so we just ignore them.
+         */
+        return;
+}
+
 static char*
 real_get_drop_target_uri (NautilusFile *file)
 {
@@ -490,6 +500,7 @@ nautilus_desktop_icon_file_class_init (NautilusDesktopIconFileClass *klass)
         file_class->can_rename = real_can_rename;
         file_class->rename = real_rename;
         file_class->get_drop_target_uri = real_get_drop_target_uri;
+        file_class->invalidate_attributes_internal = real_invalidate_attributes_internal;
 
        g_type_class_add_private (object_class, sizeof(NautilusDesktopIconFileDetails));
 }
diff --git a/libnautilus-private/nautilus-file.c b/libnautilus-private/nautilus-file.c
index 95acfb9..5162a1e 100644
--- a/libnautilus-private/nautilus-file.c
+++ b/libnautilus-private/nautilus-file.c
@@ -26,7 +26,6 @@
 #include "nautilus-directory-notify.h"
 #include "nautilus-directory-private.h"
 #include "nautilus-signaller.h"
-#include "nautilus-desktop-icon-file.h"
 #include "nautilus-file-attributes.h"
 #include "nautilus-file-private.h"
 #include "nautilus-file-operations.h"
@@ -7440,14 +7439,6 @@ real_invalidate_attributes_internal (NautilusFile           *file,
                return;
        }
 
-       if (NAUTILUS_IS_DESKTOP_ICON_FILE (file)) {
-               /* Desktop icon files are always up to date.
-                * If we invalidate their attributes they
-                * will lose data, so we just ignore them.
-                */
-               return;
-       }
-       
        request = nautilus_directory_set_up_request (file_attributes);
 
        if (REQUEST_WANTS_TYPE (request, REQUEST_DIRECTORY_COUNT)) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]