After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 674962 - Shell's GMountOperation should be modal and support GPasswordSave
Shell's GMountOperation should be modal and support GPasswordSave
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2012-04-27 14:37 UTC by David Zeuthen (not reading bugmail)
Modified: 2012-06-21 04:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
mount-operation: turn the passphrase prompt into a dialog (10.38 KB, patch)
2012-06-20 00:42 UTC, Cosimo Cecchi
none Details | Review
automount: re-use the same dialog when passphrase doesn't match (9.81 KB, patch)
2012-06-20 00:42 UTC, Cosimo Cecchi
none Details | Review
mount-operation: turn the passphrase prompt into a dialog (10.51 KB, patch)
2012-06-20 18:53 UTC, Cosimo Cecchi
committed Details | Review
automount: re-use the same dialog when passphrase doesn't match (10.35 KB, patch)
2012-06-20 18:54 UTC, Cosimo Cecchi
reviewed Details | Review
automount: re-use the same dialog when passphrase doesn't match (10.69 KB, patch)
2012-06-20 20:43 UTC, Cosimo Cecchi
committed Details | Review
autorun: use GError.matches() to fix some FIXMEs (3.29 KB, patch)
2012-06-20 20:43 UTC, Cosimo Cecchi
none Details | Review
mount-operation: don't use global.get_current_time() (2.08 KB, patch)
2012-06-20 20:44 UTC, Cosimo Cecchi
committed Details | Review
mount-operation: fix indentation for some callbacks (2.95 KB, patch)
2012-06-20 20:44 UTC, Cosimo Cecchi
committed Details | Review
autorun: use GError.matches() to fix some FIXMEs (3.33 KB, patch)
2012-06-21 02:22 UTC, Cosimo Cecchi
committed Details | Review

Description David Zeuthen (not reading bugmail) 2012-04-27 14:37:46 UTC
This was discussed in bug 674161 comment 21 - filing here.
Comment 1 Kamil Páral 2012-04-27 14:47:22 UTC
(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.
Comment 2 Cosimo Cecchi 2012-06-20 00:42:06 UTC
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.
Comment 3 Cosimo Cecchi 2012-06-20 00:42:10 UTC
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.
Comment 4 Cosimo Cecchi 2012-06-20 18:53:46 UTC
Created attachment 216864 [details] [review]
mount-operation: turn the passphrase prompt into a dialog

--

Fixes a rebase leftover with importing checkBox.js
Comment 5 Cosimo Cecchi 2012-06-20 18:54:19 UTC
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.
Comment 6 Jasper St. Pierre (not reading bugmail) 2012-06-20 19:32:25 UTC
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.
Comment 7 Jasper St. Pierre (not reading bugmail) 2012-06-20 19:33:01 UTC
Review of attachment 216864 [details] [review]:

Looks fine.
Comment 8 Cosimo Cecchi 2012-06-20 20:43:51 UTC
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.
Comment 9 Cosimo Cecchi 2012-06-20 20:43:57 UTC
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.
Comment 10 Cosimo Cecchi 2012-06-20 20:44:01 UTC
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.
Comment 11 Cosimo Cecchi 2012-06-20 20:44:05 UTC
Created attachment 216872 [details] [review]
mount-operation: fix indentation for some callbacks

Nothing to see here, move along.
Comment 12 Cosimo Cecchi 2012-06-21 02:22:24 UTC
Created attachment 216887 [details] [review]
autorun: use GError.matches() to fix some FIXMEs

---

Fixes dialog not closing for FAILED_HANDLED case
Comment 13 Jasper St. Pierre (not reading bugmail) 2012-06-21 03:17:06 UTC
Review of attachment 216869 [details] [review]:

Looks fine.
Comment 14 Jasper St. Pierre (not reading bugmail) 2012-06-21 03:17:19 UTC
Review of attachment 216871 [details] [review]:

Sure as well.
Comment 15 Jasper St. Pierre (not reading bugmail) 2012-06-21 03:17:49 UTC
Review of attachment 216887 [details] [review]:

Cool beans.
Comment 16 Jasper St. Pierre (not reading bugmail) 2012-06-21 03:18:45 UTC
Review of attachment 216872 [details] [review]:

I wonder how many synonyms for "looks fine" there are.
Comment 17 Cosimo Cecchi 2012-06-21 04:16:21 UTC
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.