GNOME Bugzilla – Bug 674962
Shell's GMountOperation should be modal and support GPasswordSave
Last modified: 2012-06-21 04:16:37 UTC
This was discussed in bug 674161 comment 21 - filing here.
(In reply to comment #21) > - gnome-shell's GMountOperation should be a modal dialog (instead of a > notification) and we want it to also support GPasswordSave but probably > default to G_PASSWORD_SAVE_PERMANENTLY and show it as a checkbox > (e.g. ignore "never" or "save for session") I don't know if I understand correctly, but the "Remember password?" checkbox should be IMHO unchecked by default. 1. If the default is to _not_ remember password: a) and you don't want to remember it -> you do nothing b) and you want to remember it -> you check it, but only once 2. If the default is to remember the password: a) and you don't want to remember it -> you uncheck it every time you insert the device b) and you want to remember it -> you do nothing 2.a) use case requires much more energy than 1.b) use case. It also creates annoyance feeling, you have to do it every time.
Created attachment 216773 [details] [review] mount-operation: turn the passphrase prompt into a dialog Instead of a notification. This also adds space for a checkbox allowing to remember the passphrase.
Created attachment 216774 [details] [review] automount: re-use the same dialog when passphrase doesn't match Wait until the completion of the mount operation before dismissing the passphrase dialog, so in case it fails, we can re-use the same dialog with an error message (like e.g. PolicyKit auth dialogs) instead of showing a brand new one.
Created attachment 216864 [details] [review] mount-operation: turn the passphrase prompt into a dialog -- Fixes a rebase leftover with importing checkBox.js
Created attachment 216865 [details] [review] automount: re-use the same dialog when passphrase doesn't match -- Fixes some issues of dialogs not always properly closing when the operation was aborted underway.
Review of attachment 216865 [details] [review]: ::: js/ui/automountManager.js @@ +267,3 @@ // FIXME: needs proper error code handling instead of this // See https://bugzilla.gnome.org/show_bug.cgi?id=591480 + if (string.indexOf('No key available with this passphrase') != -1) { This has been fixed. @@ +286,3 @@ + let existingDialog = volume._operation ? volume._operation.borrowDialog() : null; + let operation = new ShellMountOperation.ShellMountOperation( + volume, { existingDialog: existingDialog }); This isn't the indentation style we use. ::: js/ui/shellMountOperation.js @@ +125,3 @@ + return; + + this._existingDialog.close(global.get_current_time()); By default, it will default to global.get_current_time(); -- you don't have to pass it. @@ +194,1 @@ Lang.bind(this, function(object, choice) { This needs to be reindented.
Review of attachment 216864 [details] [review]: Looks fine.
Created attachment 216869 [details] [review] automount: re-use the same dialog when passphrase doesn't match --- Fixed the review comments; unfortunately that FIXME can't be really fixed yet.
Created attachment 216870 [details] [review] autorun: use GError.matches() to fix some FIXMEs Discard FAILED_HANDLED errors, now that we can detect them from JS.
Created attachment 216871 [details] [review] mount-operation: don't use global.get_current_time() If we don't specify it, it will be picked up by default.
Created attachment 216872 [details] [review] mount-operation: fix indentation for some callbacks Nothing to see here, move along.
Created attachment 216887 [details] [review] autorun: use GError.matches() to fix some FIXMEs --- Fixes dialog not closing for FAILED_HANDLED case
Review of attachment 216869 [details] [review]: Looks fine.
Review of attachment 216871 [details] [review]: Sure as well.
Review of attachment 216887 [details] [review]: Cool beans.
Review of attachment 216872 [details] [review]: I wonder how many synonyms for "looks fine" there are.
Attachment 216864 [details] pushed as d1815a3 - mount-operation: turn the passphrase prompt into a dialog Attachment 216869 [details] pushed as 66af7de - automount: re-use the same dialog when passphrase doesn't match Attachment 216871 [details] pushed as 5b7e4bb - mount-operation: don't use global.get_current_time() Attachment 216872 [details] pushed as 594c317 - mount-operation: fix indentation for some callbacks Attachment 216887 [details] pushed as f7c0f82 - autorun: use GError.matches() to fix some FIXMEs Pushed to master.