[patch]metadata changes



Hi,

Here's a patch that responds to changes in file metadata (uid, gid, and
mode).  Ok to commit?

Thanks,
James
? libnautilus-private/nautilus-icon-factory.c.patched
? libnautilus-private/nautilus-icon-factory.h.patched
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/nautilus/ChangeLog,v
retrieving revision 1.5554
diff -u -r1.5554 ChangeLog
--- ChangeLog	16 Oct 2002 16:27:17 -0000	1.5554
+++ ChangeLog	16 Oct 2002 17:18:43 -0000
@@ -1,3 +1,13 @@
+2002-10-16  James Willcox  <jwillcox gnome org>
+
+	* libnautilus-private/nautilus-file-changes-queue.c:
+	(nautilus_file_changes_queue_file_metadata_changed),
+	(nautilus_file_changes_consume_changes):
+	* libnautilus-private/nautilus-file-changes-queue.h:
+	* libnautilus-private/nautilus-monitor.c: (monitor_notify_cb):
+
+	Handle changes in metadata.
+
 2002-10-16  Alexander Larsson  <alexl redhat>
 
 	* libnautilus-private/nautilus-dnd.h:
Index: libnautilus-private/nautilus-file-changes-queue.c
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-file-changes-queue.c,v
retrieving revision 1.20
diff -u -r1.20 nautilus-file-changes-queue.c
--- libnautilus-private/nautilus-file-changes-queue.c	23 Aug 2001 16:48:09 -0000	1.20
+++ libnautilus-private/nautilus-file-changes-queue.c	16 Oct 2002 17:18:44 -0000
@@ -40,6 +40,7 @@
 	CHANGE_FILE_CHANGED,
 	CHANGE_FILE_REMOVED,
 	CHANGE_FILE_MOVED,
+	CHANGE_FILE_METADATA_CHANGED,
 	CHANGE_METADATA_COPIED,
 	CHANGE_METADATA_MOVED,
 	CHANGE_METADATA_REMOVED,
@@ -180,6 +181,20 @@
 }
 
 void
+nautilus_file_changes_queue_file_metadata_changed (const char *uri)
+{
+	NautilusFileChange *new_item;
+	NautilusFileChangesQueue *queue;
+
+	queue = nautilus_file_changes_queue_get ();
+
+	new_item = g_new0 (NautilusFileChange, 1);
+	new_item->kind = CHANGE_FILE_METADATA_CHANGED;
+	new_item->from_uri = g_strdup (uri);
+	nautilus_file_changes_queue_add_common (queue, new_item);
+}
+
+void
 nautilus_file_changes_queue_file_moved (const char *from, const char *to)
 {
 	NautilusFileChange *new_item;
@@ -383,7 +398,8 @@
 				&& change->kind != CHANGE_POSITION_REMOVE;
 			
 			flush_needed |= changes != NULL
-				&& change->kind != CHANGE_FILE_CHANGED;
+				&& change->kind != CHANGE_FILE_CHANGED
+				&& change->kind != CHANGE_FILE_METADATA_CHANGED;
 			
 			flush_needed |= moves != NULL
 				&& change->kind != CHANGE_FILE_MOVED
@@ -491,6 +507,10 @@
 			break;
 
 		case CHANGE_FILE_CHANGED:
+			changes = g_list_prepend (changes, change->from_uri);
+			break;
+
+		case CHANGE_FILE_METADATA_CHANGED:
 			changes = g_list_prepend (changes, change->from_uri);
 			break;
 
Index: libnautilus-private/nautilus-file-changes-queue.h
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-file-changes-queue.h,v
retrieving revision 1.7
diff -u -r1.7 nautilus-file-changes-queue.h
--- libnautilus-private/nautilus-file-changes-queue.h	16 Apr 2001 22:07:01 -0000	1.7
+++ libnautilus-private/nautilus-file-changes-queue.h	16 Oct 2002 17:18:44 -0000
@@ -30,6 +30,7 @@
 void nautilus_file_changes_queue_file_removed             (const char *uri);
 void nautilus_file_changes_queue_file_moved               (const char *from_uri,
 							   const char *to_uri);
+void nautilus_file_changes_queue_file_metadata_changed    (const char *uri);
 void nautilus_file_changes_queue_schedule_metadata_copy   (const char *from_uri,
 							   const char *to_uri);
 void nautilus_file_changes_queue_schedule_metadata_move   (const char *from_uri,
Index: libnautilus-private/nautilus-monitor.c
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-monitor.c,v
retrieving revision 1.22
diff -u -r1.22 nautilus-monitor.c
--- libnautilus-private/nautilus-monitor.c	24 May 2002 05:14:40 -0000	1.22
+++ libnautilus-private/nautilus-monitor.c	16 Oct 2002 17:18:44 -0000
@@ -109,11 +109,13 @@
 	case GNOME_VFS_MONITOR_EVENT_CREATED:
 		nautilus_file_changes_queue_file_added (info_uri);
 		break;
+	case GNOME_VFS_MONITOR_EVENT_METADATA_CHANGED:
+		nautilus_file_changes_queue_file_metadata_changed (info_uri);
+		break;
 
 	/* None of the following are supported yet */
 	case GNOME_VFS_MONITOR_EVENT_STARTEXECUTING:
 	case GNOME_VFS_MONITOR_EVENT_STOPEXECUTING:
-	case GNOME_VFS_MONITOR_EVENT_METADATA_CHANGED:
 		break;
 	}
 


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