SOURCES: gnome-vfs2-all_drives_for_computer.patch (NEW), gnome-vfs...

freetz freetz at pld-linux.org
Sun May 21 11:29:28 CEST 2006


Author: freetz                       Date: Sun May 21 09:29:28 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- bugfixes:
  http://bugzilla.gnome.org/show_bug.cgi?id=341446
  http://bugzilla.gnome.org/show_bug.cgi?id=340910
  http://bugzilla.gnome.org/show_bug.cgi?id=341534
  http://bugzilla.gnome.org/show_bug.cgi?id=338893
  http://bugzilla.gnome.org/show_bug.cgi?id=321320
  http://bugzilla.gnome.org/show_bug.cgi?id=302436
  http://bugzilla.gnome.org/show_bug.cgi?id=337014
  http://bugzilla.gnome.org/show_bug.cgi?id=335250

---- Files affected:
SOURCES:
   gnome-vfs2-all_drives_for_computer.patch (NONE -> 1.1)  (NEW), gnome-vfs2-df_not_null.patch (NONE -> 1.1)  (NEW), gnome-vfs2-dont_eject_null.patch (NONE -> 1.1)  (NEW), gnome-vfs2-dont_loop_if_no_anonymous_ftp.patch (NONE -> 1.1)  (NEW), gnome-vfs2-fix_duplicate_declaration.patch (NONE -> 1.1)  (NEW), gnome-vfs2-fix_parameters_for_desktop.patch (NONE -> 1.1)  (NEW), gnome-vfs2-fix_volumes_sorting.patch (NONE -> 1.1)  (NEW), gnome-vfs2-only_non_automounted_listed.patch (NONE -> 1.1)  (NEW), gnome-vfs2-unaliase_mimetype.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/gnome-vfs2-all_drives_for_computer.patch
diff -u /dev/null SOURCES/gnome-vfs2-all_drives_for_computer.patch:1.1
--- /dev/null	Sun May 21 11:29:28 2006
+++ SOURCES/gnome-vfs2-all_drives_for_computer.patch	Sun May 21 11:29:23 2006
@@ -0,0 +1,49 @@
+===================================================================
+RCS file: /cvs/gnome/gnome-vfs/modules/computer-method.c,v
+retrieving revision 1.10
+retrieving revision 1.10.6.1
+diff -u -r1.10 -r1.10.6.1
+--- computer-method.c	2005/05/08 13:04:05	1.10
++++ gnome-vfs/modules/computer-method.c	2006/05/16 10:46:38	1.10.6.1
+@@ -312,14 +312,12 @@
+ 	char *name;
+ 	
+ 	G_LOCK (root_dir);
+-	if (gnome_vfs_drive_is_user_visible (drive)) {
+-		file = computer_file_new (COMPUTER_DRIVE);
+-		name = gnome_vfs_drive_get_display_name (drive);
+-		file->file_name = build_file_name (name, ".drive");
+-		g_free (name);
+-		file->drive = gnome_vfs_drive_ref (drive);
+-		computer_file_add (dir, file);
+-	}
++	file = computer_file_new (COMPUTER_DRIVE);
++	name = gnome_vfs_drive_get_display_name (drive);
++	file->file_name = build_file_name (name, ".drive");
++	g_free (name);
++	file->drive = gnome_vfs_drive_ref (drive);
++	computer_file_add (dir, file);
+ 	G_UNLOCK (root_dir);
+ }
+ 
+@@ -370,14 +368,12 @@
+ 	
+ 	for (l = drives; l != NULL; l = l->next) {
+ 		drive = l->data;
+-		if (gnome_vfs_drive_is_user_visible (drive)) {
+-			file = computer_file_new (COMPUTER_DRIVE);
+-			name = gnome_vfs_drive_get_display_name (drive);
+-			file->file_name = build_file_name (name, ".drive");
+-			g_free (name);
+-			file->drive = gnome_vfs_drive_ref (drive);
+-			computer_file_add (dir, file);
+-		}
++		file = computer_file_new (COMPUTER_DRIVE);
++		name = gnome_vfs_drive_get_display_name (drive);
++		file->file_name = build_file_name (name, ".drive");
++		g_free (name);
++		file->drive = gnome_vfs_drive_ref (drive);
++		computer_file_add (dir, file);
+ 	}
+ 	
+ 	for (l = volumes; l != NULL; l = l->next) {

================================================================
Index: SOURCES/gnome-vfs2-df_not_null.patch
diff -u /dev/null SOURCES/gnome-vfs2-df_not_null.patch:1.1
--- /dev/null	Sun May 21 11:29:28 2006
+++ SOURCES/gnome-vfs2-df_not_null.patch	Sun May 21 11:29:23 2006
@@ -0,0 +1,19 @@
+===================================================================
+RCS file: /cvs/gnome/gnome-vfs/programs/gnomevfs-df.c,v
+retrieving revision 1.1
+retrieving revision 1.1.2.1
+diff -u -r1.1 -r1.1.2.1
+--- gnomevfs-df.c	2006/03/30 09:13:13	1.1
++++ gnome-vfs/programs/gnomevfs-df.c	2006/05/14 10:25:38	1.1.2.1
+@@ -79,6 +79,11 @@
+ 	int i;
+ 
+ 	type = gnome_vfs_volume_get_filesystem_type (vol);
++
++	if (type == NULL) {
++		return TRUE;
++	}
++
+ 	for (i = 0; i < G_N_ELEMENTS (ignored_fs); i++) {
+ 		if (strcmp (ignored_fs[i], type) == 0) {
+ 			g_free (type);

================================================================
Index: SOURCES/gnome-vfs2-dont_eject_null.patch
diff -u /dev/null SOURCES/gnome-vfs2-dont_eject_null.patch:1.1
--- /dev/null	Sun May 21 11:29:28 2006
+++ SOURCES/gnome-vfs2-dont_eject_null.patch	Sun May 21 11:29:23 2006
@@ -0,0 +1,20 @@
+===================================================================
+RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-volume-ops.c,v
+retrieving revision 1.30
+retrieving revision 1.30.2.1
+diff -u -r1.30 -r1.30.2.1
+--- gnome-vfs-volume-ops.c	2006/03/06 09:33:20	1.30
++++ libgnomevfs/gnome-vfs-volume-ops.c	2006/04/25 11:22:14	1.30.2.1
+@@ -742,9 +742,9 @@
+ 
+ 			if (exit_status != 0) {
+ 				info->succeeded = FALSE;
+-				if ((strcmp (info->argv[0], GNOME_VFS_BINDIR "/gnome-mount") == 0) ||
+-				    (strcmp (info->argv[0], GNOME_VFS_BINDIR "/gnome-umount") == 0) ||
+-				    (strcmp (info->argv[0], GNOME_VFS_BINDIR "/gnome-eject") == 0)) {
++				if ((strcmp (argv[0], GNOME_VFS_BINDIR "/gnome-mount") == 0) ||
++				    (strcmp (argv[0], GNOME_VFS_BINDIR "/gnome-umount") == 0) ||
++				    (strcmp (argv[0], GNOME_VFS_BINDIR "/gnome-eject") == 0)) {
+ 					/* gnome-mount programs display their own dialogs */
+ 					info->error_message = g_strdup ("");
+ 					info->detailed_error_message = g_strdup ("");

================================================================
Index: SOURCES/gnome-vfs2-dont_loop_if_no_anonymous_ftp.patch
diff -u /dev/null SOURCES/gnome-vfs2-dont_loop_if_no_anonymous_ftp.patch:1.1
--- /dev/null	Sun May 21 11:29:28 2006
+++ SOURCES/gnome-vfs2-dont_loop_if_no_anonymous_ftp.patch	Sun May 21 11:29:23 2006
@@ -0,0 +1,80 @@
+===================================================================
+RCS file: /cvs/gnome/gnome-vfs/modules/ftp-method.c,v
+retrieving revision 1.123
+retrieving revision 1.123.2.1
+diff -u -r1.123 -r1.123.2.1
+--- ftp-method.c	2006/03/20 19:33:35	1.123
++++ gnome-vfs/modules/ftp-method.c	2006/04/25 11:33:16	1.123.2.1
+@@ -857,6 +857,13 @@
+         g_free (in_args.uri);
+ }
+ 
++/*
++ * Returns FALSE if callback was not handled (*aborted
++ *   will be FALSE, user will be "anonymous")
++ *
++ * Returns TRUE if callback invocation succeeded, *aborted
++ *   will be set to TRUE only if the user didn't cancel
++ */
+ static gboolean
+ query_user_for_authn_info (GnomeVFSURI *uri, 
+ 			   char **user, char **pass, char **keyring,
+@@ -867,7 +874,7 @@
+         GnomeVFSModuleCallbackFullAuthenticationOut out_args;
+ 	gboolean ret;
+ 
+-	ret = FALSE;
++	ret = *aborted = FALSE;
+ 	
+ 	memset (&in_args, 0, sizeof (in_args));
+         memset (&out_args, 0, sizeof (out_args));
+@@ -895,7 +902,6 @@
+                                                 &out_args, sizeof (out_args));
+ 
+ 	if (!ret) {
+-		ret = TRUE;
+ 		/* No callback, try anon login */
+ 		*user = g_strdup ("anonymous");
+ 		*pass = g_strdup ("nobody at gnome.org");
+@@ -934,7 +940,7 @@
+        	g_free (out_args.password);
+        	g_free (out_args.keyring);
+ 
+-	return ret && !out_args.abort_auth;
++	return ret;
+ } 
+ 
+ static gboolean
+@@ -1390,7 +1396,7 @@
+ 								 &aborted, !uri_has_username); 
+ 				G_LOCK (connection_pools);
+ 				pool->num_connections--;
+-				if (!ret) {
++				if (aborted) {
+ 					gnome_vfs_uri_unref (conn->uri);
+ 					g_string_free (conn->response_buffer, TRUE);
+ 					g_free (conn);
+@@ -1398,11 +1404,7 @@
+ 					g_free (pass);
+ 					g_free (keyring);
+ 
+-					if (aborted) {
+-						return GNOME_VFS_ERROR_CANCELLED;
+-					} else {
+-						return GNOME_VFS_ERROR_LOGIN_FAILED;
+-					}
++					return GNOME_VFS_ERROR_CANCELLED;
+ 				}
+ 				g_string_free (conn->response_buffer, TRUE);
+                         	conn->response_buffer = g_string_new ("");
+@@ -1412,7 +1414,9 @@
+ 				if (result == GNOME_VFS_OK) {
+ 					break;
+ 				}
+-				if (result != GNOME_VFS_ERROR_LOGIN_FAILED) {
++				if (result != GNOME_VFS_ERROR_LOGIN_FAILED ||
++				    !ret /* if callback was not handled, and anonymous
++					    login failed, don't run into endless loop */) {
+ 					gnome_vfs_uri_unref (conn->uri);
+ 					g_string_free (conn->response_buffer, TRUE);
+ 					g_free (conn);

================================================================
Index: SOURCES/gnome-vfs2-fix_duplicate_declaration.patch
diff -u /dev/null SOURCES/gnome-vfs2-fix_duplicate_declaration.patch:1.1
--- /dev/null	Sun May 21 11:29:28 2006
+++ SOURCES/gnome-vfs2-fix_duplicate_declaration.patch	Sun May 21 11:29:23 2006
@@ -0,0 +1,15 @@
+===================================================================
+RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-result.c,v
+retrieving revision 1.31
+retrieving revision 1.31.4.1
+diff -u -r1.31 -r1.31.4.1
+--- gnome-vfs-result.c	2005/11/14 11:41:13	1.31
++++ libgnomevfs/gnome-vfs-result.c	2006/04/21 08:24:27	1.31.4.1
+@@ -87,7 +87,6 @@
+ 	/* GNOME_VFS_ERROR_LAUNCH */			N_("Error launching command"),
+ 	/* GNOME_VFS_ERROR_TIMEOUT */			N_("Timeout reached"),
+ 	/* GNOME_VFS_ERROR_NAMESERVER */                N_("Nameserver error"),
+-	/* GNOME_VFS_ERROR_TIMEOUT */			N_("Timeout reached"),
+  	/* GNOME_VFS_ERROR_LOCKED */			N_("The resource is locked"),
+ 	/* GNOME_VFS_ERROR_DEPRECATED_FUNCTION */       N_("Function call deprecated")
+ };

================================================================
Index: SOURCES/gnome-vfs2-fix_parameters_for_desktop.patch
diff -u /dev/null SOURCES/gnome-vfs2-fix_parameters_for_desktop.patch:1.1
--- /dev/null	Sun May 21 11:29:28 2006
+++ SOURCES/gnome-vfs2-fix_parameters_for_desktop.patch	Sun May 21 11:29:23 2006
@@ -0,0 +1,170 @@
+===================================================================
+RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-mime-handlers.c,v
+retrieving revision 1.127
+retrieving revision 1.127.2.1
+diff -u -r1.127 -r1.127.2.1
+--- gnome-vfs-mime-handlers.c	2006/02/06 10:55:55	1.127
++++ libgnomevfs/gnome-vfs-mime-handlers.c	2006/04/26 09:22:34	1.127.2.1
+@@ -58,7 +58,7 @@
+ 
+ extern GList * _gnome_vfs_configuration_get_methods_list (void);
+ 
+-static GnomeVFSResult expand_application_parameters              (const char               *exec,
++static GnomeVFSResult expand_application_parameters              (GnomeVFSMimeApplication *application,
+ 								  GList                   **uri_list,
+ 								  int                      *argc,
+ 								  char                   ***argv);
+@@ -1374,7 +1374,7 @@
+ 	
+ 	while (uris != NULL) {
+ 		
+-		result = expand_application_parameters (app->priv->exec, &uris,
++		result = expand_application_parameters (app, &uris,
+ 							&argc, &argv);
+ 		
+ 		if (result != GNOME_VFS_OK) {
+@@ -1446,7 +1446,7 @@
+ }
+ 
+ static void
+-expand_macro (char macro, GString *exec, GList **uri_list)
++expand_macro (char macro, GString *exec, GnomeVFSMimeApplication *application, GList **uri_list)
+ {
+ 	GList *uris = *uri_list;
+ 	char *expanded;
+@@ -1488,26 +1488,43 @@
+ 				}
+ 			}
+ 			break;
++		case 'i':
++			if (application->priv->icon) {
++				g_string_append (exec, "--icon ");
++				g_string_append (exec, application->priv->icon);
++			}
++			break;
++		case 'c':
++			if (application->name) {
++				g_string_append (exec, application->name);
++			}
++			break;
++		case 'k':
++			if (application->priv->desktop_file_path) {
++				g_string_append (exec, application->priv->desktop_file_path);
++			}
++		case 'm': /* deprecated */
++			break;
+ 	}
+ 
+ 	*uri_list = uris;
+ }
+ 
+ static GnomeVFSResult
+-expand_application_parameters (const char     *exec,
++expand_application_parameters (GnomeVFSMimeApplication *application,
+ 			       GList         **uris,
+ 			       int            *argc,
+ 			       char         ***argv)		   
+ {
+ 	GList *uri_list = *uris;
+-	const char *p = exec;
++	const char *p = application->priv->exec;
+ 	GString *expanded_exec = g_string_new (NULL);
+ 
+ 	g_return_val_if_fail (p != NULL, GNOME_VFS_ERROR_PARSE);
+ 
+ 	while (*p) {
+ 		if (p[0] == '%' && p[1] != '\0') {
+-			expand_macro (p[1], expanded_exec, uris);
++			expand_macro (p[1], expanded_exec, application, uris);
+ 			p++;
+ 		} else {
+ 			g_string_append_c (expanded_exec, *p);
+@@ -1559,21 +1576,23 @@
+ }
+ 
+ static void
+-test_exec_array (const char **execs, GList *uris)
++test_exec_array (GList *apps, GList *uris)
+ {
+-	int argc, i;
++	int argc;
+ 	char **argv;
++	GList *app;
+ 
+-	for (i = 0; execs[i] != NULL; i++)
++	for (app = apps; app != NULL; app = app->next)
+ 	{
++		GnomeVFSMimeApplication *application = app->data;
+ 		GList *l = uris;
+ 
+-		print_expansion_data (uris, execs[i]);
++		print_expansion_data (uris, application->priv->exec);
+ 		while (l != NULL) {
+ 			GnomeVFSResult res;
+ 
+ 			res = expand_application_parameters
+-					(execs[i], &l, &argc, &argv);
++					(application, &l, &argc, &argv);
+ 			print_macro_expansion (argv, res);
+ 			g_strfreev (argv);
+ 		}
+@@ -1602,16 +1621,47 @@
+ 				"test %u",
+ 				"test %U",
+ 				NULL };
++	const char **p;
++
++	GList* applications = NULL;
++	GnomeVFSMimeApplication *application, *app;
++
++	application = g_new0 (GnomeVFSMimeApplication, 1);
++	application->priv = g_new0 (GnomeVFSMimeApplicationPrivate, 1);
++	application->id = g_strdup ("foobar.desktop");
++	aplication->name = g_strdup ("foobar");
++	application->priv->icon = g_strdup ("icon.png");
++
++	for (p = local; p ; p++) {
++		app = gnome_vfs_mime_application_copy (application);
++		g_free (app->priv->exec);
++		app->priv->exec = g_strdup (*p);
++		applications = g_list_prepend(applications, app);
++	}
+ 
+ 	uris = g_list_append (uris, "file:///home/test/test1.txt");
+ 	uris = g_list_append (uris, "file:///home/test/test2.txt");
+-	test_exec_array (local, uris);
+-	
++	test_exec_array (applications, uris);
++
++	gnome_vfs_mime_application_list_free (applications);
++	applications = NULL;
++
++	for (p = remote; p ; p++) {
++		app = gnome_vfs_mime_application_copy (application);
++		g_free (app->priv->exec);
++		app->priv->exec = g_strdup (*p);
++		applications = g_list_prepend (applications, app);
++	}
++
+ 	uris = g_list_append (uris, "http://www.test.org/test1.txt");
+ 	uris = g_list_append (uris, "http://www.test.org/test2.txt");
+-	test_exec_array (remote, uris);
++	test_exec_array (applications, uris);
++
++	gnome_vfs_mime_application_list_free (applications);
+ 
+ 	g_list_free (uris);
++
++	gnome_vfs_mime_application_free (application);
+ }
+ #endif
+ 
+@@ -1999,7 +2049,7 @@
+ }
+ 
+ /**
+- * gnome_vfs_mime_application_get_desktop_file_path:
++ * gnome_vfs_mime_application_get_desktop_id:
+  * @app: a #GnomeVFSMimeApplication.
+  *
+  * Returns the identifier of the desktop entry.

================================================================
Index: SOURCES/gnome-vfs2-fix_volumes_sorting.patch
diff -u /dev/null SOURCES/gnome-vfs2-fix_volumes_sorting.patch:1.1
--- /dev/null	Sun May 21 11:29:28 2006
+++ SOURCES/gnome-vfs2-fix_volumes_sorting.patch	Sun May 21 11:29:23 2006
@@ -0,0 +1,244 @@
+===================================================================
+RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-drive.c,v
+retrieving revision 1.14
+retrieving revision 1.14.2.1
+diff -u -r1.14 -r1.14.2.1
+--- gnome-vfs-drive.c	2006/02/19 00:59:30	1.14
++++ libgnomevfs/gnome-vfs-drive.c	2006/04/25 12:01:14	1.14.2.1
+@@ -193,6 +193,7 @@
+ 	g_free (priv->device_path);
+ 	g_free (priv->activation_uri);
+ 	g_free (priv->display_name);
++	g_free (priv->display_name_key);
+ 	g_free (priv->icon);
+ 	g_free (priv->hal_udi);
+ 	g_free (priv->hal_drive_udi);
+@@ -478,7 +479,7 @@
+ 		return res;
+ 	}
+ 
+-	res = strcmp (priva->display_name, privb->display_name);
++	res = strcmp (priva->display_name_key, privb->display_name_key);
+ 	if (res != 0) {
+ 		return res;
+ 	}
+@@ -593,7 +594,15 @@
+ 	drive->priv->display_name = decode_corba_string_or_null (corba_drive->display_name, TRUE);
+ 	drive->priv->icon = decode_corba_string_or_null (corba_drive->icon, TRUE);
+ 	drive->priv->hal_udi = decode_corba_string_or_null (corba_drive->hal_udi, TRUE);
+-	
++
++	if (drive->priv->display_name != NULL) {
++		char *tmp = g_utf8_casefold (drive->priv->display_name, -1);
++		drive->priv->display_name_key = g_utf8_collate_key (tmp, -1);
++		g_free (tmp);
++	} else {
++		drive->priv->display_name_key = NULL;
++	}
++
+ 	drive->priv->is_user_visible = corba_drive->is_user_visible;
+ 	drive->priv->is_connected = corba_drive->is_connected;
+ 
+===================================================================
+RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-hal-mounts.c,v
+retrieving revision 1.29
+retrieving revision 1.29.2.1
+diff -u -r1.29 -r1.29.2.1
+--- gnome-vfs-hal-mounts.c	2006/03/20 16:52:56	1.29
++++ libgnomevfs/gnome-vfs-hal-mounts.c	2006/04/25 12:01:14	1.29.2.1
+@@ -837,6 +837,9 @@
+ 	name = _hal_drive_policy_get_display_name (volume_monitor_daemon, hal_drive, NULL);
+ 	drive->priv->display_name = _gnome_vfs_volume_monitor_uniquify_drive_name (volume_monitor, name);
+ 	g_free (name);
++	name = g_utf8_casefold (drive->priv->display_name, -1);
++	drive->priv->display_name_key = g_utf8_collate_key (name, -1);
++	g_free (name);
+ 	drive->priv->is_user_visible = TRUE;
+ 	drive->priv->volumes = NULL;
+ 	drive->priv->hal_udi = g_strdup (libhal_drive_get_udi (hal_drive));
+@@ -988,6 +991,9 @@
+ 		name = _hal_drive_policy_get_display_name (volume_monitor_daemon, hal_drive, hal_volume);
+ 		drive->priv->display_name = _gnome_vfs_volume_monitor_uniquify_drive_name (volume_monitor, name);
+ 		g_free (name);
++		name = g_utf8_casefold (drive->priv->display_name, -1);
++		drive->priv->display_name_key = g_utf8_collate_key (name, -1);
++		g_free (name);
+ 		drive->priv->is_user_visible = allowed_by_policy;
+ 		drive->priv->volumes = NULL;
+ 		drive->priv->hal_udi = g_strdup (libhal_volume_get_udi (hal_volume));
+@@ -1038,6 +1044,9 @@
+ 		name = _hal_volume_policy_get_display_name (volume_monitor_daemon, hal_drive, hal_volume);
+ 		vol->priv->display_name = _gnome_vfs_volume_monitor_uniquify_volume_name (volume_monitor, name);
+ 		g_free (name);
++		name = g_utf8_casefold (drive->priv->display_name, -1);
++		drive->priv->display_name_key = g_utf8_collate_key (name, -1);
++		g_free (name);
+ 		vol->priv->icon = _hal_volume_policy_get_icon (volume_monitor_daemon, hal_drive, hal_volume);
+ 		vol->priv->is_user_visible = allowed_by_policy && 
+ 			_hal_volume_policy_show_on_desktop (volume_monitor_daemon, hal_drive, hal_volume);
+===================================================================
+RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-volume.c,v
+retrieving revision 1.11
+retrieving revision 1.11.4.1
+diff -u -r1.11 -r1.11.4.1
+--- gnome-vfs-volume.c	2005/11/14 11:41:13	1.11
++++ libgnomevfs/gnome-vfs-volume.c	2006/04/25 12:01:14	1.11.4.1
+@@ -152,6 +152,7 @@
+ 	g_free (priv->activation_uri);
+ 	g_free (priv->filesystem_type);
+ 	g_free (priv->display_name);
++	g_free (priv->display_name_key);
+ 	g_free (priv->icon);
+ 	g_free (priv->gconf_id);
+ 	g_free (priv->hal_udi);
+@@ -453,7 +454,7 @@
+ 		return res;
+ 	}
+ 
+-	res = strcmp (priva->display_name, privb->display_name);
++	res = strcmp (priva->display_name_key, privb->display_name_key);
+ 	if (res != 0) {
+ 		return res;
+ 	}
+@@ -552,7 +553,15 @@
+ 	volume->priv->icon = decode_corba_string_or_null (corba_volume->icon, TRUE);
+ 	volume->priv->gconf_id = decode_corba_string_or_null (corba_volume->gconf_id, TRUE);
+ 	volume->priv->hal_udi = decode_corba_string_or_null (corba_volume->hal_udi, TRUE);
+-	
++
++	if (volume->priv->display_name != NULL) {
++		char *tmp = g_utf8_casefold (volume->priv->display_name, -1);
++		volume->priv->display_name_key = g_utf8_collate_key (tmp, -1);
++		g_free (tmp);
++	} else {
++		volume->priv->display_name_key = NULL;
++	}
++
+ 	volume->priv->is_user_visible = corba_volume->is_user_visible;
+ 	volume->priv->is_read_only = corba_volume->is_read_only;
+ 	volume->priv->is_mounted = corba_volume->is_mounted;
+===================================================================
+RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-volume-monitor-daemon.c,v
+retrieving revision 1.21
+retrieving revision 1.21.4.1
+diff -u -r1.21 -r1.21.4.1
+--- gnome-vfs-volume-monitor-daemon.c	2005/11/22 14:34:09	1.21
++++ libgnomevfs/gnome-vfs-volume-monitor-daemon.c	2006/04/25 12:01:14	1.21.4.1
+@@ -51,6 +51,7 @@
+ 	char *id;
+ 	char *uri;
+ 	char *display_name;
++	char *display_name_key;
+ 	char *icon;
+ } GnomeVFSConnectedServer;
+ 
+@@ -638,7 +639,7 @@
+ {
+ 	GnomeVFSDrive *drive;
+ 	GnomeVFSVolume *mounted_volume;
+-	char *uri;
++	char *name, *uri;
+ 	
+ 	if (mount->is_loopback ||
+ 	    !(mount->is_user_mountable ||
+@@ -694,6 +695,10 @@
+ 	drive->priv->icon = get_drive_icon_from_type (drive->priv->device_type, mount->mount_path);
+ 
+ 	drive->priv->display_name = get_drive_name (volume_monitor, drive, mount);
++
++	name = g_utf8_casefold (drive->priv->display_name, -1);
++	drive->priv->display_name_key = g_utf8_collate_key (name, -1);
++	g_free (name);
+ 	
+ 	drive->priv->is_user_visible = TRUE;
+ 	drive->priv->volumes = NULL;
+@@ -959,7 +964,11 @@
+ 	vol->priv->display_name = _gnome_vfs_volume_monitor_uniquify_volume_name (volume_monitor, utf8_name);
+ 	g_free (display_name);
+ 	g_free (utf8_name);
+-	
++
++	display_name = g_utf8_casefold (vol->priv->display_name, -1);
++	vol->priv->display_name_key = g_utf8_collate_key (display_name, -1);
++	g_free (display_name);
++
+ 	vol->priv->icon = get_icon_from_type (vol->priv->device_type, mount->mount_path);
+ 
+ 	vol->priv->is_user_visible = 0;
+@@ -1083,6 +1092,7 @@
+ 	g_free (server->id);
+ 	g_free (server->uri);
+ 	g_free (server->display_name);
++	g_free (server->display_name_key);
+ 	g_free (server->icon);
+ 	g_free (server);
+ }
+@@ -1101,7 +1111,7 @@
+ 	if (res != 0) {
+ 		return res;
+ 	}
+-	res = strcmp (a->display_name, b->display_name);
++	res = strcmp (a->display_name_key, b->display_name_key);
+ 	if (res != 0) {
+ 		return res;
+ 	}
+@@ -1156,9 +1166,16 @@
+ 				g_free (server->icon);
+ 				g_free (server);
+ 			} else {
++				char *name;
++
+ 				if (server->display_name == NULL) {
+ 					server->display_name = g_strdup (_("Network server"));
+ 				}
++
++				name = g_utf8_casefold (server->display_name, -1);
++				server->display_name_key = g_utf8_collate_key (name, -1);
++				g_free (name);
++
+ 				if (server->icon == NULL) {
+ 					server->icon = g_strdup ("gnome-fs-share");
+ 				}
+@@ -1180,13 +1197,18 @@
<<Diff was trimmed, longer than 597 lines>>


More information about the pld-cvs-commit mailing list