Status: | Merged |
---|---|
Merged at revision: | 1379 |
Proposed branch: | lp:~mterry/deja-dup/nag |
Merge into: | lp:deja-dup/24 |
Prerequisite: | lp:~mterry/deja-dup/verify |
Diff against target: |
1485 lines (+521/-156) 14 files modified
common/CommonUtils.vala (+50/-3) common/Operation.vala (+18/-7) common/OperationVerify.vala (+24/-0) common/ToolPlugin.vala (+1/-0) data/org.gnome.DejaDup.gschema.xml.in (+6/-1) deja-dup/Assistant.vala (+13/-3) deja-dup/AssistantBackup.vala (+4/-1) deja-dup/AssistantOperation.vala (+118/-22) po/deja-dup.pot (+156/-108) tests/runner/mock/duplicity (+12/-0) tests/runner/runner.vala (+39/-9) tests/scripts/nag.test (+58/-0) tools/duplicity/DuplicityInstance.vala (+4/-1) tools/duplicity/DuplicityJob.vala (+18/-1) |
To merge this branch: | bzr merge lp:~mterry/deja-dup/nag |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Robert Bruce Park (community) | Approve | ||
Ken VanDine | Pending | ||
Review via email: mp+120312@code.launchpad.net |
Commit message
Description of the change
Adds a nag page to occasionally test the verify check without any cache/saved-
To test:
test/interactive
deja-dup-
gsettings set org.gnome.DejaDup nag-check '1970-01-
deja-dup --backup
Robert Bruce Park (robru) wrote : | # |
Also, why did you delete that .pot file? Seems unrelated to the rest of this branch, kinda sloppy.
- 1379. By Michael Terry
-
add back dropped pot file, whoops
- 1380. By Michael Terry
-
leave window up when we just tested the restore and asked for the password
- 1381. By Michael Terry
-
merge from trunk
- 1382. By Michael Terry
-
uncomment deleting the test directory; that wasn't supposed to be committed
- 1383. By Michael Terry
-
same for dropping valac-0.18 support
- 1384. By Michael Terry
-
try again to fix deja-dup.pot
Michael Terry (mterry) wrote : | # |
OK, now the window stays up on successful backup+nag. On error, an error window will appear, as it would before.
As for the deja-dup.pot file, it was an accidental deletion. I tried to update it, not delete it, but apparently screwed that up.
Robert Bruce Park (robru) wrote : | # |
Looks good now!
Preview Diff
1 | === modified file 'common/CommonUtils.vala' | |||
2 | --- common/CommonUtils.vala 2012-06-21 15:45:56 +0000 | |||
3 | +++ common/CommonUtils.vala 2012-08-21 01:36:28 +0000 | |||
4 | @@ -30,6 +30,7 @@ | |||
5 | 30 | public const string LAST_BACKUP_KEY = "last-backup"; | 30 | public const string LAST_BACKUP_KEY = "last-backup"; |
6 | 31 | public const string LAST_RESTORE_KEY = "last-restore"; | 31 | public const string LAST_RESTORE_KEY = "last-restore"; |
7 | 32 | public const string PROMPT_CHECK_KEY = "prompt-check"; | 32 | public const string PROMPT_CHECK_KEY = "prompt-check"; |
8 | 33 | public const string NAG_CHECK_KEY = "nag-check"; | ||
9 | 33 | public const string PERIODIC_KEY = "periodic"; | 34 | public const string PERIODIC_KEY = "periodic"; |
10 | 34 | public const string PERIODIC_PERIOD_KEY = "periodic-period"; | 35 | public const string PERIODIC_PERIOD_KEY = "periodic-period"; |
11 | 35 | public const string DELETE_AFTER_KEY = "delete-after"; | 36 | public const string DELETE_AFTER_KEY = "delete-after"; |
12 | @@ -209,11 +210,11 @@ | |||
13 | 209 | run_deja_dup("--prompt"); | 210 | run_deja_dup("--prompt"); |
14 | 210 | } | 211 | } |
15 | 211 | 212 | ||
17 | 212 | public void update_prompt_time(bool cancel = false) | 213 | private void update_time_key(string key, bool cancel) |
18 | 213 | { | 214 | { |
19 | 214 | var settings = DejaDup.get_settings(); | 215 | var settings = DejaDup.get_settings(); |
20 | 215 | 216 | ||
22 | 216 | if (settings.get_string(PROMPT_CHECK_KEY) == "disabled") | 217 | if (settings.get_string(key) == "disabled") |
23 | 217 | return; // never re-enable | 218 | return; // never re-enable |
24 | 218 | 219 | ||
25 | 219 | string cur_time_str; | 220 | string cur_time_str; |
26 | @@ -226,7 +227,53 @@ | |||
27 | 226 | cur_time_str = cur_time.to_iso8601(); | 227 | cur_time_str = cur_time.to_iso8601(); |
28 | 227 | } | 228 | } |
29 | 228 | 229 | ||
31 | 229 | settings.set_string(PROMPT_CHECK_KEY, cur_time_str); | 230 | settings.set_string(key, cur_time_str); |
32 | 231 | } | ||
33 | 232 | |||
34 | 233 | public void update_prompt_time(bool cancel = false) | ||
35 | 234 | { | ||
36 | 235 | update_time_key(PROMPT_CHECK_KEY, cancel); | ||
37 | 236 | } | ||
38 | 237 | |||
39 | 238 | public void update_nag_time(bool cancel = false) | ||
40 | 239 | { | ||
41 | 240 | update_time_key(NAG_CHECK_KEY, cancel); | ||
42 | 241 | } | ||
43 | 242 | |||
44 | 243 | // In seconds | ||
45 | 244 | public int get_nag_delay() | ||
46 | 245 | { | ||
47 | 246 | TimeSpan span = 0; | ||
48 | 247 | if (DejaDup.in_testing_mode()) | ||
49 | 248 | span = TimeSpan.MINUTE * 2; | ||
50 | 249 | else | ||
51 | 250 | span = TimeSpan.DAY * 30 * 2; | ||
52 | 251 | return (int)(span / TimeSpan.SECOND); | ||
53 | 252 | } | ||
54 | 253 | |||
55 | 254 | // This makes the check of whether we should remind user about their password. | ||
56 | 255 | public bool is_nag_time() | ||
57 | 256 | { | ||
58 | 257 | var settings = DejaDup.get_settings(); | ||
59 | 258 | var nag = settings.get_string(NAG_CHECK_KEY); | ||
60 | 259 | var last_run_string = last_run_date(TimestampType.BACKUP); | ||
61 | 260 | |||
62 | 261 | if (nag == "disabled" || last_run_string == "") | ||
63 | 262 | return false; | ||
64 | 263 | else if (nag == "") { | ||
65 | 264 | update_nag_time(); | ||
66 | 265 | return false; | ||
67 | 266 | } | ||
68 | 267 | |||
69 | 268 | TimeVal last_check_tval = TimeVal(); | ||
70 | 269 | if (!last_check_tval.from_iso8601(nag)) | ||
71 | 270 | return false; | ||
72 | 271 | |||
73 | 272 | var last_check = new DateTime.from_timeval_local(last_check_tval); | ||
74 | 273 | last_check = last_check.add_seconds(get_nag_delay()); | ||
75 | 274 | |||
76 | 275 | var now = new DateTime.now_local(); | ||
77 | 276 | return (last_check.compare(now) <= 0); | ||
78 | 230 | } | 277 | } |
79 | 231 | 278 | ||
80 | 232 | public string get_folder_key(SimpleSettings settings, string key) | 279 | public string get_folder_key(SimpleSettings settings, string key) |
81 | 233 | 280 | ||
82 | === modified file 'common/Operation.vala' | |||
83 | --- common/Operation.vala 2012-08-13 19:59:00 +0000 | |||
84 | +++ common/Operation.vala 2012-08-21 01:36:28 +0000 | |||
85 | @@ -41,6 +41,7 @@ | |||
86 | 41 | public signal void question(string title, string msg); | 41 | public signal void question(string title, string msg); |
87 | 42 | public signal void is_full(bool first); | 42 | public signal void is_full(bool first); |
88 | 43 | 43 | ||
89 | 44 | public bool use_cached_password {get; protected set; default = true;} | ||
90 | 44 | public bool needs_password {get; set;} | 45 | public bool needs_password {get; set;} |
91 | 45 | public Backend backend {get; private set;} | 46 | public Backend backend {get; private set;} |
92 | 46 | public bool use_progress {get {return (job.flags & ToolJob.Flags.NO_PROGRESS) == 0;} | 47 | public bool use_progress {get {return (job.flags & ToolJob.Flags.NO_PROGRESS) == 0;} |
93 | @@ -91,6 +92,7 @@ | |||
94 | 91 | protected string passphrase; | 92 | protected string passphrase; |
95 | 92 | bool finished = false; | 93 | bool finished = false; |
96 | 93 | string saved_detail = null; | 94 | string saved_detail = null; |
97 | 95 | Operation chained_op = null; | ||
98 | 94 | construct | 96 | construct |
99 | 95 | { | 97 | { |
100 | 96 | backend = Backend.get_default(); | 98 | backend = Backend.get_default(); |
101 | @@ -168,12 +170,18 @@ | |||
102 | 168 | 170 | ||
103 | 169 | public void cancel() | 171 | public void cancel() |
104 | 170 | { | 172 | { |
106 | 171 | job.cancel(); | 173 | if (chained_op != null) |
107 | 174 | chained_op.cancel(); | ||
108 | 175 | else | ||
109 | 176 | job.cancel(); | ||
110 | 172 | } | 177 | } |
111 | 173 | 178 | ||
112 | 174 | public void stop() | 179 | public void stop() |
113 | 175 | { | 180 | { |
115 | 176 | job.stop(); | 181 | if (chained_op != null) |
116 | 182 | chained_op.stop(); | ||
117 | 183 | else | ||
118 | 184 | job.stop(); | ||
119 | 177 | } | 185 | } |
120 | 178 | 186 | ||
121 | 179 | protected virtual void connect_to_job() | 187 | protected virtual void connect_to_job() |
122 | @@ -246,23 +254,26 @@ | |||
123 | 246 | * Sometimes an operation wants to chain to a separate operation. | 254 | * Sometimes an operation wants to chain to a separate operation. |
124 | 247 | * Here is the glue to make that happen. | 255 | * Here is the glue to make that happen. |
125 | 248 | */ | 256 | */ |
127 | 249 | subop.ref(); | 257 | assert(chained_op == null); |
128 | 258 | |||
129 | 259 | chained_op = subop; | ||
130 | 250 | subop.done.connect((s, c, d) => { | 260 | subop.done.connect((s, c, d) => { |
131 | 251 | done(s, c, combine_details(saved_detail, d)); | 261 | done(s, c, combine_details(saved_detail, d)); |
133 | 252 | subop.unref(); | 262 | chained_op = null; |
134 | 253 | }); | 263 | }); |
135 | 254 | subop.raise_error.connect((e, d) => {raise_error(e, d);}); | 264 | subop.raise_error.connect((e, d) => {raise_error(e, d);}); |
136 | 255 | subop.progress.connect((p) => {progress(p);}); | 265 | subop.progress.connect((p) => {progress(p);}); |
137 | 256 | subop.passphrase_required.connect(() => { | 266 | subop.passphrase_required.connect(() => { |
138 | 267 | needs_password = true; | ||
139 | 257 | passphrase_required(); | 268 | passphrase_required(); |
142 | 258 | subop.needs_password = needs_password; | 269 | if (!needs_password) |
143 | 259 | subop.passphrase = passphrase; | 270 | subop.set_passphrase(passphrase); |
144 | 260 | }); | 271 | }); |
145 | 261 | subop.question.connect((t, m) => {question(t, m);}); | 272 | subop.question.connect((t, m) => {question(t, m);}); |
146 | 262 | 273 | ||
147 | 274 | use_cached_password = subop.use_cached_password; | ||
148 | 263 | saved_detail = combine_details(saved_detail, detail); | 275 | saved_detail = combine_details(saved_detail, detail); |
149 | 264 | subop.set_state(get_state()); | 276 | subop.set_state(get_state()); |
150 | 265 | job = subop.job; | ||
151 | 266 | 277 | ||
152 | 267 | action_desc_changed(desc); | 278 | action_desc_changed(desc); |
153 | 268 | progress(0); | 279 | progress(0); |
154 | 269 | 280 | ||
155 | === modified file 'common/OperationVerify.vala' | |||
156 | --- common/OperationVerify.vala 2012-08-10 18:33:29 +0000 | |||
157 | +++ common/OperationVerify.vala 2012-08-21 01:36:28 +0000 | |||
158 | @@ -28,19 +28,40 @@ | |||
159 | 28 | { | 28 | { |
160 | 29 | File metadir; | 29 | File metadir; |
161 | 30 | File destdir; | 30 | File destdir; |
162 | 31 | bool nag; | ||
163 | 31 | 32 | ||
164 | 32 | public OperationVerify() { | 33 | public OperationVerify() { |
165 | 33 | Object(mode: ToolJob.Mode.RESTORE); | 34 | Object(mode: ToolJob.Mode.RESTORE); |
166 | 34 | } | 35 | } |
167 | 35 | 36 | ||
168 | 37 | construct { | ||
169 | 38 | // Should we nag user about password, etc? What this really means is that | ||
170 | 39 | // we try to do our normal verification routine in as close an emulation | ||
171 | 40 | // to a fresh restore after a disaster as possible. So fresh cache, no | ||
172 | 41 | // saved password, etc. We do *not* explicitly unmount the backend, | ||
173 | 42 | // because we may not be the only consumers. | ||
174 | 43 | if (is_nag_time()) { | ||
175 | 44 | use_cached_password = false; | ||
176 | 45 | nag = true; | ||
177 | 46 | } | ||
178 | 47 | } | ||
179 | 48 | |||
180 | 36 | public async override void start(bool try_claim_bus = true) | 49 | public async override void start(bool try_claim_bus = true) |
181 | 37 | { | 50 | { |
182 | 51 | if (nag) { | ||
183 | 52 | var fake_state = new State(); | ||
184 | 53 | fake_state.backend = backend.clone(); | ||
185 | 54 | set_state(fake_state); | ||
186 | 55 | } | ||
187 | 38 | action_desc_changed(_("Verifying backup…")); | 56 | action_desc_changed(_("Verifying backup…")); |
188 | 39 | yield base.start(try_claim_bus); | 57 | yield base.start(try_claim_bus); |
189 | 40 | } | 58 | } |
190 | 41 | 59 | ||
191 | 42 | protected override void connect_to_job() | 60 | protected override void connect_to_job() |
192 | 43 | { | 61 | { |
193 | 62 | if (nag) | ||
194 | 63 | job.flags |= ToolJob.Flags.NO_CACHE; | ||
195 | 64 | |||
196 | 44 | string cachedir = Environment.get_user_cache_dir(); | 65 | string cachedir = Environment.get_user_cache_dir(); |
197 | 45 | metadir = File.new_for_path(Path.build_filename(cachedir, Config.PACKAGE, "metadata")); | 66 | metadir = File.new_for_path(Path.build_filename(cachedir, Config.PACKAGE, "metadata")); |
198 | 46 | job.restore_files.append(metadir); | 67 | job.restore_files.append(metadir); |
199 | @@ -73,6 +94,9 @@ | |||
200 | 73 | raise_error(_("Your backup appears to be corrupted. You should delete the backup and try again."), null); | 94 | raise_error(_("Your backup appears to be corrupted. You should delete the backup and try again."), null); |
201 | 74 | success = false; | 95 | success = false; |
202 | 75 | } | 96 | } |
203 | 97 | |||
204 | 98 | if (nag) | ||
205 | 99 | update_nag_time(); | ||
206 | 76 | } | 100 | } |
207 | 77 | 101 | ||
208 | 78 | new RecursiveDelete(metadir).start(); | 102 | new RecursiveDelete(metadir).start(); |
209 | 79 | 103 | ||
210 | === modified file 'common/ToolPlugin.vala' | |||
211 | --- common/ToolPlugin.vala 2012-04-30 00:23:37 +0000 | |||
212 | +++ common/ToolPlugin.vala 2012-08-21 01:36:28 +0000 | |||
213 | @@ -55,6 +55,7 @@ | |||
214 | 55 | 55 | ||
215 | 56 | public enum Flags { | 56 | public enum Flags { |
216 | 57 | NO_PROGRESS, | 57 | NO_PROGRESS, |
217 | 58 | NO_CACHE, | ||
218 | 58 | } | 59 | } |
219 | 59 | public Flags flags {get; set;} | 60 | public Flags flags {get; set;} |
220 | 60 | 61 | ||
221 | 61 | 62 | ||
222 | === modified file 'data/org.gnome.DejaDup.gschema.xml.in' | |||
223 | --- data/org.gnome.DejaDup.gschema.xml.in 2012-06-21 15:45:56 +0000 | |||
224 | +++ data/org.gnome.DejaDup.gschema.xml.in 2012-08-21 01:36:28 +0000 | |||
225 | @@ -47,9 +47,14 @@ | |||
226 | 47 | </key> | 47 | </key> |
227 | 48 | <key name="prompt-check" type="s"> | 48 | <key name="prompt-check" type="s"> |
228 | 49 | <default>''</default> | 49 | <default>''</default> |
230 | 50 | <_summary>The first time Déjà Dup checked whether it should prompt about backing up</_summary> | 50 | <_summary>The last time Déjà Dup checked whether it should prompt about backing up</_summary> |
231 | 51 | <_description>When a user logs in, the Déjà Dup monitor checks whether it should prompt about backing up. This is used to increase discoverability for users that don’t know about backups. This time should be either ‘disabled’ to turn off this check or in ISO 8601 format.</_description> | 51 | <_description>When a user logs in, the Déjà Dup monitor checks whether it should prompt about backing up. This is used to increase discoverability for users that don’t know about backups. This time should be either ‘disabled’ to turn off this check or in ISO 8601 format.</_description> |
232 | 52 | </key> | 52 | </key> |
233 | 53 | <key name="nag-check" type="s"> | ||
234 | 54 | <default>''</default> | ||
235 | 55 | <_summary>The last time Déjà Dup checked whether it should prompt about your password</_summary> | ||
236 | 56 | <_description>In order to prevent you from forgetting your passwords, Déjà Dup will occasionally notify you to confirm the password. This time should be either ‘disabled’ to turn off this check or in ISO 8601 format.</_description> | ||
237 | 57 | </key> | ||
238 | 53 | <key name="delete-after" type="i"> | 58 | <key name="delete-after" type="i"> |
239 | 54 | <default>0</default> | 59 | <default>0</default> |
240 | 55 | <_summary>How long to keep backup files</_summary> | 60 | <_summary>How long to keep backup files</_summary> |
241 | 56 | 61 | ||
242 | === modified file 'deja-dup/Assistant.vala' | |||
243 | --- deja-dup/Assistant.vala 2012-08-06 22:41:13 +0000 | |||
244 | +++ deja-dup/Assistant.vala 2012-08-21 01:36:28 +0000 | |||
245 | @@ -39,7 +39,7 @@ | |||
246 | 39 | public bool last_op_was_back {get; private set; default = false;} | 39 | public bool last_op_was_back {get; private set; default = false;} |
247 | 40 | 40 | ||
248 | 41 | public enum Type { | 41 | public enum Type { |
250 | 42 | NORMAL, INTERRUPT, SUMMARY, PROGRESS, FINISH | 42 | NORMAL, INTERRUPT, CHECK, SUMMARY, PROGRESS, FINISH |
251 | 43 | } | 43 | } |
252 | 44 | 44 | ||
253 | 45 | Gtk.Label header_title; | 45 | Gtk.Label header_title; |
254 | @@ -165,6 +165,11 @@ | |||
255 | 165 | go_forward(); | 165 | go_forward(); |
256 | 166 | } | 166 | } |
257 | 167 | 167 | ||
258 | 168 | static bool is_interrupt_type(Type type) | ||
259 | 169 | { | ||
260 | 170 | return type == Type.INTERRUPT || type == Type.CHECK; | ||
261 | 171 | } | ||
262 | 172 | |||
263 | 168 | public void go_back() | 173 | public void go_back() |
264 | 169 | { | 174 | { |
265 | 170 | weak List<PageInfo> next; | 175 | weak List<PageInfo> next; |
266 | @@ -172,7 +177,7 @@ | |||
267 | 172 | next = interrupted.prev; | 177 | next = interrupted.prev; |
268 | 173 | else { | 178 | else { |
269 | 174 | next = current.prev; | 179 | next = current.prev; |
271 | 175 | while (next != null && next.data.type == Type.INTERRUPT) | 180 | while (next != null && is_interrupt_type(next.data.type)) |
272 | 176 | next = next.prev; | 181 | next = next.prev; |
273 | 177 | } | 182 | } |
274 | 178 | 183 | ||
275 | @@ -194,7 +199,7 @@ | |||
276 | 194 | } | 199 | } |
277 | 195 | else { | 200 | else { |
278 | 196 | next = (current == null) ? infos : current.next; | 201 | next = (current == null) ? infos : current.next; |
280 | 197 | while (next != null && next.data.type == Type.INTERRUPT) | 202 | while (next != null && is_interrupt_type(next.data.type)) |
281 | 198 | next = next.next; | 203 | next = next.next; |
282 | 199 | } | 204 | } |
283 | 200 | 205 | ||
284 | @@ -309,6 +314,11 @@ | |||
285 | 309 | forward_text = _("Co_ntinue"); | 314 | forward_text = _("Co_ntinue"); |
286 | 310 | } | 315 | } |
287 | 311 | break; | 316 | break; |
288 | 317 | case Type.CHECK: | ||
289 | 318 | show_close = true; | ||
290 | 319 | show_forward = true; | ||
291 | 320 | forward_text = C_("verb", "_Test"); | ||
292 | 321 | break; | ||
293 | 312 | case Type.PROGRESS: | 322 | case Type.PROGRESS: |
294 | 313 | show_cancel = true; | 323 | show_cancel = true; |
295 | 314 | show_resume = true; | 324 | show_resume = true; |
296 | 315 | 325 | ||
297 | === modified file 'deja-dup/AssistantBackup.vala' | |||
298 | --- deja-dup/AssistantBackup.vala 2012-04-10 02:22:06 +0000 | |||
299 | +++ deja-dup/AssistantBackup.vala 2012-08-21 01:36:28 +0000 | |||
300 | @@ -91,8 +91,11 @@ | |||
301 | 91 | else { | 91 | else { |
302 | 92 | set_page_title(page, _("Backup Finished")); | 92 | set_page_title(page, _("Backup Finished")); |
303 | 93 | 93 | ||
304 | 94 | // Also leave ourselves up if we just finished a restore test. | ||
305 | 95 | if (nagged) | ||
306 | 96 | summary_label.label = _("Your files were successfully backed up and tested."); | ||
307 | 94 | // If we don't have a special message to show the user, just bail. | 97 | // If we don't have a special message to show the user, just bail. |
309 | 95 | if (!detail_widget.get_visible()) | 98 | else if (!detail_widget.get_visible()) |
310 | 96 | Idle.add(() => {do_close(); return false;}); | 99 | Idle.add(() => {do_close(); return false;}); |
311 | 97 | } | 100 | } |
312 | 98 | } | 101 | } |
313 | 99 | 102 | ||
314 | === modified file 'deja-dup/AssistantOperation.vala' | |||
315 | --- deja-dup/AssistantOperation.vala 2012-08-06 22:41:13 +0000 | |||
316 | +++ deja-dup/AssistantOperation.vala 2012-08-21 01:36:28 +0000 | |||
317 | @@ -45,11 +45,14 @@ | |||
318 | 45 | protected StatusIcon status_icon; | 45 | protected StatusIcon status_icon; |
319 | 46 | protected bool succeeded = false; | 46 | protected bool succeeded = false; |
320 | 47 | 47 | ||
321 | 48 | Gtk.Entry nag_entry; | ||
322 | 48 | Gtk.Entry encrypt_entry; | 49 | Gtk.Entry encrypt_entry; |
323 | 49 | Gtk.Entry encrypt_confirm_entry; | 50 | Gtk.Entry encrypt_confirm_entry; |
324 | 50 | Gtk.RadioButton encrypt_enabled; | 51 | Gtk.RadioButton encrypt_enabled; |
325 | 51 | Gtk.CheckButton encrypt_remember; | 52 | Gtk.CheckButton encrypt_remember; |
326 | 52 | protected Gtk.Widget password_page {get; private set;} | 53 | protected Gtk.Widget password_page {get; private set;} |
327 | 54 | protected Gtk.Widget nag_page {get; private set;} | ||
328 | 55 | protected bool nagged; | ||
329 | 53 | List<Gtk.Widget> first_password_widgets; | 56 | List<Gtk.Widget> first_password_widgets; |
330 | 54 | MainLoop password_ask_loop; | 57 | MainLoop password_ask_loop; |
331 | 55 | MainLoop password_find_loop; | 58 | MainLoop password_find_loop; |
332 | @@ -94,6 +97,7 @@ | |||
333 | 94 | add_setup_pages(); | 97 | add_setup_pages(); |
334 | 95 | add_confirm_page(); | 98 | add_confirm_page(); |
335 | 96 | add_password_page(); | 99 | add_password_page(); |
336 | 100 | add_nag_page(); | ||
337 | 97 | add_question_page(); | 101 | add_question_page(); |
338 | 98 | add_progress_page(); | 102 | add_progress_page(); |
339 | 99 | add_summary_page(); | 103 | add_summary_page(); |
340 | @@ -384,6 +388,59 @@ | |||
341 | 384 | return page; | 388 | return page; |
342 | 385 | } | 389 | } |
343 | 386 | 390 | ||
344 | 391 | protected Gtk.Widget make_nag_page() | ||
345 | 392 | { | ||
346 | 393 | int rows = 0; | ||
347 | 394 | Gtk.Widget w, label; | ||
348 | 395 | |||
349 | 396 | var page = new Gtk.Grid(); | ||
350 | 397 | page.set("row-spacing", 6, | ||
351 | 398 | "column-spacing", 6, | ||
352 | 399 | "border-width", 12); | ||
353 | 400 | |||
354 | 401 | w = new Gtk.Label(_("In order to check that you will be able to retrieve your files in the case of an emergency, please enter your encryption password again to perform a brief restore test.")); | ||
355 | 402 | w.set("xalign", 0.0f, | ||
356 | 403 | "max-width-chars", 25, | ||
357 | 404 | "wrap", true); | ||
358 | 405 | page.attach(w, 0, rows, 3, 1); | ||
359 | 406 | w.hide(); | ||
360 | 407 | ++rows; | ||
361 | 408 | |||
362 | 409 | w = new Gtk.Entry(); | ||
363 | 410 | w.set("visibility", false, | ||
364 | 411 | "hexpand", true, | ||
365 | 412 | "activates-default", true); | ||
366 | 413 | ((Gtk.Entry)w).changed.connect((entry) => {check_nag_validity();}); | ||
367 | 414 | label = new Gtk.Label(_("E_ncryption password")); | ||
368 | 415 | label.set("mnemonic-widget", w, | ||
369 | 416 | "use-underline", true, | ||
370 | 417 | "xalign", 1.0f); | ||
371 | 418 | page.attach(label, 1, rows, 1, 1); | ||
372 | 419 | page.attach(w, 2, rows, 1, 1); | ||
373 | 420 | nag_entry = w as Gtk.Entry; | ||
374 | 421 | ++rows; | ||
375 | 422 | |||
376 | 423 | w = new Gtk.CheckButton.with_mnemonic(_("_Show password")); | ||
377 | 424 | ((Gtk.CheckButton)w).toggled.connect((button) => { | ||
378 | 425 | nag_entry.visibility = button.get_active(); | ||
379 | 426 | }); | ||
380 | 427 | page.attach(w, 2, rows, 1, 1); | ||
381 | 428 | ++rows; | ||
382 | 429 | |||
383 | 430 | w = new Gtk.CheckButton.with_mnemonic(_("Test every two _months")); | ||
384 | 431 | page.attach(w, 0, rows, 3, 1); | ||
385 | 432 | w.hide(); | ||
386 | 433 | ((Gtk.CheckButton)w).active = true; | ||
387 | 434 | w.vexpand = true; | ||
388 | 435 | w.valign = Gtk.Align.END; | ||
389 | 436 | ((Gtk.CheckButton)w).toggled.connect((button) => { | ||
390 | 437 | DejaDup.update_nag_time(!button.get_active()); | ||
391 | 438 | }); | ||
392 | 439 | ++rows; | ||
393 | 440 | |||
394 | 441 | return page; | ||
395 | 442 | } | ||
396 | 443 | |||
397 | 387 | protected Gtk.Widget make_question_page() | 444 | protected Gtk.Widget make_question_page() |
398 | 388 | { | 445 | { |
399 | 389 | int rows = 0; | 446 | int rows = 0; |
400 | @@ -462,6 +519,14 @@ | |||
401 | 462 | password_page = page; | 519 | password_page = page; |
402 | 463 | } | 520 | } |
403 | 464 | 521 | ||
404 | 522 | void add_nag_page() | ||
405 | 523 | { | ||
406 | 524 | var page = make_nag_page(); | ||
407 | 525 | append_page(page, Type.CHECK); | ||
408 | 526 | set_page_title(page, _("Restore Test")); | ||
409 | 527 | nag_page = page; | ||
410 | 528 | } | ||
411 | 529 | |||
412 | 465 | void add_question_page() | 530 | void add_question_page() |
413 | 466 | { | 531 | { |
414 | 467 | var page = make_question_page(); | 532 | var page = make_question_page(); |
415 | @@ -588,7 +653,7 @@ | |||
416 | 588 | else if (op == null) | 653 | else if (op == null) |
417 | 589 | do_apply.begin(); | 654 | do_apply.begin(); |
418 | 590 | } | 655 | } |
420 | 591 | else if (page == password_page) | 656 | else if (page == password_page || page == nag_page) |
421 | 592 | set_header_icon(Gtk.Stock.DIALOG_AUTHENTICATION); | 657 | set_header_icon(Gtk.Stock.DIALOG_AUTHENTICATION); |
422 | 593 | } | 658 | } |
423 | 594 | 659 | ||
424 | @@ -677,8 +742,8 @@ | |||
425 | 677 | 742 | ||
426 | 678 | protected void get_passphrase() | 743 | protected void get_passphrase() |
427 | 679 | { | 744 | { |
430 | 680 | // DEJA_DUP_TESTING only set when we are in test suite | 745 | if (!searched_for_passphrase && !DejaDup.in_testing_mode() && |
431 | 681 | if (!searched_for_passphrase && !DejaDup.in_testing_mode()) { | 746 | op.use_cached_password) { |
432 | 682 | // First, try user's keyring | 747 | // First, try user's keyring |
433 | 683 | GnomeKeyring.find_password(PASSPHRASE_SCHEMA, | 748 | GnomeKeyring.find_password(PASSPHRASE_SCHEMA, |
434 | 684 | found_passphrase, | 749 | found_passphrase, |
435 | @@ -730,14 +795,31 @@ | |||
436 | 730 | set_page_title(password_page, _("Require Password?")); | 795 | set_page_title(password_page, _("Require Password?")); |
437 | 731 | else | 796 | else |
438 | 732 | set_page_title(password_page, _("Encryption Password Needed")); | 797 | set_page_title(password_page, _("Encryption Password Needed")); |
440 | 733 | foreach (Gtk.Widget w in first_password_widgets) { | 798 | |
441 | 799 | foreach (Gtk.Widget w in first_password_widgets) | ||
442 | 734 | w.visible = first; | 800 | w.visible = first; |
444 | 735 | } | 801 | |
445 | 736 | check_password_validity(); | 802 | check_password_validity(); |
446 | 737 | encrypt_entry.select_region(0, -1); | 803 | encrypt_entry.select_region(0, -1); |
447 | 738 | encrypt_entry.grab_focus(); | 804 | encrypt_entry.grab_focus(); |
448 | 739 | } | 805 | } |
449 | 740 | 806 | ||
450 | 807 | void check_nag_validity() | ||
451 | 808 | { | ||
452 | 809 | var passphrase = nag_entry.get_text(); | ||
453 | 810 | if (passphrase == "") | ||
454 | 811 | allow_forward(false); | ||
455 | 812 | else | ||
456 | 813 | allow_forward(true); | ||
457 | 814 | } | ||
458 | 815 | |||
459 | 816 | void configure_nag_page() | ||
460 | 817 | { | ||
461 | 818 | check_nag_validity(); | ||
462 | 819 | nag_entry.set_text(""); | ||
463 | 820 | nag_entry.grab_focus(); | ||
464 | 821 | } | ||
465 | 822 | |||
466 | 741 | void stop_password_loop(Assistant dlg, int resp) | 823 | void stop_password_loop(Assistant dlg, int resp) |
467 | 742 | { | 824 | { |
468 | 743 | Idle.add(() => { | 825 | Idle.add(() => { |
469 | @@ -751,8 +833,15 @@ | |||
470 | 751 | protected void ask_passphrase(bool first = false) | 833 | protected void ask_passphrase(bool first = false) |
471 | 752 | { | 834 | { |
472 | 753 | op.needs_password = true; | 835 | op.needs_password = true; |
475 | 754 | interrupt(password_page); | 836 | if (op.use_cached_password) { |
476 | 755 | configure_password_page(first); | 837 | interrupt(password_page); |
477 | 838 | configure_password_page(first); | ||
478 | 839 | } | ||
479 | 840 | else { | ||
480 | 841 | interrupt(nag_page); | ||
481 | 842 | configure_nag_page(); | ||
482 | 843 | nagged = true; | ||
483 | 844 | } | ||
484 | 756 | force_visible(false); | 845 | force_visible(false); |
485 | 757 | // pause until we can provide password by entering new main loop | 846 | // pause until we can provide password by entering new main loop |
486 | 758 | password_ask_loop = new MainLoop(null); | 847 | password_ask_loop = new MainLoop(null); |
487 | @@ -764,22 +853,29 @@ | |||
488 | 764 | { | 853 | { |
489 | 765 | var passphrase = ""; | 854 | var passphrase = ""; |
490 | 766 | 855 | ||
493 | 767 | if (encrypt_enabled.active) { | 856 | if (op.use_cached_password) { |
494 | 768 | passphrase = encrypt_entry.get_text().strip(); | 857 | if (encrypt_enabled.active) { |
495 | 858 | passphrase = encrypt_entry.get_text().strip(); | ||
496 | 859 | if (passphrase == "") // all whitespace password? allow it... | ||
497 | 860 | passphrase = encrypt_entry.get_text(); | ||
498 | 861 | } | ||
499 | 862 | |||
500 | 863 | if (passphrase != "") { | ||
501 | 864 | // Save it | ||
502 | 865 | if (encrypt_remember.active) { | ||
503 | 866 | GnomeKeyring.store_password(PASSPHRASE_SCHEMA, | ||
504 | 867 | GnomeKeyring.DEFAULT, | ||
505 | 868 | _("Backup encryption password"), | ||
506 | 869 | passphrase, save_password_callback, | ||
507 | 870 | "owner", Config.PACKAGE, | ||
508 | 871 | "type", "passphrase"); | ||
509 | 872 | } | ||
510 | 873 | } | ||
511 | 874 | } | ||
512 | 875 | else { | ||
513 | 876 | passphrase = nag_entry.get_text().strip(); | ||
514 | 769 | if (passphrase == "") // all whitespace password? allow it... | 877 | if (passphrase == "") // all whitespace password? allow it... |
528 | 770 | passphrase = encrypt_entry.get_text(); | 878 | passphrase = nag_entry.get_text(); |
516 | 771 | } | ||
517 | 772 | |||
518 | 773 | if (passphrase != "") { | ||
519 | 774 | // Save it | ||
520 | 775 | if (encrypt_remember.active) { | ||
521 | 776 | GnomeKeyring.store_password(PASSPHRASE_SCHEMA, | ||
522 | 777 | GnomeKeyring.DEFAULT, | ||
523 | 778 | _("Backup encryption password"), | ||
524 | 779 | passphrase, save_password_callback, | ||
525 | 780 | "owner", Config.PACKAGE, | ||
526 | 781 | "type", "passphrase"); | ||
527 | 782 | } | ||
529 | 783 | } | 879 | } |
530 | 784 | 880 | ||
531 | 785 | op.set_passphrase(passphrase); | 881 | op.set_passphrase(passphrase); |
532 | 786 | 882 | ||
533 | === modified file 'po/deja-dup.pot' | |||
534 | --- po/deja-dup.pot 2012-07-20 23:42:14 +0000 | |||
535 | +++ po/deja-dup.pot 2012-08-21 01:36:28 +0000 | |||
536 | @@ -8,7 +8,7 @@ | |||
537 | 8 | msgstr "" | 8 | msgstr "" |
538 | 9 | "Project-Id-Version: PACKAGE VERSION\n" | 9 | "Project-Id-Version: PACKAGE VERSION\n" |
539 | 10 | "Report-Msgid-Bugs-To: mike@mterry.name\n" | 10 | "Report-Msgid-Bugs-To: mike@mterry.name\n" |
541 | 11 | "POT-Creation-Date: 2012-07-20 19:31-0400\n" | 11 | "POT-Creation-Date: 2012-08-20 21:34-0400\n" |
542 | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
543 | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
544 | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" |
545 | @@ -33,7 +33,7 @@ | |||
546 | 33 | #. context is itself a reference to both the underlying command line tool | 33 | #. context is itself a reference to both the underlying command line tool |
547 | 34 | #. "duplicity" and the act of duplicating data for backup. As a whole, the | 34 | #. "duplicity" and the act of duplicating data for backup. As a whole, the |
548 | 35 | #. phrase "Déjà Dup" may not be very translatable. | 35 | #. phrase "Déjà Dup" may not be very translatable. |
550 | 36 | #: ../data/deja-dup.desktop.in.h:2 ../common/CommonUtils.vala:89 | 36 | #: ../data/deja-dup.desktop.in.h:2 ../common/CommonUtils.vala:90 |
551 | 37 | #: ../deja-dup/main.vala:78 ../preferences/Preferences.vala:88 | 37 | #: ../deja-dup/main.vala:78 ../preferences/Preferences.vala:88 |
552 | 38 | #, c-format | 38 | #, c-format |
553 | 39 | msgid "Déjà Dup Backup Tool" | 39 | msgid "Déjà Dup Backup Tool" |
554 | @@ -154,7 +154,7 @@ | |||
555 | 154 | 154 | ||
556 | 155 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:18 | 155 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:18 |
557 | 156 | msgid "" | 156 | msgid "" |
559 | 157 | "The first time Déjà Dup checked whether it should prompt about backing up" | 157 | "The last time Déjà Dup checked whether it should prompt about backing up" |
560 | 158 | msgstr "" | 158 | msgstr "" |
561 | 159 | 159 | ||
562 | 160 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:19 | 160 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:19 |
563 | @@ -166,161 +166,173 @@ | |||
564 | 166 | msgstr "" | 166 | msgstr "" |
565 | 167 | 167 | ||
566 | 168 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:20 | 168 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:20 |
567 | 169 | msgid "" | ||
568 | 170 | "The last time Déjà Dup checked whether it should prompt about your password" | ||
569 | 171 | msgstr "" | ||
570 | 172 | |||
571 | 173 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:21 | ||
572 | 174 | msgid "" | ||
573 | 175 | "In order to prevent you from forgetting your passwords, Déjà Dup will " | ||
574 | 176 | "occasionally notify you to confirm the password. This time should be either " | ||
575 | 177 | "‘disabled’ to turn off this check or in ISO 8601 format." | ||
576 | 178 | msgstr "" | ||
577 | 179 | |||
578 | 180 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:22 | ||
579 | 169 | msgid "How long to keep backup files" | 181 | msgid "How long to keep backup files" |
580 | 170 | msgstr "" | 182 | msgstr "" |
581 | 171 | 183 | ||
583 | 172 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:21 | 184 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:23 |
584 | 173 | msgid "" | 185 | msgid "" |
585 | 174 | "The number of days to keep backup files on the backup location. A value of 0 " | 186 | "The number of days to keep backup files on the backup location. A value of 0 " |
586 | 175 | "means forever. This is a minimum number of days; the files may be kept " | 187 | "means forever. This is a minimum number of days; the files may be kept " |
587 | 176 | "longer." | 188 | "longer." |
588 | 177 | msgstr "" | 189 | msgstr "" |
589 | 178 | 190 | ||
591 | 179 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:22 | 191 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:24 |
592 | 180 | msgid "How long to wait between full backups" | 192 | msgid "How long to wait between full backups" |
593 | 181 | msgstr "" | 193 | msgstr "" |
594 | 182 | 194 | ||
596 | 183 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:23 | 195 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:25 |
597 | 184 | msgid "" | 196 | msgid "" |
598 | 185 | "Déjà Dup needs to occasionally make fresh full backups. This is the number " | 197 | "Déjà Dup needs to occasionally make fresh full backups. This is the number " |
599 | 186 | "of days to wait between full backups." | 198 | "of days to wait between full backups." |
600 | 187 | msgstr "" | 199 | msgstr "" |
601 | 188 | 200 | ||
603 | 189 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:24 | 201 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:26 |
604 | 190 | msgid "Type of location to store backup" | 202 | msgid "Type of location to store backup" |
605 | 191 | msgstr "" | 203 | msgstr "" |
606 | 192 | 204 | ||
608 | 193 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:25 | 205 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:27 |
609 | 194 | msgid "" | 206 | msgid "" |
610 | 195 | "The type of backup location. If ‘auto’, a default will be chosen based on " | 207 | "The type of backup location. If ‘auto’, a default will be chosen based on " |
611 | 196 | "what is available." | 208 | "what is available." |
612 | 197 | msgstr "" | 209 | msgstr "" |
613 | 198 | 210 | ||
615 | 199 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:26 | 211 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:28 |
616 | 200 | msgid "Amazon S3 Access Key ID" | 212 | msgid "Amazon S3 Access Key ID" |
617 | 201 | msgstr "" | 213 | msgstr "" |
618 | 202 | 214 | ||
620 | 203 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:27 | 215 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:29 |
621 | 204 | msgid "Your Amazon S3 Access Key Identifier. This acts as your S3 username." | 216 | msgid "Your Amazon S3 Access Key Identifier. This acts as your S3 username." |
622 | 205 | msgstr "" | 217 | msgstr "" |
623 | 206 | 218 | ||
625 | 207 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:28 | 219 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:30 |
626 | 208 | msgid "The Amazon S3 bucket name to use" | 220 | msgid "The Amazon S3 bucket name to use" |
627 | 209 | msgstr "" | 221 | msgstr "" |
628 | 210 | 222 | ||
630 | 211 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:29 | 223 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:31 |
631 | 212 | msgid "" | 224 | msgid "" |
632 | 213 | "Which Amazon S3 bucket to store files in. This does not need to exist " | 225 | "Which Amazon S3 bucket to store files in. This does not need to exist " |
633 | 214 | "already. Only legal hostname strings are valid." | 226 | "already. Only legal hostname strings are valid." |
634 | 215 | msgstr "" | 227 | msgstr "" |
635 | 216 | 228 | ||
636 | 217 | #. Left this way for historical reasons, should be '$HOSTNAME'. See convert_s3_folder_to_hostname() | 229 | #. Left this way for historical reasons, should be '$HOSTNAME'. See convert_s3_folder_to_hostname() |
638 | 218 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:31 | 230 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:33 |
639 | 219 | msgid "The Amazon S3 folder" | 231 | msgid "The Amazon S3 folder" |
640 | 220 | msgstr "" | 232 | msgstr "" |
641 | 221 | 233 | ||
643 | 222 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:32 | 234 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:34 |
644 | 223 | msgid "" | 235 | msgid "" |
645 | 224 | "An optional folder name to store files in. This folder will be created in " | 236 | "An optional folder name to store files in. This folder will be created in " |
646 | 225 | "the chosen bucket." | 237 | "the chosen bucket." |
647 | 226 | msgstr "" | 238 | msgstr "" |
648 | 227 | 239 | ||
650 | 228 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:33 | 240 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:35 |
651 | 229 | msgid "The Rackspace Cloud Files container" | 241 | msgid "The Rackspace Cloud Files container" |
652 | 230 | msgstr "" | 242 | msgstr "" |
653 | 231 | 243 | ||
655 | 232 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:34 | 244 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:36 |
656 | 233 | msgid "" | 245 | msgid "" |
657 | 234 | "Which Rackspace Cloud Files container to store files in. This does not need " | 246 | "Which Rackspace Cloud Files container to store files in. This does not need " |
658 | 235 | "to exist already. Only legal hostname strings are valid." | 247 | "to exist already. Only legal hostname strings are valid." |
659 | 236 | msgstr "" | 248 | msgstr "" |
660 | 237 | 249 | ||
662 | 238 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:35 | 250 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:37 |
663 | 239 | msgid "Your Rackspace username" | 251 | msgid "Your Rackspace username" |
664 | 240 | msgstr "" | 252 | msgstr "" |
665 | 241 | 253 | ||
667 | 242 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:36 | 254 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:38 |
668 | 243 | msgid "This is your username for the Rackspace Cloud Files service." | 255 | msgid "This is your username for the Rackspace Cloud Files service." |
669 | 244 | msgstr "" | 256 | msgstr "" |
670 | 245 | 257 | ||
672 | 246 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:37 | 258 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:39 |
673 | 247 | msgid "The Ubuntu One folder" | 259 | msgid "The Ubuntu One folder" |
674 | 248 | msgstr "" | 260 | msgstr "" |
675 | 249 | 261 | ||
677 | 250 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:38 | 262 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:40 |
678 | 251 | msgid "" | 263 | msgid "" |
679 | 252 | "The folder name to store files in. If ‘$HOSTNAME’, it will default to a " | 264 | "The folder name to store files in. If ‘$HOSTNAME’, it will default to a " |
680 | 253 | "folder based on the name of the computer." | 265 | "folder based on the name of the computer." |
681 | 254 | msgstr "" | 266 | msgstr "" |
682 | 255 | 267 | ||
684 | 256 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:39 | 268 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:41 |
685 | 257 | #: ../deja-dup/AssistantRestore.vala:221 ../preferences/Preferences.vala:151 | 269 | #: ../deja-dup/AssistantRestore.vala:221 ../preferences/Preferences.vala:151 |
686 | 258 | msgid "Backup location" | 270 | msgid "Backup location" |
687 | 259 | msgstr "" | 271 | msgstr "" |
688 | 260 | 272 | ||
690 | 261 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:40 | 273 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:42 |
691 | 262 | msgid "Location in which to hold the backup files." | 274 | msgid "Location in which to hold the backup files." |
692 | 263 | msgstr "" | 275 | msgstr "" |
693 | 264 | 276 | ||
695 | 265 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:41 | 277 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:43 |
696 | 266 | msgid "Folder type" | 278 | msgid "Folder type" |
697 | 267 | msgstr "" | 279 | msgstr "" |
698 | 268 | 280 | ||
700 | 269 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:42 | 281 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:44 |
701 | 270 | msgid "" | 282 | msgid "" |
702 | 271 | "Whether the backup location is a mounted external volume or a normal folder." | 283 | "Whether the backup location is a mounted external volume or a normal folder." |
703 | 272 | msgstr "" | 284 | msgstr "" |
704 | 273 | 285 | ||
706 | 274 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:43 | 286 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:45 |
707 | 275 | msgid "Relative path under the external volume" | 287 | msgid "Relative path under the external volume" |
708 | 276 | msgstr "" | 288 | msgstr "" |
709 | 277 | 289 | ||
711 | 278 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:44 | 290 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:46 |
712 | 279 | msgid "" | 291 | msgid "" |
713 | 280 | "If the backup location is on an external volume, this is the path of the " | 292 | "If the backup location is on an external volume, this is the path of the " |
714 | 281 | "folder on that volume." | 293 | "folder on that volume." |
715 | 282 | msgstr "" | 294 | msgstr "" |
716 | 283 | 295 | ||
718 | 284 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:45 | 296 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:47 |
719 | 285 | msgid "Unique ID of the external volume" | 297 | msgid "Unique ID of the external volume" |
720 | 286 | msgstr "" | 298 | msgstr "" |
721 | 287 | 299 | ||
723 | 288 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:46 | 300 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:48 |
724 | 289 | msgid "" | 301 | msgid "" |
725 | 290 | "If the backup location is on an external volume, this is its unique " | 302 | "If the backup location is on an external volume, this is its unique " |
726 | 291 | "filesystem identifier." | 303 | "filesystem identifier." |
727 | 292 | msgstr "" | 304 | msgstr "" |
728 | 293 | 305 | ||
730 | 294 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:47 | 306 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:49 |
731 | 295 | msgid "Full name of the external volume" | 307 | msgid "Full name of the external volume" |
732 | 296 | msgstr "" | 308 | msgstr "" |
733 | 297 | 309 | ||
735 | 298 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:48 | 310 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:50 |
736 | 299 | msgid "" | 311 | msgid "" |
737 | 300 | "If the backup location is on an external volume, this is the volume’s longer " | 312 | "If the backup location is on an external volume, this is the volume’s longer " |
738 | 301 | "descriptive name." | 313 | "descriptive name." |
739 | 302 | msgstr "" | 314 | msgstr "" |
740 | 303 | 315 | ||
742 | 304 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:49 | 316 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:51 |
743 | 305 | msgid "Short name of the external volume" | 317 | msgid "Short name of the external volume" |
744 | 306 | msgstr "" | 318 | msgstr "" |
745 | 307 | 319 | ||
747 | 308 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:50 | 320 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:52 |
748 | 309 | msgid "" | 321 | msgid "" |
749 | 310 | "If the backup location is on an external volume, this is the volume’s " | 322 | "If the backup location is on an external volume, this is the volume’s " |
750 | 311 | "shorter name." | 323 | "shorter name." |
751 | 312 | msgstr "" | 324 | msgstr "" |
752 | 313 | 325 | ||
754 | 314 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:51 | 326 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:53 |
755 | 315 | msgid "Icon of the external volume" | 327 | msgid "Icon of the external volume" |
756 | 316 | msgstr "" | 328 | msgstr "" |
757 | 317 | 329 | ||
759 | 318 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:52 | 330 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:54 |
760 | 319 | msgid "" | 331 | msgid "" |
761 | 320 | "If the backup location is on an external volume, this is the volume’s icon." | 332 | "If the backup location is on an external volume, this is the volume’s icon." |
762 | 321 | msgstr "" | 333 | msgstr "" |
763 | 322 | 334 | ||
765 | 323 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:53 | 335 | #: ../data/org.gnome.DejaDup.gschema.xml.in.h:55 |
766 | 324 | msgid "Obsolete" | 336 | msgid "Obsolete" |
767 | 325 | msgstr "" | 337 | msgstr "" |
768 | 326 | 338 | ||
769 | @@ -328,7 +340,7 @@ | |||
770 | 328 | msgid "Folder" | 340 | msgid "Folder" |
771 | 329 | msgstr "" | 341 | msgstr "" |
772 | 330 | 342 | ||
774 | 331 | #: ../data/ui/restore-missing.ui.h:2 ../deja-dup/AssistantOperation.vala:175 | 343 | #: ../data/ui/restore-missing.ui.h:2 ../deja-dup/AssistantOperation.vala:179 |
775 | 332 | msgid "Scanning…" | 344 | msgid "Scanning…" |
776 | 333 | msgstr "" | 345 | msgstr "" |
777 | 334 | 346 | ||
778 | @@ -354,7 +366,7 @@ | |||
779 | 354 | 366 | ||
780 | 355 | #. Translators: %2$s is the name of a removable drive, %1$s is a folder | 367 | #. Translators: %2$s is the name of a removable drive, %1$s is a folder |
781 | 356 | #. on that removable drive. | 368 | #. on that removable drive. |
783 | 357 | #: ../common/BackendFile.vala:135 ../common/CommonUtils.vala:434 | 369 | #: ../common/BackendFile.vala:135 ../common/CommonUtils.vala:481 |
784 | 358 | #, c-format | 370 | #, c-format |
785 | 359 | msgid "%1$s on %2$s" | 371 | msgid "%1$s on %2$s" |
786 | 360 | msgstr "" | 372 | msgstr "" |
787 | @@ -454,86 +466,96 @@ | |||
788 | 454 | msgid "_Remember secret access key" | 466 | msgid "_Remember secret access key" |
789 | 455 | msgstr "" | 467 | msgstr "" |
790 | 456 | 468 | ||
792 | 457 | #: ../common/BackendU1.vala:166 ../widgets/ConfigLocation.vala:186 | 469 | #: ../common/BackendU1.vala:170 ../widgets/ConfigLocation.vala:186 |
793 | 458 | msgid "Ubuntu One" | 470 | msgid "Ubuntu One" |
794 | 459 | msgstr "" | 471 | msgstr "" |
795 | 460 | 472 | ||
796 | 461 | #. Translators: %s is a folder. | 473 | #. Translators: %s is a folder. |
798 | 462 | #: ../common/BackendU1.vala:169 | 474 | #: ../common/BackendU1.vala:173 |
799 | 463 | #, c-format | 475 | #, c-format |
800 | 464 | msgid "%s on Ubuntu One" | 476 | msgid "%s on Ubuntu One" |
801 | 465 | msgstr "" | 477 | msgstr "" |
802 | 466 | 478 | ||
804 | 467 | #: ../common/BackendU1.vala:236 | 479 | #: ../common/BackendU1.vala:240 |
805 | 468 | msgid "Connect to Ubuntu One" | 480 | msgid "Connect to Ubuntu One" |
806 | 469 | msgstr "" | 481 | msgstr "" |
807 | 470 | 482 | ||
809 | 471 | #: ../common/BackendU1.vala:237 | 483 | #: ../common/BackendU1.vala:241 |
810 | 472 | msgid "Sign into Ubuntu One…" | 484 | msgid "Sign into Ubuntu One…" |
811 | 473 | msgstr "" | 485 | msgstr "" |
812 | 474 | 486 | ||
814 | 475 | #: ../common/CommonUtils.vala:354 | 487 | #: ../common/CommonUtils.vala:401 |
815 | 476 | #, c-format | 488 | #, c-format |
816 | 477 | msgid "Could not find backup tool in %s. Your installation is incomplete." | 489 | msgid "Could not find backup tool in %s. Your installation is incomplete." |
817 | 478 | msgstr "" | 490 | msgstr "" |
818 | 479 | 491 | ||
820 | 480 | #: ../common/CommonUtils.vala:356 | 492 | #: ../common/CommonUtils.vala:403 |
821 | 481 | msgid "Could not load backup tool. Your installation is incomplete." | 493 | msgid "Could not load backup tool. Your installation is incomplete." |
822 | 482 | msgstr "" | 494 | msgstr "" |
823 | 483 | 495 | ||
825 | 484 | #: ../common/CommonUtils.vala:362 | 496 | #: ../common/CommonUtils.vala:409 |
826 | 485 | msgid "Backup tool is broken. Your installation is incomplete." | 497 | msgid "Backup tool is broken. Your installation is incomplete." |
827 | 486 | msgstr "" | 498 | msgstr "" |
828 | 487 | 499 | ||
830 | 488 | #: ../common/CommonUtils.vala:384 | 500 | #: ../common/CommonUtils.vala:431 |
831 | 489 | msgid "Could not start backup tool" | 501 | msgid "Could not start backup tool" |
832 | 490 | msgstr "" | 502 | msgstr "" |
833 | 491 | 503 | ||
834 | 492 | #. Translators: this is the home folder and %s is the user's username | 504 | #. Translators: this is the home folder and %s is the user's username |
836 | 493 | #: ../common/CommonUtils.vala:485 | 505 | #: ../common/CommonUtils.vala:532 |
837 | 494 | #, c-format | 506 | #, c-format |
838 | 495 | msgid "Home (%s)" | 507 | msgid "Home (%s)" |
839 | 496 | msgstr "" | 508 | msgstr "" |
840 | 497 | 509 | ||
841 | 498 | #. Translators: this is the home folder | 510 | #. Translators: this is the home folder |
843 | 499 | #: ../common/CommonUtils.vala:490 | 511 | #: ../common/CommonUtils.vala:537 |
844 | 500 | msgid "Home" | 512 | msgid "Home" |
845 | 501 | msgstr "" | 513 | msgstr "" |
846 | 502 | 514 | ||
847 | 503 | #. Translators: this is the trash folder | 515 | #. Translators: this is the trash folder |
849 | 504 | #: ../common/CommonUtils.vala:495 | 516 | #: ../common/CommonUtils.vala:542 |
850 | 505 | msgid "Trash" | 517 | msgid "Trash" |
851 | 506 | msgstr "" | 518 | msgstr "" |
852 | 507 | 519 | ||
853 | 520 | #: ../common/OperationBackup.vala:42 ../common/OperationVerify.vala:56 | ||
854 | 521 | msgid "Verifying backup…" | ||
855 | 522 | msgstr "" | ||
856 | 523 | |||
857 | 508 | #: ../common/OperationRestore.vala:51 | 524 | #: ../common/OperationRestore.vala:51 |
858 | 509 | msgid "Restoring files…" | 525 | msgid "Restoring files…" |
859 | 510 | msgstr "" | 526 | msgstr "" |
860 | 511 | 527 | ||
862 | 512 | #: ../common/Operation.vala:60 | 528 | #: ../common/OperationVerify.vala:94 |
863 | 529 | msgid "" | ||
864 | 530 | "Your backup appears to be corrupted. You should delete the backup and try " | ||
865 | 531 | "again." | ||
866 | 532 | msgstr "" | ||
867 | 533 | |||
868 | 534 | #: ../common/Operation.vala:61 | ||
869 | 513 | msgid "Backing up…" | 535 | msgid "Backing up…" |
870 | 514 | msgstr "" | 536 | msgstr "" |
871 | 515 | 537 | ||
873 | 516 | #: ../common/Operation.vala:62 ../deja-dup/AssistantRestore.vala:484 | 538 | #: ../common/Operation.vala:63 ../deja-dup/AssistantRestore.vala:484 |
874 | 517 | msgid "Restoring…" | 539 | msgid "Restoring…" |
875 | 518 | msgstr "" | 540 | msgstr "" |
876 | 519 | 541 | ||
878 | 520 | #: ../common/Operation.vala:64 | 542 | #: ../common/Operation.vala:65 |
879 | 521 | msgid "Checking for backups…" | 543 | msgid "Checking for backups…" |
880 | 522 | msgstr "" | 544 | msgstr "" |
881 | 523 | 545 | ||
883 | 524 | #: ../common/Operation.vala:66 | 546 | #: ../common/Operation.vala:67 |
884 | 525 | msgid "Listing files…" | 547 | msgid "Listing files…" |
885 | 526 | msgstr "" | 548 | msgstr "" |
886 | 527 | 549 | ||
892 | 528 | #: ../common/Operation.vala:68 ../common/Operation.vala:100 | 550 | #: ../common/Operation.vala:69 ../common/Operation.vala:103 |
893 | 529 | #: ../tools/duplicity/DuplicityJob.vala:386 | 551 | #: ../tools/duplicity/DuplicityJob.vala:400 |
894 | 530 | #: ../tools/duplicity/DuplicityJob.vala:393 | 552 | #: ../tools/duplicity/DuplicityJob.vala:407 |
895 | 531 | #: ../tools/duplicity/DuplicityJob.vala:412 | 553 | #: ../tools/duplicity/DuplicityJob.vala:426 |
896 | 532 | #: ../tools/duplicity/DuplicityJob.vala:417 | 554 | #: ../tools/duplicity/DuplicityJob.vala:431 |
897 | 533 | msgid "Preparing…" | 555 | msgid "Preparing…" |
898 | 534 | msgstr "" | 556 | msgstr "" |
899 | 535 | 557 | ||
901 | 536 | #: ../common/Operation.vala:237 | 558 | #: ../common/Operation.vala:295 |
902 | 537 | msgid "Another backup operation is already running" | 559 | msgid "Another backup operation is already running" |
903 | 538 | msgstr "" | 560 | msgstr "" |
904 | 539 | 561 | ||
905 | @@ -571,69 +593,90 @@ | |||
906 | 571 | msgid "Backup Finished" | 593 | msgid "Backup Finished" |
907 | 572 | msgstr "" | 594 | msgstr "" |
908 | 573 | 595 | ||
910 | 574 | #: ../deja-dup/AssistantBackup.vala:100 | 596 | #: ../deja-dup/AssistantBackup.vala:96 |
911 | 597 | msgid "Your files were successfully backed up and tested." | ||
912 | 598 | msgstr "" | ||
913 | 599 | |||
914 | 600 | #: ../deja-dup/AssistantBackup.vala:103 | ||
915 | 575 | msgid "Backing Up…" | 601 | msgid "Backing Up…" |
916 | 576 | msgstr "" | 602 | msgstr "" |
917 | 577 | 603 | ||
919 | 578 | #: ../deja-dup/AssistantOperation.vala:174 | 604 | #: ../deja-dup/AssistantOperation.vala:178 |
920 | 579 | msgid "Scanning:" | 605 | msgid "Scanning:" |
921 | 580 | msgstr "" | 606 | msgstr "" |
922 | 581 | 607 | ||
924 | 582 | #: ../deja-dup/AssistantOperation.vala:256 | 608 | #: ../deja-dup/AssistantOperation.vala:260 |
925 | 583 | msgid "_Details" | 609 | msgid "_Details" |
926 | 584 | msgstr "" | 610 | msgstr "" |
927 | 585 | 611 | ||
929 | 586 | #: ../deja-dup/AssistantOperation.vala:304 | 612 | #: ../deja-dup/AssistantOperation.vala:308 |
930 | 587 | msgid "_Allow restoring without a password" | 613 | msgid "_Allow restoring without a password" |
931 | 588 | msgstr "" | 614 | msgstr "" |
932 | 589 | 615 | ||
934 | 590 | #: ../deja-dup/AssistantOperation.vala:310 | 616 | #: ../deja-dup/AssistantOperation.vala:314 |
935 | 591 | msgid "_Password-protect your backup" | 617 | msgid "_Password-protect your backup" |
936 | 592 | msgstr "" | 618 | msgstr "" |
937 | 593 | 619 | ||
939 | 594 | #: ../deja-dup/AssistantOperation.vala:324 | 620 | #: ../deja-dup/AssistantOperation.vala:328 |
940 | 595 | #, c-format | 621 | #, c-format |
941 | 596 | msgid "" | 622 | msgid "" |
942 | 597 | "You will need your password to restore your files. You might want to write " | 623 | "You will need your password to restore your files. You might want to write " |
943 | 598 | "it down." | 624 | "it down." |
944 | 599 | msgstr "" | 625 | msgstr "" |
945 | 600 | 626 | ||
947 | 601 | #: ../deja-dup/AssistantOperation.vala:339 | 627 | #: ../deja-dup/AssistantOperation.vala:343 |
948 | 628 | #: ../deja-dup/AssistantOperation.vala:414 | ||
949 | 602 | msgid "E_ncryption password" | 629 | msgid "E_ncryption password" |
950 | 603 | msgstr "" | 630 | msgstr "" |
951 | 604 | 631 | ||
953 | 605 | #: ../deja-dup/AssistantOperation.vala:356 | 632 | #: ../deja-dup/AssistantOperation.vala:360 |
954 | 606 | msgid "Confir_m password" | 633 | msgid "Confir_m password" |
955 | 607 | msgstr "" | 634 | msgstr "" |
956 | 608 | 635 | ||
958 | 609 | #: ../deja-dup/AssistantOperation.vala:369 | 636 | #: ../deja-dup/AssistantOperation.vala:373 |
959 | 637 | #: ../deja-dup/AssistantOperation.vala:423 | ||
960 | 610 | msgid "_Show password" | 638 | msgid "_Show password" |
961 | 611 | msgstr "" | 639 | msgstr "" |
962 | 612 | 640 | ||
964 | 613 | #: ../deja-dup/AssistantOperation.vala:378 | 641 | #: ../deja-dup/AssistantOperation.vala:382 |
965 | 614 | #: ../deja-dup/MountOperationAssistant.vala:40 | 642 | #: ../deja-dup/MountOperationAssistant.vala:40 |
966 | 615 | msgid "_Remember password" | 643 | msgid "_Remember password" |
967 | 616 | msgstr "" | 644 | msgstr "" |
968 | 617 | 645 | ||
970 | 618 | #: ../deja-dup/AssistantOperation.vala:447 | 646 | #: ../deja-dup/AssistantOperation.vala:401 |
971 | 647 | msgid "" | ||
972 | 648 | "In order to check that you will be able to retrieve your files in the case " | ||
973 | 649 | "of an emergency, please enter your encryption password again to perform a " | ||
974 | 650 | "brief restore test." | ||
975 | 651 | msgstr "" | ||
976 | 652 | |||
977 | 653 | #: ../deja-dup/AssistantOperation.vala:430 | ||
978 | 654 | msgid "Test every two _months" | ||
979 | 655 | msgstr "" | ||
980 | 656 | |||
981 | 657 | #: ../deja-dup/AssistantOperation.vala:504 | ||
982 | 619 | msgid "Summary" | 658 | msgid "Summary" |
983 | 620 | msgstr "" | 659 | msgstr "" |
984 | 621 | 660 | ||
988 | 622 | #: ../deja-dup/AssistantOperation.vala:537 | 661 | #: ../deja-dup/AssistantOperation.vala:526 |
989 | 623 | #: ../tools/duplicity/DuplicityJob.vala:694 | 662 | msgid "Restore Test" |
990 | 624 | #: ../tools/duplicity/DuplicityJob.vala:1076 | 663 | msgstr "" |
991 | 664 | |||
992 | 665 | #: ../deja-dup/AssistantOperation.vala:602 | ||
993 | 666 | #: ../tools/duplicity/DuplicityJob.vala:710 | ||
994 | 667 | #: ../tools/duplicity/DuplicityJob.vala:1092 | ||
995 | 625 | msgid "Failed with an unknown error." | 668 | msgid "Failed with an unknown error." |
996 | 626 | msgstr "" | 669 | msgstr "" |
997 | 627 | 670 | ||
999 | 628 | #: ../deja-dup/AssistantOperation.vala:730 | 671 | #: ../deja-dup/AssistantOperation.vala:795 |
1000 | 629 | msgid "Require Password?" | 672 | msgid "Require Password?" |
1001 | 630 | msgstr "" | 673 | msgstr "" |
1002 | 631 | 674 | ||
1004 | 632 | #: ../deja-dup/AssistantOperation.vala:732 | 675 | #: ../deja-dup/AssistantOperation.vala:797 |
1005 | 633 | msgid "Encryption Password Needed" | 676 | msgid "Encryption Password Needed" |
1006 | 634 | msgstr "" | 677 | msgstr "" |
1007 | 635 | 678 | ||
1009 | 636 | #: ../deja-dup/AssistantOperation.vala:778 | 679 | #: ../deja-dup/AssistantOperation.vala:868 |
1010 | 637 | msgid "Backup encryption password" | 680 | msgid "Backup encryption password" |
1011 | 638 | msgstr "" | 681 | msgstr "" |
1012 | 639 | 682 | ||
1013 | @@ -782,11 +825,16 @@ | |||
1014 | 782 | msgid "Scanning finished" | 825 | msgid "Scanning finished" |
1015 | 783 | msgstr "" | 826 | msgstr "" |
1016 | 784 | 827 | ||
1018 | 785 | #: ../deja-dup/Assistant.vala:309 | 828 | #: ../deja-dup/Assistant.vala:314 |
1019 | 786 | msgid "Co_ntinue" | 829 | msgid "Co_ntinue" |
1020 | 787 | msgstr "" | 830 | msgstr "" |
1021 | 788 | 831 | ||
1023 | 789 | #: ../deja-dup/Assistant.vala:347 ../deja-dup/StatusIcon.vala:93 | 832 | #: ../deja-dup/Assistant.vala:320 |
1024 | 833 | msgctxt "verb" | ||
1025 | 834 | msgid "_Test" | ||
1026 | 835 | msgstr "" | ||
1027 | 836 | |||
1028 | 837 | #: ../deja-dup/Assistant.vala:357 ../deja-dup/StatusIcon.vala:93 | ||
1029 | 790 | msgid "_Resume Later" | 838 | msgid "_Resume Later" |
1030 | 791 | msgstr "" | 839 | msgstr "" |
1031 | 792 | 840 | ||
1032 | @@ -1012,35 +1060,35 @@ | |||
1033 | 1012 | msgid "Categories" | 1060 | msgid "Categories" |
1034 | 1013 | msgstr "" | 1061 | msgstr "" |
1035 | 1014 | 1062 | ||
1038 | 1015 | #: ../tools/duplicity/DuplicityJob.vala:89 | 1063 | #: ../tools/duplicity/DuplicityJob.vala:90 |
1039 | 1016 | #: ../tools/duplicity/DuplicityJob.vala:173 | 1064 | #: ../tools/duplicity/DuplicityJob.vala:187 |
1040 | 1017 | msgid "Paused (no network)" | 1065 | msgid "Paused (no network)" |
1041 | 1018 | msgstr "" | 1066 | msgstr "" |
1042 | 1019 | 1067 | ||
1043 | 1020 | #. Was not even a file path (maybe something goofy like computer://) | 1068 | #. Was not even a file path (maybe something goofy like computer://) |
1045 | 1021 | #: ../tools/duplicity/DuplicityJob.vala:444 | 1069 | #: ../tools/duplicity/DuplicityJob.vala:458 |
1046 | 1022 | #, c-format | 1070 | #, c-format |
1047 | 1023 | msgid "Could not restore ‘%s’: Not a valid file location" | 1071 | msgid "Could not restore ‘%s’: Not a valid file location" |
1048 | 1024 | msgstr "" | 1072 | msgstr "" |
1049 | 1025 | 1073 | ||
1050 | 1026 | #. Tiny backup location. Suggest they get a larger one. | 1074 | #. Tiny backup location. Suggest they get a larger one. |
1052 | 1027 | #: ../tools/duplicity/DuplicityJob.vala:510 | 1075 | #: ../tools/duplicity/DuplicityJob.vala:524 |
1053 | 1028 | msgid "Backup location is too small. Try using one with more space." | 1076 | msgid "Backup location is too small. Try using one with more space." |
1054 | 1029 | msgstr "" | 1077 | msgstr "" |
1055 | 1030 | 1078 | ||
1057 | 1031 | #: ../tools/duplicity/DuplicityJob.vala:532 | 1079 | #: ../tools/duplicity/DuplicityJob.vala:547 |
1058 | 1032 | msgid "Backup location does not have enough free space." | 1080 | msgid "Backup location does not have enough free space." |
1059 | 1033 | msgstr "" | 1081 | msgstr "" |
1060 | 1034 | 1082 | ||
1063 | 1035 | #: ../tools/duplicity/DuplicityJob.vala:551 | 1083 | #: ../tools/duplicity/DuplicityJob.vala:567 |
1064 | 1036 | #: ../tools/duplicity/DuplicityJob.vala:565 | 1084 | #: ../tools/duplicity/DuplicityJob.vala:581 |
1065 | 1037 | msgid "Cleaning up…" | 1085 | msgid "Cleaning up…" |
1066 | 1038 | msgstr "" | 1086 | msgstr "" |
1067 | 1039 | 1087 | ||
1068 | 1040 | #. OK, we succeeded yay! But some files didn't make it into the backup | 1088 | #. OK, we succeeded yay! But some files didn't make it into the backup |
1069 | 1041 | #. because we couldn't read them. So tell the user so they don't think | 1089 | #. because we couldn't read them. So tell the user so they don't think |
1070 | 1042 | #. everything is hunky dory. | 1090 | #. everything is hunky dory. |
1072 | 1043 | #: ../tools/duplicity/DuplicityJob.vala:661 | 1091 | #: ../tools/duplicity/DuplicityJob.vala:677 |
1073 | 1044 | msgid "" | 1092 | msgid "" |
1074 | 1045 | "Could not back up the following files. Please make sure you are able to " | 1093 | "Could not back up the following files. Please make sure you are able to " |
1075 | 1046 | "open them." | 1094 | "open them." |
1076 | @@ -1049,13 +1097,13 @@ | |||
1077 | 1049 | #. OK, we succeeded yay! But some files didn't actually restore | 1097 | #. OK, we succeeded yay! But some files didn't actually restore |
1078 | 1050 | #. because we couldn't write to them. So tell the user so they | 1098 | #. because we couldn't write to them. So tell the user so they |
1079 | 1051 | #. don't think everything is hunky dory. | 1099 | #. don't think everything is hunky dory. |
1081 | 1052 | #: ../tools/duplicity/DuplicityJob.vala:677 | 1100 | #: ../tools/duplicity/DuplicityJob.vala:693 |
1082 | 1053 | msgid "" | 1101 | msgid "" |
1083 | 1054 | "Could not restore the following files. Please make sure you are able to " | 1102 | "Could not restore the following files. Please make sure you are able to " |
1084 | 1055 | "write to them." | 1103 | "write to them." |
1085 | 1056 | msgstr "" | 1104 | msgstr "" |
1086 | 1057 | 1105 | ||
1088 | 1058 | #: ../tools/duplicity/DuplicityJob.vala:924 | 1106 | #: ../tools/duplicity/DuplicityJob.vala:940 |
1089 | 1059 | #, c-format | 1107 | #, c-format |
1090 | 1060 | msgid "Could not restore ‘%s’: File not found in backup" | 1108 | msgid "Could not restore ‘%s’: File not found in backup" |
1091 | 1061 | msgstr "" | 1109 | msgstr "" |
1092 | @@ -1063,17 +1111,17 @@ | |||
1093 | 1063 | #. notify upper layers, if they want to do anything | 1111 | #. notify upper layers, if they want to do anything |
1094 | 1064 | #. Duplicity tried to ask the user what the encryption password is. | 1112 | #. Duplicity tried to ask the user what the encryption password is. |
1095 | 1065 | #. notify upper layers, if they want to do anything | 1113 | #. notify upper layers, if they want to do anything |
1099 | 1066 | #: ../tools/duplicity/DuplicityJob.vala:930 | 1114 | #: ../tools/duplicity/DuplicityJob.vala:946 |
1100 | 1067 | #: ../tools/duplicity/DuplicityJob.vala:1028 | 1115 | #: ../tools/duplicity/DuplicityJob.vala:1044 |
1101 | 1068 | #: ../tools/duplicity/DuplicityJob.vala:1032 | 1116 | #: ../tools/duplicity/DuplicityJob.vala:1048 |
1102 | 1069 | msgid "Bad encryption password." | 1117 | msgid "Bad encryption password." |
1103 | 1070 | msgstr "" | 1118 | msgstr "" |
1104 | 1071 | 1119 | ||
1106 | 1072 | #: ../tools/duplicity/DuplicityJob.vala:935 | 1120 | #: ../tools/duplicity/DuplicityJob.vala:951 |
1107 | 1073 | msgid "Computer name changed" | 1121 | msgid "Computer name changed" |
1108 | 1074 | msgstr "" | 1122 | msgstr "" |
1109 | 1075 | 1123 | ||
1111 | 1076 | #: ../tools/duplicity/DuplicityJob.vala:935 | 1124 | #: ../tools/duplicity/DuplicityJob.vala:951 |
1112 | 1077 | #, c-format | 1125 | #, c-format |
1113 | 1078 | msgid "" | 1126 | msgid "" |
1114 | 1079 | "The existing backup is of a computer named %s, but the current computer’s " | 1127 | "The existing backup is of a computer named %s, but the current computer’s " |
1115 | @@ -1081,69 +1129,69 @@ | |||
1116 | 1081 | "location." | 1129 | "location." |
1117 | 1082 | msgstr "" | 1130 | msgstr "" |
1118 | 1083 | 1131 | ||
1120 | 1084 | #: ../tools/duplicity/DuplicityJob.vala:970 | 1132 | #: ../tools/duplicity/DuplicityJob.vala:986 |
1121 | 1085 | #, c-format | 1133 | #, c-format |
1122 | 1086 | msgid "Permission denied when trying to create ‘%s’." | 1134 | msgid "Permission denied when trying to create ‘%s’." |
1123 | 1087 | msgstr "" | 1135 | msgstr "" |
1124 | 1088 | 1136 | ||
1125 | 1089 | #. assume error is on backend side | 1137 | #. assume error is on backend side |
1128 | 1090 | #: ../tools/duplicity/DuplicityJob.vala:974 | 1138 | #: ../tools/duplicity/DuplicityJob.vala:990 |
1129 | 1091 | #: ../tools/duplicity/DuplicityJob.vala:978 | 1139 | #: ../tools/duplicity/DuplicityJob.vala:994 |
1130 | 1092 | #, c-format | 1140 | #, c-format |
1131 | 1093 | msgid "Permission denied when trying to read ‘%s’." | 1141 | msgid "Permission denied when trying to read ‘%s’." |
1132 | 1094 | msgstr "" | 1142 | msgstr "" |
1133 | 1095 | 1143 | ||
1135 | 1096 | #: ../tools/duplicity/DuplicityJob.vala:982 | 1144 | #: ../tools/duplicity/DuplicityJob.vala:998 |
1136 | 1097 | #, c-format | 1145 | #, c-format |
1137 | 1098 | msgid "Permission denied when trying to delete ‘%s’." | 1146 | msgid "Permission denied when trying to delete ‘%s’." |
1138 | 1099 | msgstr "" | 1147 | msgstr "" |
1139 | 1100 | 1148 | ||
1141 | 1101 | #: ../tools/duplicity/DuplicityJob.vala:989 | 1149 | #: ../tools/duplicity/DuplicityJob.vala:1005 |
1142 | 1102 | #, c-format | 1150 | #, c-format |
1143 | 1103 | msgid "Backup location ‘%s’ does not exist." | 1151 | msgid "Backup location ‘%s’ does not exist." |
1144 | 1104 | msgstr "" | 1152 | msgstr "" |
1145 | 1105 | 1153 | ||
1148 | 1106 | #: ../tools/duplicity/DuplicityJob.vala:995 | 1154 | #: ../tools/duplicity/DuplicityJob.vala:1011 |
1149 | 1107 | #: ../tools/duplicity/DuplicityJob.vala:1047 | 1155 | #: ../tools/duplicity/DuplicityJob.vala:1063 |
1150 | 1108 | msgid "No space left." | 1156 | msgid "No space left." |
1151 | 1109 | msgstr "" | 1157 | msgstr "" |
1152 | 1110 | 1158 | ||
1154 | 1111 | #: ../tools/duplicity/DuplicityJob.vala:1009 | 1159 | #: ../tools/duplicity/DuplicityJob.vala:1025 |
1155 | 1112 | msgid "Invalid ID." | 1160 | msgid "Invalid ID." |
1156 | 1113 | msgstr "" | 1161 | msgstr "" |
1157 | 1114 | 1162 | ||
1159 | 1115 | #: ../tools/duplicity/DuplicityJob.vala:1011 | 1163 | #: ../tools/duplicity/DuplicityJob.vala:1027 |
1160 | 1116 | msgid "Invalid secret key." | 1164 | msgid "Invalid secret key." |
1161 | 1117 | msgstr "" | 1165 | msgstr "" |
1162 | 1118 | 1166 | ||
1164 | 1119 | #: ../tools/duplicity/DuplicityJob.vala:1013 | 1167 | #: ../tools/duplicity/DuplicityJob.vala:1029 |
1165 | 1120 | msgid "Your Amazon Web Services account is not signed up for the S3 service." | 1168 | msgid "Your Amazon Web Services account is not signed up for the S3 service." |
1166 | 1121 | msgstr "" | 1169 | msgstr "" |
1167 | 1122 | 1170 | ||
1169 | 1123 | #: ../tools/duplicity/DuplicityJob.vala:1022 | 1171 | #: ../tools/duplicity/DuplicityJob.vala:1038 |
1170 | 1124 | msgid "S3 bucket name is not available." | 1172 | msgid "S3 bucket name is not available." |
1171 | 1125 | msgstr "" | 1173 | msgstr "" |
1172 | 1126 | 1174 | ||
1174 | 1127 | #: ../tools/duplicity/DuplicityJob.vala:1036 | 1175 | #: ../tools/duplicity/DuplicityJob.vala:1052 |
1175 | 1128 | #, c-format | 1176 | #, c-format |
1176 | 1129 | msgid "Error reading file ‘%s’." | 1177 | msgid "Error reading file ‘%s’." |
1177 | 1130 | msgstr "" | 1178 | msgstr "" |
1178 | 1131 | 1179 | ||
1180 | 1132 | #: ../tools/duplicity/DuplicityJob.vala:1038 | 1180 | #: ../tools/duplicity/DuplicityJob.vala:1054 |
1181 | 1133 | #, c-format | 1181 | #, c-format |
1182 | 1134 | msgid "Error writing file ‘%s’." | 1182 | msgid "Error writing file ‘%s’." |
1183 | 1135 | msgstr "" | 1183 | msgstr "" |
1184 | 1136 | 1184 | ||
1186 | 1137 | #: ../tools/duplicity/DuplicityJob.vala:1049 | 1185 | #: ../tools/duplicity/DuplicityJob.vala:1065 |
1187 | 1138 | #, c-format | 1186 | #, c-format |
1188 | 1139 | msgid "No space left in ‘%s’." | 1187 | msgid "No space left in ‘%s’." |
1189 | 1140 | msgstr "" | 1188 | msgstr "" |
1190 | 1141 | 1189 | ||
1192 | 1142 | #: ../tools/duplicity/DuplicityJob.vala:1057 | 1190 | #: ../tools/duplicity/DuplicityJob.vala:1073 |
1193 | 1143 | msgid "No backup files found" | 1191 | msgid "No backup files found" |
1194 | 1144 | msgstr "" | 1192 | msgstr "" |
1195 | 1145 | 1193 | ||
1197 | 1146 | #: ../tools/duplicity/DuplicityJob.vala:1107 | 1194 | #: ../tools/duplicity/DuplicityJob.vala:1123 |
1198 | 1147 | msgid "Uploading…" | 1195 | msgid "Uploading…" |
1199 | 1148 | msgstr "" | 1196 | msgstr "" |
1200 | 1149 | 1197 | ||
1201 | 1150 | 1198 | ||
1202 | === modified file 'tests/runner/mock/duplicity' | |||
1203 | --- tests/runner/mock/duplicity 2012-08-13 23:03:55 +0000 | |||
1204 | +++ tests/runner/mock/duplicity 2012-08-21 01:36:28 +0000 | |||
1205 | @@ -77,6 +77,7 @@ | |||
1206 | 77 | delay = 0 | 77 | delay = 0 |
1207 | 78 | script = '' | 78 | script = '' |
1208 | 79 | passphrase = None | 79 | passphrase = None |
1209 | 80 | tmp_archive = False | ||
1210 | 80 | 81 | ||
1211 | 81 | while len(lines) > curline and lines[curline].strip(): | 82 | while len(lines) > curline and lines[curline].strip(): |
1212 | 82 | tokens = lines[curline].split() | 83 | tokens = lines[curline].split() |
1213 | @@ -90,8 +91,19 @@ | |||
1214 | 90 | script = ' '.join(tokens[1:]) | 91 | script = ' '.join(tokens[1:]) |
1215 | 91 | elif tokens[0] == 'PASSPHRASE:': | 92 | elif tokens[0] == 'PASSPHRASE:': |
1216 | 92 | passphrase = tokens[1] if len(tokens) > 1 else '' | 93 | passphrase = tokens[1] if len(tokens) > 1 else '' |
1217 | 94 | elif lines[curline].strip() == 'TMP_ARCHIVE': | ||
1218 | 95 | tmp_archive = True | ||
1219 | 93 | curline += 1 | 96 | curline += 1 |
1220 | 94 | 97 | ||
1221 | 98 | if tmp_archive: | ||
1222 | 99 | for i in xrange(len(sys.argv)): | ||
1223 | 100 | split = sys.argv[i].split('=', 1) | ||
1224 | 101 | if len(split) > 1 and split[0] == "--archive-dir": | ||
1225 | 102 | if split[1].find("/cache/") != -1: | ||
1226 | 103 | print >> logfd, "TESTFAIL: expected random /tmp archive dir" | ||
1227 | 104 | sys.exit(-1) | ||
1228 | 105 | sys.argv[i] = "--archive-dir=?" | ||
1229 | 106 | |||
1230 | 95 | if expected_args != sys.argv[1:]: | 107 | if expected_args != sys.argv[1:]: |
1231 | 96 | print >> logfd, "TESTFAIL: expected\n%s\nvs\n%s" % (expected_args, sys.argv[1:]) | 108 | print >> logfd, "TESTFAIL: expected\n%s\nvs\n%s" % (expected_args, sys.argv[1:]) |
1232 | 97 | sys.exit(-1) | 109 | sys.exit(-1) |
1233 | 98 | 110 | ||
1234 | === modified file 'tests/runner/runner.vala' | |||
1235 | --- tests/runner/runner.vala 2012-08-13 23:44:06 +0000 | |||
1236 | +++ tests/runner/runner.vala 2012-08-21 01:36:28 +0000 | |||
1237 | @@ -103,21 +103,23 @@ | |||
1238 | 103 | LIST, | 103 | LIST, |
1239 | 104 | } | 104 | } |
1240 | 105 | 105 | ||
1242 | 106 | string default_args(BackupRunner br, Mode mode = Mode.NONE, bool encrypted = false, string extra = "") | 106 | string default_args(BackupRunner br, Mode mode = Mode.NONE, bool encrypted = false, string extra = "", bool tmp_archive = false) |
1243 | 107 | { | 107 | { |
1244 | 108 | var cachedir = Environment.get_variable("XDG_CACHE_HOME"); | 108 | var cachedir = Environment.get_variable("XDG_CACHE_HOME"); |
1245 | 109 | var test_home = Environment.get_variable("DEJA_DUP_TEST_HOME"); | 109 | var test_home = Environment.get_variable("DEJA_DUP_TEST_HOME"); |
1246 | 110 | var backupdir = Path.build_filename(test_home, "backup"); | 110 | var backupdir = Path.build_filename(test_home, "backup"); |
1247 | 111 | var restoredir = Path.build_filename(test_home, "restore"); | 111 | var restoredir = Path.build_filename(test_home, "restore"); |
1248 | 112 | 112 | ||
1249 | 113 | var archive = tmp_archive ? "?" : "%s/deja-dup".printf(cachedir); | ||
1250 | 114 | |||
1251 | 113 | if (mode == Mode.CLEANUP) | 115 | if (mode == Mode.CLEANUP) |
1253 | 114 | return "cleanup '--force' 'file://%s' '--gio' %s'--verbosity=9' '--gpg-options=--no-use-agent' '--archive-dir=%s/deja-dup' '--log-fd=?'".printf(backupdir, encrypted ? "" : "'--no-encryption' ", cachedir); | 116 | return "cleanup '--force' 'file://%s' '--gio' %s'--verbosity=9' '--gpg-options=--no-use-agent' '--archive-dir=%s' '--log-fd=?'".printf(backupdir, encrypted ? "" : "'--no-encryption' ", archive); |
1254 | 115 | else if (mode == Mode.RESTORE) | 117 | else if (mode == Mode.RESTORE) |
1256 | 116 | return "'restore' '--gio' '--force' 'file://%s' '%s' %s'--verbosity=9' '--gpg-options=--no-use-agent' '--archive-dir=%s/deja-dup' '--log-fd=?'".printf(backupdir, restoredir, encrypted ? "" : "'--no-encryption' ", cachedir); | 118 | return "'restore' '--gio' '--force' 'file://%s' '%s' %s'--verbosity=9' '--gpg-options=--no-use-agent' '--archive-dir=%s' '--log-fd=?'".printf(backupdir, restoredir, encrypted ? "" : "'--no-encryption' ", archive); |
1257 | 117 | else if (mode == Mode.VERIFY) | 119 | else if (mode == Mode.VERIFY) |
1259 | 118 | return "'restore' '--file-to-restore=%s/deja-dup/metadata' '--gio' '--force' 'file://%s' '%s/deja-dup/metadata' %s'--verbosity=9' '--gpg-options=--no-use-agent' '--archive-dir=%s/deja-dup' '--log-fd=?'".printf(cachedir.substring(1), backupdir, cachedir, encrypted ? "" : "'--no-encryption' ", cachedir); | 120 | return "'restore' '--file-to-restore=%s/deja-dup/metadata' '--gio' '--force' 'file://%s' '%s/deja-dup/metadata' %s'--verbosity=9' '--gpg-options=--no-use-agent' '--archive-dir=%s' '--log-fd=?'".printf(cachedir.substring(1), backupdir, cachedir, encrypted ? "" : "'--no-encryption' ", archive); |
1260 | 119 | else if (mode == Mode.LIST) | 121 | else if (mode == Mode.LIST) |
1262 | 120 | return "'list-current-files' '--gio' 'file://%s' %s'--verbosity=9' '--gpg-options=--no-use-agent' '--archive-dir=%s/deja-dup' '--log-fd=?'".printf(backupdir, encrypted ? "" : "'--no-encryption' ", cachedir); | 122 | return "'list-current-files' '--gio' 'file://%s' %s'--verbosity=9' '--gpg-options=--no-use-agent' '--archive-dir=%s' '--log-fd=?'".printf(backupdir, encrypted ? "" : "'--no-encryption' ", archive); |
1263 | 121 | 123 | ||
1264 | 122 | string source_str = ""; | 124 | string source_str = ""; |
1265 | 123 | if (mode == Mode.DRY || mode == Mode.BACKUP) | 125 | if (mode == Mode.DRY || mode == Mode.BACKUP) |
1266 | @@ -164,7 +166,7 @@ | |||
1267 | 164 | args += "'--exclude=%s/deja-dup' '--exclude=%s' '--exclude=**' ".printf(cachedir, cachedir); | 166 | args += "'--exclude=%s/deja-dup' '--exclude=%s' '--exclude=**' ".printf(cachedir, cachedir); |
1268 | 165 | } | 167 | } |
1269 | 166 | 168 | ||
1271 | 167 | args += "%s%s'--gio' %s'file://%s' %s'--verbosity=9' '--gpg-options=--no-use-agent' '--archive-dir=%s/deja-dup' '--log-fd=?'".printf(extra, dry_str, source_str, backupdir, enc_str, cachedir); | 169 | args += "%s%s'--gio' %s'file://%s' %s'--verbosity=9' '--gpg-options=--no-use-agent' '--archive-dir=%s' '--log-fd=?'".printf(extra, dry_str, source_str, backupdir, enc_str, archive); |
1272 | 168 | 170 | ||
1273 | 169 | return args; | 171 | return args; |
1274 | 170 | } | 172 | } |
1275 | @@ -297,14 +299,20 @@ | |||
1276 | 297 | { | 299 | { |
1277 | 298 | var home = Environment.get_home_dir(); | 300 | var home = Environment.get_home_dir(); |
1278 | 299 | var cachedir = Environment.get_variable("XDG_CACHE_HOME"); | 301 | var cachedir = Environment.get_variable("XDG_CACHE_HOME"); |
1280 | 300 | return in.replace("@HOME@", home).replace("@XDG_CACHE_HOME@", cachedir); | 302 | var test_home = Environment.get_variable("DEJA_DUP_TEST_HOME"); |
1281 | 303 | return in.replace("@HOME@", home). | ||
1282 | 304 | replace("@XDG_CACHE_HOME@", cachedir). | ||
1283 | 305 | replace("@TEST_HOME@", test_home); | ||
1284 | 301 | } | 306 | } |
1285 | 302 | 307 | ||
1286 | 303 | string run_script(string in) | 308 | string run_script(string in) |
1287 | 304 | { | 309 | { |
1288 | 305 | string output; | 310 | string output; |
1289 | 311 | string errstr; | ||
1290 | 306 | try { | 312 | try { |
1292 | 307 | Process.spawn_sync(null, {"/bin/sh", "-c", in}, null, 0, null, out output, null, null); | 313 | Process.spawn_sync(null, {"/bin/sh", "-c", in}, null, 0, null, out output, out errstr, null); |
1293 | 314 | if (errstr != null && errstr != "") | ||
1294 | 315 | warning("Error running script: %s", errstr); | ||
1295 | 308 | } | 316 | } |
1296 | 309 | catch (SpawnError e) { | 317 | catch (SpawnError e) { |
1297 | 310 | warning(e.message); | 318 | warning(e.message); |
1298 | @@ -343,6 +351,22 @@ | |||
1299 | 343 | br.error_detail = keyfile.get_string(group, "ErrorDetail"); | 351 | br.error_detail = keyfile.get_string(group, "ErrorDetail"); |
1300 | 344 | if (keyfile.has_key(group, "Passphrases")) | 352 | if (keyfile.has_key(group, "Passphrases")) |
1301 | 345 | br.passphrases = keyfile.get_integer(group, "Passphrases"); | 353 | br.passphrases = keyfile.get_integer(group, "Passphrases"); |
1302 | 354 | if (keyfile.has_key(group, "Settings")) { | ||
1303 | 355 | var settings_list = keyfile.get_string_list(group, "Settings"); | ||
1304 | 356 | var settings = DejaDup.get_settings(); | ||
1305 | 357 | foreach (var setting in settings_list) { | ||
1306 | 358 | try { | ||
1307 | 359 | var tokens = setting.split("="); | ||
1308 | 360 | var key = tokens[0]; | ||
1309 | 361 | var val = Variant.parse(null, tokens[1]); | ||
1310 | 362 | settings.set_value(key, val); | ||
1311 | 363 | } | ||
1312 | 364 | catch (Error e) { | ||
1313 | 365 | warning("%s\n", e.message); | ||
1314 | 366 | assert_not_reached(); | ||
1315 | 367 | } | ||
1316 | 368 | } | ||
1317 | 369 | } | ||
1318 | 346 | } | 370 | } |
1319 | 347 | 371 | ||
1320 | 348 | void process_duplicity_run_block(KeyFile keyfile, string run, BackupRunner br) throws Error | 372 | void process_duplicity_run_block(KeyFile keyfile, string run, BackupRunner br) throws Error |
1321 | @@ -353,6 +377,7 @@ | |||
1322 | 353 | bool cancel = false; | 377 | bool cancel = false; |
1323 | 354 | bool stop = false; | 378 | bool stop = false; |
1324 | 355 | bool passphrase = false; | 379 | bool passphrase = false; |
1325 | 380 | bool tmp_archive = false; | ||
1326 | 356 | string script = null; | 381 | string script = null; |
1327 | 357 | Mode mode = Mode.NONE; | 382 | Mode mode = Mode.NONE; |
1328 | 358 | 383 | ||
1329 | @@ -361,6 +386,8 @@ | |||
1330 | 361 | var group = "Duplicity " + run; | 386 | var group = "Duplicity " + run; |
1331 | 362 | 387 | ||
1332 | 363 | if (keyfile.has_group(group)) { | 388 | if (keyfile.has_group(group)) { |
1333 | 389 | if (keyfile.has_key(group, "ArchiveDirIsTmp")) | ||
1334 | 390 | tmp_archive = keyfile.get_boolean(group, "ArchiveDirIsTmp"); | ||
1335 | 364 | if (keyfile.has_key(group, "Cancel")) | 391 | if (keyfile.has_key(group, "Cancel")) |
1336 | 365 | cancel = keyfile.get_boolean(group, "Cancel"); | 392 | cancel = keyfile.get_boolean(group, "Cancel"); |
1337 | 366 | if (keyfile.has_key(group, "Encrypted")) | 393 | if (keyfile.has_key(group, "Encrypted")) |
1338 | @@ -403,7 +430,10 @@ | |||
1339 | 403 | 430 | ||
1340 | 404 | var cachedir = Environment.get_variable("XDG_CACHE_HOME"); | 431 | var cachedir = Environment.get_variable("XDG_CACHE_HOME"); |
1341 | 405 | 432 | ||
1343 | 406 | var dupscript = "ARGS: " + default_args(br, mode, encrypted, extra_args); | 433 | var dupscript = "ARGS: " + default_args(br, mode, encrypted, extra_args, tmp_archive); |
1344 | 434 | |||
1345 | 435 | if (tmp_archive) | ||
1346 | 436 | dupscript += "\n" + "TMP_ARCHIVE"; | ||
1347 | 407 | 437 | ||
1348 | 408 | if (cancel) { | 438 | if (cancel) { |
1349 | 409 | dupscript += "\n" + "DELAY: 10"; | 439 | dupscript += "\n" + "DELAY: 10"; |
1350 | 410 | 440 | ||
1351 | === added file 'tests/scripts/nag.test' | |||
1352 | --- tests/scripts/nag.test 1970-01-01 00:00:00 +0000 | |||
1353 | +++ tests/scripts/nag.test 2012-08-21 01:36:28 +0000 | |||
1354 | @@ -0,0 +1,58 @@ | |||
1355 | 1 | # Tests whether we correctly nag the user about their password during some | ||
1356 | 2 | # verify checks. | ||
1357 | 3 | |||
1358 | 4 | [Operation] | ||
1359 | 5 | Type=backup | ||
1360 | 6 | Settings=nag-check='1970-01-01T00:32:08.916885Z' | ||
1361 | 7 | Passphrases=2 | ||
1362 | 8 | |||
1363 | 9 | [Duplicity] | ||
1364 | 10 | Runs=status 1;status 2;dry;backup;status-restore 1;status-restore 2;list;verify; | ||
1365 | 11 | |||
1366 | 12 | [Duplicity status 1] | ||
1367 | 13 | #DEBUG 1 | ||
1368 | 14 | #. ['duplicity.gpg'] | ||
1369 | 15 | # | ||
1370 | 16 | #ERROR 31 | ||
1371 | 17 | Output=true | ||
1372 | 18 | |||
1373 | 19 | [Duplicity status 2] | ||
1374 | 20 | #DEBUG 1 | ||
1375 | 21 | #. ['duplicity.gpg'] | ||
1376 | 22 | Output=true | ||
1377 | 23 | Encrypted=true | ||
1378 | 24 | Passphrase=true | ||
1379 | 25 | |||
1380 | 26 | [Duplicity dry] | ||
1381 | 27 | Encrypted=true | ||
1382 | 28 | Passphrase=true | ||
1383 | 29 | |||
1384 | 30 | [Duplicity backup] | ||
1385 | 31 | Encrypted=true | ||
1386 | 32 | Passphrase=true | ||
1387 | 33 | |||
1388 | 34 | [Duplicity status-restore 1] | ||
1389 | 35 | #DEBUG 1 | ||
1390 | 36 | #. ['duplicity.gpg'] | ||
1391 | 37 | # | ||
1392 | 38 | #ERROR 31 | ||
1393 | 39 | Output=true | ||
1394 | 40 | ArchiveDirIsTmp=true | ||
1395 | 41 | |||
1396 | 42 | [Duplicity status-restore 2] | ||
1397 | 43 | #DEBUG 1 | ||
1398 | 44 | #. ['duplicity.gpg'] | ||
1399 | 45 | Output=true | ||
1400 | 46 | Encrypted=true | ||
1401 | 47 | Passphrase=true | ||
1402 | 48 | ArchiveDirIsTmp=true | ||
1403 | 49 | |||
1404 | 50 | [Duplicity list] | ||
1405 | 51 | Encrypted=true | ||
1406 | 52 | Passphrase=true | ||
1407 | 53 | ArchiveDirIsTmp=true | ||
1408 | 54 | |||
1409 | 55 | [Duplicity verify] | ||
1410 | 56 | Encrypted=true | ||
1411 | 57 | Passphrase=true | ||
1412 | 58 | ArchiveDirIsTmp=true | ||
1413 | 0 | 59 | ||
1414 | === modified file 'tools/duplicity/DuplicityInstance.vala' | |||
1415 | --- tools/duplicity/DuplicityInstance.vala 2012-08-10 18:33:29 +0000 | |||
1416 | +++ tools/duplicity/DuplicityInstance.vala 2012-08-21 01:36:28 +0000 | |||
1417 | @@ -27,6 +27,7 @@ | |||
1418 | 27 | string user_text); | 27 | string user_text); |
1419 | 28 | 28 | ||
1420 | 29 | public bool verbose {get; private set; default = false;} | 29 | public bool verbose {get; private set; default = false;} |
1421 | 30 | public string forced_cache_dir {get; set; default = null;} | ||
1422 | 30 | 31 | ||
1423 | 31 | public virtual void start(List<string> argv_in, List<string>? envp_in, | 32 | public virtual void start(List<string> argv_in, List<string>? envp_in, |
1424 | 32 | bool as_root = false) throws Error | 33 | bool as_root = false) throws Error |
1425 | @@ -71,7 +72,9 @@ | |||
1426 | 71 | argv.append("--gpg-options=--no-use-agent"); | 72 | argv.append("--gpg-options=--no-use-agent"); |
1427 | 72 | 73 | ||
1428 | 73 | // Cache signature files | 74 | // Cache signature files |
1430 | 74 | var cache_dir = Environment.get_user_cache_dir(); | 75 | var cache_dir = forced_cache_dir; |
1431 | 76 | if (cache_dir == null) | ||
1432 | 77 | cache_dir = Environment.get_user_cache_dir(); | ||
1433 | 75 | if (cache_dir != null) { | 78 | if (cache_dir != null) { |
1434 | 76 | bool add_dir = false; | 79 | bool add_dir = false; |
1435 | 77 | var cache_file = File.new_for_path(cache_dir); | 80 | var cache_file = File.new_for_path(cache_dir); |
1436 | 78 | 81 | ||
1437 | === modified file 'tools/duplicity/DuplicityJob.vala' | |||
1438 | --- tools/duplicity/DuplicityJob.vala 2012-08-21 00:49:25 +0000 | |||
1439 | +++ tools/duplicity/DuplicityJob.vala 2012-08-21 01:36:28 +0000 | |||
1440 | @@ -80,6 +80,7 @@ | |||
1441 | 80 | int delete_age = 0; | 80 | int delete_age = 0; |
1442 | 81 | 81 | ||
1443 | 82 | File last_touched_file = null; | 82 | File last_touched_file = null; |
1444 | 83 | string forced_cache_dir = null; | ||
1445 | 83 | 84 | ||
1446 | 84 | void network_changed() | 85 | void network_changed() |
1447 | 85 | { | 86 | { |
1448 | @@ -109,6 +110,9 @@ | |||
1449 | 109 | 110 | ||
1450 | 110 | ~DuplicityJob() { | 111 | ~DuplicityJob() { |
1451 | 111 | DejaDup.Network.get().notify["connected"].disconnect(network_changed); | 112 | DejaDup.Network.get().notify["connected"].disconnect(network_changed); |
1452 | 113 | |||
1453 | 114 | if (forced_cache_dir != null) | ||
1454 | 115 | new DejaDup.RecursiveDelete(File.new_for_path(forced_cache_dir)).start_async.begin(); | ||
1455 | 112 | } | 116 | } |
1456 | 113 | 117 | ||
1457 | 114 | public override void start() | 118 | public override void start() |
1458 | @@ -125,7 +129,17 @@ | |||
1459 | 125 | 129 | ||
1460 | 126 | if (mode == DejaDup.ToolJob.Mode.BACKUP) | 130 | if (mode == DejaDup.ToolJob.Mode.BACKUP) |
1461 | 127 | process_include_excludes(); | 131 | process_include_excludes(); |
1463 | 128 | 132 | ||
1464 | 133 | /* Fake cache dir if we need to */ | ||
1465 | 134 | if ((flags & DejaDup.ToolJob.Flags.NO_CACHE) != 0) { | ||
1466 | 135 | try { | ||
1467 | 136 | forced_cache_dir = DirUtils.make_tmp("deja-dup-XXXXXX"); | ||
1468 | 137 | } | ||
1469 | 138 | catch (Error e) { | ||
1470 | 139 | warning("%s\n", e.message); | ||
1471 | 140 | } | ||
1472 | 141 | } | ||
1473 | 142 | |||
1474 | 129 | var settings = DejaDup.get_settings(); | 143 | var settings = DejaDup.get_settings(); |
1475 | 130 | delete_age = settings.get_int(DejaDup.DELETE_AFTER_KEY); | 144 | delete_age = settings.get_int(DejaDup.DELETE_AFTER_KEY); |
1476 | 131 | 145 | ||
1477 | @@ -1372,6 +1386,9 @@ | |||
1478 | 1372 | inst = new DuplicityInstance(); | 1386 | inst = new DuplicityInstance(); |
1479 | 1373 | inst.done.connect(handle_done); | 1387 | inst.done.connect(handle_done); |
1480 | 1374 | 1388 | ||
1481 | 1389 | if (forced_cache_dir != null) | ||
1482 | 1390 | inst.forced_cache_dir = forced_cache_dir; | ||
1483 | 1391 | |||
1484 | 1375 | /* As duplicity's data is returned via a signal, handle_message begins post-raw stream processing */ | 1392 | /* As duplicity's data is returned via a signal, handle_message begins post-raw stream processing */ |
1485 | 1376 | inst.message.connect(handle_message); | 1393 | inst.message.connect(handle_message); |
1486 | 1377 | 1394 |
The nag screen looks good, but after verifying the backup it just disappears, it does not give any indication of whether the verification was successful or not. The window should stay open and then say whether it was successful or not, and then allow the user to acknowledge and close the window.