Re: [PATCH] Don't append final newline when copying URIs to text clipboard target



Am Samstag, den 07.10.2006, 20:17 +0200 schrieb Christian Neumair:
> Reported as bug 360441 [1], proposed patch attached.
> 
> I wonder whether we should convert the URIs to
>   "uri1, ..., uriN"
> instead of
>   "uri1\n...\nuriN" .u
> 
> [1] http://bugzilla.gnome.org/show_bug.cgi?id=360441

This time without any extra garbage. Sometimes reading files before
sending them out helps a lot.

-- 
Christian Neumair <chris gnome-de org>
Index: src/file-manager/fm-directory-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-directory-view.c,v
retrieving revision 1.750
diff -u -p -r1.750 fm-directory-view.c
--- src/file-manager/fm-directory-view.c	8 Aug 2006 14:43:25 -0000	1.750
+++ src/file-manager/fm-directory-view.c	7 Oct 2006 18:12:25 -0000
@@ -5890,8 +5893,11 @@ convert_file_list_to_string (GList *file
 			} else {
 				g_string_append (uris, uri);
 			}
-			g_string_append_c (uris, '\n');
-			
+
+			/* skip newline for last element */
+			if (node->next != NULL) {
+				g_string_append_c (uris, '\n');
+			}
 		} else {
 			g_string_append_c (uris, '\n');
 			g_string_append (uris, uri);


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