[nautilus/wip/csoriano/destktop-split2: 46/47] desktop-icon-file, file: override invalidate_attributes
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/csoriano/destktop-split2: 46/47] desktop-icon-file, file: override invalidate_attributes
- Date: Wed, 30 Mar 2016 20:01:56 +0000 (UTC)
commit 07b3df2ec3fa1f94b3dcbc96861387282ba93e90
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 | 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 ad7614c..9fdb800 100644
--- a/libnautilus-private/nautilus-desktop-icon-file.c
+++ b/libnautilus-private/nautilus-desktop-icon-file.c
@@ -453,6 +453,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,
@@ -498,6 +507,7 @@ nautilus_desktop_icon_file_class_init (NautilusDesktopIconFileClass *klass)
file_class->rename = real_rename;
file_class->get_drop_target_uri = real_get_drop_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 7940e60..0bf410d 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"
@@ -7441,14 +7440,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]