[nautilus] desktop-icon-file, file: override invalidate_attributes



commit ea606608ee2fb79e6b03e9c196fddb8234392efc
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).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=712620

 libnautilus-private/nautilus-desktop-icon-file.c |   10 ++++++++++
 libnautilus-private/nautilus-file.c              |    9 ---------
 2 files changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/libnautilus-private/nautilus-desktop-icon-file.c 
b/libnautilus-private/nautilus-desktop-icon-file.c
index 100d746..2dc10b8 100644
--- a/libnautilus-private/nautilus-desktop-icon-file.c
+++ b/libnautilus-private/nautilus-desktop-icon-file.c
@@ -452,6 +452,15 @@ real_drag_can_accept_files (NautilusFile *drop_target_item)
         return TRUE;
 }
 
+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 void
 nautilus_desktop_icon_file_set_metadata (NautilusFile           *file,
@@ -497,6 +506,7 @@ nautilus_desktop_icon_file_class_init (NautilusDesktopIconFileClass *klass)
         file_class->rename = real_rename;
         file_class->get_target_uri = real_get_target_uri;
         file_class->drag_can_accept_files = real_drag_can_accept_files;
+        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 0c7410c..2baf939 100644
--- a/libnautilus-private/nautilus-file.c
+++ b/libnautilus-private/nautilus-file.c
@@ -25,7 +25,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]