]> git.pld-linux.org Git - packages/gnome-vfs2.git/blame - gnome-vfs2-fix_volumes_sorting.patch
This commit was manufactured by cvs2git to create branch 'AC-branch'.
[packages/gnome-vfs2.git] / gnome-vfs2-fix_volumes_sorting.patch
CommitLineData
055c2946 1===================================================================
2RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-drive.c,v
3retrieving revision 1.14
4retrieving revision 1.14.2.1
5diff -u -r1.14 -r1.14.2.1
6--- gnome-vfs-drive.c 2006/02/19 00:59:30 1.14
7+++ libgnomevfs/gnome-vfs-drive.c 2006/04/25 12:01:14 1.14.2.1
8@@ -193,6 +193,7 @@
9 g_free (priv->device_path);
10 g_free (priv->activation_uri);
11 g_free (priv->display_name);
12+ g_free (priv->display_name_key);
13 g_free (priv->icon);
14 g_free (priv->hal_udi);
15 g_free (priv->hal_drive_udi);
16@@ -478,7 +479,7 @@
17 return res;
18 }
19
20- res = strcmp (priva->display_name, privb->display_name);
21+ res = strcmp (priva->display_name_key, privb->display_name_key);
22 if (res != 0) {
23 return res;
24 }
25@@ -593,7 +594,15 @@
26 drive->priv->display_name = decode_corba_string_or_null (corba_drive->display_name, TRUE);
27 drive->priv->icon = decode_corba_string_or_null (corba_drive->icon, TRUE);
28 drive->priv->hal_udi = decode_corba_string_or_null (corba_drive->hal_udi, TRUE);
29-
30+
31+ if (drive->priv->display_name != NULL) {
32+ char *tmp = g_utf8_casefold (drive->priv->display_name, -1);
33+ drive->priv->display_name_key = g_utf8_collate_key (tmp, -1);
34+ g_free (tmp);
35+ } else {
36+ drive->priv->display_name_key = NULL;
37+ }
38+
39 drive->priv->is_user_visible = corba_drive->is_user_visible;
40 drive->priv->is_connected = corba_drive->is_connected;
41
42===================================================================
43RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-hal-mounts.c,v
44retrieving revision 1.29
45retrieving revision 1.29.2.1
46diff -u -r1.29 -r1.29.2.1
47--- gnome-vfs-hal-mounts.c 2006/03/20 16:52:56 1.29
48+++ libgnomevfs/gnome-vfs-hal-mounts.c 2006/04/25 12:01:14 1.29.2.1
49@@ -837,6 +837,9 @@
50 name = _hal_drive_policy_get_display_name (volume_monitor_daemon, hal_drive, NULL);
51 drive->priv->display_name = _gnome_vfs_volume_monitor_uniquify_drive_name (volume_monitor, name);
52 g_free (name);
53+ name = g_utf8_casefold (drive->priv->display_name, -1);
54+ drive->priv->display_name_key = g_utf8_collate_key (name, -1);
55+ g_free (name);
56 drive->priv->is_user_visible = TRUE;
57 drive->priv->volumes = NULL;
58 drive->priv->hal_udi = g_strdup (libhal_drive_get_udi (hal_drive));
59@@ -988,6 +991,9 @@
60 name = _hal_drive_policy_get_display_name (volume_monitor_daemon, hal_drive, hal_volume);
61 drive->priv->display_name = _gnome_vfs_volume_monitor_uniquify_drive_name (volume_monitor, name);
62 g_free (name);
63+ name = g_utf8_casefold (drive->priv->display_name, -1);
64+ drive->priv->display_name_key = g_utf8_collate_key (name, -1);
65+ g_free (name);
66 drive->priv->is_user_visible = allowed_by_policy;
67 drive->priv->volumes = NULL;
68 drive->priv->hal_udi = g_strdup (libhal_volume_get_udi (hal_volume));
69@@ -1038,6 +1044,9 @@
70 name = _hal_volume_policy_get_display_name (volume_monitor_daemon, hal_drive, hal_volume);
71 vol->priv->display_name = _gnome_vfs_volume_monitor_uniquify_volume_name (volume_monitor, name);
72 g_free (name);
73+ name = g_utf8_casefold (drive->priv->display_name, -1);
74+ drive->priv->display_name_key = g_utf8_collate_key (name, -1);
75+ g_free (name);
76 vol->priv->icon = _hal_volume_policy_get_icon (volume_monitor_daemon, hal_drive, hal_volume);
77 vol->priv->is_user_visible = allowed_by_policy &&
78 _hal_volume_policy_show_on_desktop (volume_monitor_daemon, hal_drive, hal_volume);
79===================================================================
80RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-volume.c,v
81retrieving revision 1.11
82retrieving revision 1.11.4.1
83diff -u -r1.11 -r1.11.4.1
84--- gnome-vfs-volume.c 2005/11/14 11:41:13 1.11
85+++ libgnomevfs/gnome-vfs-volume.c 2006/04/25 12:01:14 1.11.4.1
86@@ -152,6 +152,7 @@
87 g_free (priv->activation_uri);
88 g_free (priv->filesystem_type);
89 g_free (priv->display_name);
90+ g_free (priv->display_name_key);
91 g_free (priv->icon);
92 g_free (priv->gconf_id);
93 g_free (priv->hal_udi);
94@@ -453,7 +454,7 @@
95 return res;
96 }
97
98- res = strcmp (priva->display_name, privb->display_name);
99+ res = strcmp (priva->display_name_key, privb->display_name_key);
100 if (res != 0) {
101 return res;
102 }
103@@ -552,7 +553,15 @@
104 volume->priv->icon = decode_corba_string_or_null (corba_volume->icon, TRUE);
105 volume->priv->gconf_id = decode_corba_string_or_null (corba_volume->gconf_id, TRUE);
106 volume->priv->hal_udi = decode_corba_string_or_null (corba_volume->hal_udi, TRUE);
107-
108+
109+ if (volume->priv->display_name != NULL) {
110+ char *tmp = g_utf8_casefold (volume->priv->display_name, -1);
111+ volume->priv->display_name_key = g_utf8_collate_key (tmp, -1);
112+ g_free (tmp);
113+ } else {
114+ volume->priv->display_name_key = NULL;
115+ }
116+
117 volume->priv->is_user_visible = corba_volume->is_user_visible;
118 volume->priv->is_read_only = corba_volume->is_read_only;
119 volume->priv->is_mounted = corba_volume->is_mounted;
120===================================================================
121RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-volume-monitor-daemon.c,v
122retrieving revision 1.21
123retrieving revision 1.21.4.1
124diff -u -r1.21 -r1.21.4.1
125--- gnome-vfs-volume-monitor-daemon.c 2005/11/22 14:34:09 1.21
126+++ libgnomevfs/gnome-vfs-volume-monitor-daemon.c 2006/04/25 12:01:14 1.21.4.1
127@@ -51,6 +51,7 @@
128 char *id;
129 char *uri;
130 char *display_name;
131+ char *display_name_key;
132 char *icon;
133 } GnomeVFSConnectedServer;
134
135@@ -638,7 +639,7 @@
136 {
137 GnomeVFSDrive *drive;
138 GnomeVFSVolume *mounted_volume;
139- char *uri;
140+ char *name, *uri;
141
142 if (mount->is_loopback ||
143 !(mount->is_user_mountable ||
144@@ -694,6 +695,10 @@
145 drive->priv->icon = get_drive_icon_from_type (drive->priv->device_type, mount->mount_path);
146
147 drive->priv->display_name = get_drive_name (volume_monitor, drive, mount);
148+
149+ name = g_utf8_casefold (drive->priv->display_name, -1);
150+ drive->priv->display_name_key = g_utf8_collate_key (name, -1);
151+ g_free (name);
152
153 drive->priv->is_user_visible = TRUE;
154 drive->priv->volumes = NULL;
155@@ -959,7 +964,11 @@
156 vol->priv->display_name = _gnome_vfs_volume_monitor_uniquify_volume_name (volume_monitor, utf8_name);
157 g_free (display_name);
158 g_free (utf8_name);
159-
160+
161+ display_name = g_utf8_casefold (vol->priv->display_name, -1);
162+ vol->priv->display_name_key = g_utf8_collate_key (display_name, -1);
163+ g_free (display_name);
164+
165 vol->priv->icon = get_icon_from_type (vol->priv->device_type, mount->mount_path);
166
167 vol->priv->is_user_visible = 0;
168@@ -1083,6 +1092,7 @@
169 g_free (server->id);
170 g_free (server->uri);
171 g_free (server->display_name);
172+ g_free (server->display_name_key);
173 g_free (server->icon);
174 g_free (server);
175 }
176@@ -1101,7 +1111,7 @@
177 if (res != 0) {
178 return res;
179 }
180- res = strcmp (a->display_name, b->display_name);
181+ res = strcmp (a->display_name_key, b->display_name_key);
182 if (res != 0) {
183 return res;
184 }
185@@ -1156,9 +1166,16 @@
186 g_free (server->icon);
187 g_free (server);
188 } else {
189+ char *name;
190+
191 if (server->display_name == NULL) {
192 server->display_name = g_strdup (_("Network server"));
193 }
194+
195+ name = g_utf8_casefold (server->display_name, -1);
196+ server->display_name_key = g_utf8_collate_key (name, -1);
197+ g_free (name);
198+
199 if (server->icon == NULL) {
200 server->icon = g_strdup ("gnome-fs-share");
201 }
202@@ -1180,13 +1197,18 @@
203 GnomeVFSConnectedServer *server)
204 {
205 GnomeVFSVolume *vol;
206-
207+ char *name;
208
209 vol = g_object_new (GNOME_VFS_TYPE_VOLUME, NULL);
210
211 vol->priv->volume_type = GNOME_VFS_VOLUME_TYPE_CONNECTED_SERVER;
212 vol->priv->activation_uri = g_strdup (server->uri);
213 vol->priv->display_name = _gnome_vfs_volume_monitor_uniquify_volume_name (volume_monitor, server->display_name);
214+
215+ name = g_utf8_casefold (vol->priv->display_name, -1);
216+ vol->priv->display_name_key = g_utf8_collate_key (name, -1);
217+ g_free (name);
218+
219 vol->priv->icon = g_strdup (server->icon);
220 vol->priv->gconf_id = g_strdup (server->id);
221 vol->priv->is_mounted = 1;
222===================================================================
223RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-volume-monitor-private.h,v
224retrieving revision 1.11
225retrieving revision 1.11.2.1
226diff -u -r1.11 -r1.11.2.1
227--- gnome-vfs-volume-monitor-private.h 2006/02/19 00:59:30 1.11
228+++ libgnomevfs/gnome-vfs-volume-monitor-private.h 2006/04/25 12:01:14 1.11.2.1
229@@ -50,6 +50,7 @@
230 char *activation_uri;
231 char *filesystem_type;
232 char *display_name;
233+ char *display_name_key;
234 char *icon;
235
236 gboolean is_user_visible;
237@@ -79,6 +80,7 @@
238
239 char *activation_uri;
240 char *display_name;
241+ char *display_name_key;
242 char *icon;
243
244 gboolean is_user_visible;
This page took 0.105741 seconds and 4 git commands to generate.