1 |
eva 08/06/29 22:34:35 |
2 |
|
3 |
Added: nautilus-2.22.3-preserve-metadata.patch |
4 |
nautilus-2.22.3-open-folder.patch |
5 |
nautilus-2.22.3-prevent-recursive-mvcp.patch |
6 |
Log: |
7 |
add patches from bugs #229719, #229723, #216391 |
8 |
(Portage version: 2.2_rc1/cvs/Linux 2.6.24-gentoo-r8-mactel x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 gnome-base/nautilus/files/nautilus-2.22.3-preserve-metadata.patch |
12 |
|
13 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/gnome-base/nautilus/files/nautilus-2.22.3-preserve-metadata.patch?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/gnome-base/nautilus/files/nautilus-2.22.3-preserve-metadata.patch?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: nautilus-2.22.3-preserve-metadata.patch |
17 |
=================================================================== |
18 |
diff -ru nautilus-2.22.1.orig/libnautilus-private/nautilus-file-operations.c nautilus-2.22.1/libnautilus-private/nautilus-file-operations.c |
19 |
--- nautilus-2.22.1.orig/libnautilus-private/nautilus-file-operations.c 2008-03-28 08:13:32.000000000 -0400 |
20 |
+++ nautilus-2.22.1/libnautilus-private/nautilus-file-operations.c 2008-04-05 16:24:39.674861333 -0400 |
21 |
@@ -3245,7 +3245,7 @@ |
22 |
retry: |
23 |
|
24 |
error = NULL; |
25 |
- flags = G_FILE_COPY_NOFOLLOW_SYMLINKS; |
26 |
+ flags = G_FILE_COPY_NOFOLLOW_SYMLINKS | G_FILE_COPY_ALL_METADATA; |
27 |
if (overwrite) { |
28 |
flags |= G_FILE_COPY_OVERWRITE; |
29 |
} |
30 |
|
31 |
|
32 |
|
33 |
1.1 gnome-base/nautilus/files/nautilus-2.22.3-open-folder.patch |
34 |
|
35 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/gnome-base/nautilus/files/nautilus-2.22.3-open-folder.patch?rev=1.1&view=markup |
36 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/gnome-base/nautilus/files/nautilus-2.22.3-open-folder.patch?rev=1.1&content-type=text/plain |
37 |
|
38 |
Index: nautilus-2.22.3-open-folder.patch |
39 |
=================================================================== |
40 |
diff -up nautilus-2.22.2/libnautilus-private/nautilus-autorun.c.fix-open-folder nautilus-2.22.2/libnautilus-private/nautilus-autorun.c |
41 |
--- nautilus-2.22.2/libnautilus-private/nautilus-autorun.c.fix-open-folder 2008-04-17 22:30:04.000000000 -0400 |
42 |
+++ nautilus-2.22.2/libnautilus-private/nautilus-autorun.c 2008-04-17 22:30:10.000000000 -0400 |
43 |
@@ -1200,15 +1200,6 @@ typedef struct { |
44 |
gpointer user_data; |
45 |
} AutorunData; |
46 |
|
47 |
- |
48 |
-static void |
49 |
-autorun_open_folder_for_mount (AutorunData *data) |
50 |
-{ |
51 |
- if (eel_preferences_get_boolean (NAUTILUS_PREFERENCES_MEDIA_AUTOMOUNT_OPEN) && |
52 |
- data->open_window_func != NULL) |
53 |
- data->open_window_func (data->mount, data->user_data); |
54 |
-} |
55 |
- |
56 |
static void |
57 |
autorun_guessed_content_type_callback (GObject *source_object, |
58 |
GAsyncResult *res, |
59 |
@@ -1237,13 +1228,14 @@ autorun_guessed_content_type_callback (G |
60 |
} |
61 |
g_strfreev (guessed_content_type); |
62 |
} else { |
63 |
- open_folder = TRUE; |
64 |
+ if (eel_preferences_get_boolean (NAUTILUS_PREFERENCES_MEDIA_AUTOMOUNT_OPEN)) |
65 |
+ open_folder = TRUE; |
66 |
} |
67 |
} |
68 |
|
69 |
/* only open the folder once.. */ |
70 |
- if (open_folder) { |
71 |
- autorun_open_folder_for_mount (data); |
72 |
+ if (open_folder && data->open_window_func != NULL) { |
73 |
+ data->open_window_func (data->mount, data->user_data); |
74 |
} |
75 |
|
76 |
g_object_unref (data->mount); |
77 |
|
78 |
|
79 |
|
80 |
1.1 gnome-base/nautilus/files/nautilus-2.22.3-prevent-recursive-mvcp.patch |
81 |
|
82 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/gnome-base/nautilus/files/nautilus-2.22.3-prevent-recursive-mvcp.patch?rev=1.1&view=markup |
83 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/gnome-base/nautilus/files/nautilus-2.22.3-prevent-recursive-mvcp.patch?rev=1.1&content-type=text/plain |
84 |
|
85 |
Index: nautilus-2.22.3-prevent-recursive-mvcp.patch |
86 |
=================================================================== |
87 |
Index: libnautilus-private/nautilus-file-operations.c |
88 |
=================================================================== |
89 |
--- libnautilus-private/nautilus-file-operations.c (revision 14108) |
90 |
+++ libnautilus-private/nautilus-file-operations.c (working copy) |
91 |
@@ -3224,6 +3224,24 @@ |
92 |
} |
93 |
} |
94 |
|
95 |
+static gboolean |
96 |
+g_file_struct_contains (GFile *child, GFile *root) |
97 |
+{ |
98 |
+ GFile *f; |
99 |
+ |
100 |
+ f = g_file_dup (child); |
101 |
+ while (f) { |
102 |
+ if (g_file_equal (f, root)) { |
103 |
+ g_object_unref (f); |
104 |
+ return TRUE; |
105 |
+ } |
106 |
+ f = g_file_get_parent (f); |
107 |
+ } |
108 |
+ |
109 |
+ if (f) g_object_unref (f); |
110 |
+ return FALSE; |
111 |
+} |
112 |
+ |
113 |
/* Debuting files is non-NULL only for toplevel items */ |
114 |
static void |
115 |
copy_move_file (CopyMoveJob *copy_job, |
116 |
@@ -3264,6 +3282,41 @@ |
117 |
dest = get_target_file (src, dest_dir, same_fs); |
118 |
} |
119 |
|
120 |
+ |
121 |
+ /* Don't allow recursive move/copy into itself. |
122 |
+ * (We would get a file system error if we proceeded but it is nicer to |
123 |
+ * detect and report it at this level) */ |
124 |
+ if (g_file_struct_contains (dest_dir, src)) { |
125 |
+ if (job->skip_all_error) { |
126 |
+ g_error_free (error); |
127 |
+ goto out; |
128 |
+ } |
129 |
+ |
130 |
+ /* the run_warning() frees all strings passed in automatically */ |
131 |
+ primary = copy_job->is_move ? g_strdup (_("You cannot move a folder into itself.")) |
132 |
+ : g_strdup (_("You cannot copy a folder into itself.")); |
133 |
+ secondary = g_strdup (_("The destination folder is inside the source folder.")); |
134 |
+ |
135 |
+ response = run_warning (job, |
136 |
+ primary, |
137 |
+ secondary, |
138 |
+ NULL, |
139 |
+ GTK_STOCK_CANCEL, SKIP_ALL, SKIP, |
140 |
+ NULL); |
141 |
+ |
142 |
+ if (response == 0 || response == GTK_RESPONSE_DELETE_EVENT) { |
143 |
+ abort_job (job); |
144 |
+ } else if (response == 1) { /* skip all */ |
145 |
+ job->skip_all_error = TRUE; |
146 |
+ } else if (response == 2) { /* skip */ |
147 |
+ /* do nothing */ |
148 |
+ } else { |
149 |
+ g_assert_not_reached (); |
150 |
+ } |
151 |
+ |
152 |
+ goto out; |
153 |
+ } |
154 |
+ |
155 |
retry: |
156 |
|
157 |
error = NULL; |
158 |
@@ -3791,6 +3844,41 @@ |
159 |
|
160 |
dest = get_target_file (src, dest_dir, same_fs); |
161 |
|
162 |
+ |
163 |
+ /* Don't allow recursive move/copy into itself. |
164 |
+ * (We would get a file system error if we proceeded but it is nicer to |
165 |
+ * detect and report it at this level) */ |
166 |
+ if (g_file_struct_contains (dest_dir, src)) { |
167 |
+ if (job->skip_all_error) { |
168 |
+ g_error_free (error); |
169 |
+ goto out; |
170 |
+ } |
171 |
+ |
172 |
+ /* the run_warning() frees all strings passed in automatically */ |
173 |
+ primary = move_job->is_move ? g_strdup (_("You cannot move a folder into itself.")) |
174 |
+ : g_strdup (_("You cannot copy a folder into itself.")); |
175 |
+ secondary = g_strdup (_("The destination folder is inside the source folder.")); |
176 |
+ |
177 |
+ response = run_warning (job, |
178 |
+ primary, |
179 |
+ secondary, |
180 |
+ NULL, |
181 |
+ GTK_STOCK_CANCEL, SKIP_ALL, SKIP, |
182 |
+ NULL); |
183 |
+ |
184 |
+ if (response == 0 || response == GTK_RESPONSE_DELETE_EVENT) { |
185 |
+ abort_job (job); |
186 |
+ } else if (response == 1) { /* skip all */ |
187 |
+ job->skip_all_error = TRUE; |
188 |
+ } else if (response == 2) { /* skip */ |
189 |
+ /* do nothing */ |
190 |
+ } else { |
191 |
+ g_assert_not_reached (); |
192 |
+ } |
193 |
+ |
194 |
+ goto out; |
195 |
+ } |
196 |
+ |
197 |
retry: |
198 |
|
199 |
flags = G_FILE_COPY_NOFOLLOW_SYMLINKS | G_FILE_COPY_NO_FALLBACK_FOR_MOVE; |
200 |
|
201 |
|
202 |
|
203 |
-- |
204 |
gentoo-commits@l.g.o mailing list |