Add a setting for the default state of 'Remember Password'
https://bugzilla.gnome.org/show_bug.cgi?id=688039
This commit is contained in:
parent
3d329cdf2d
commit
71ad39b6e3
@ -70,6 +70,16 @@ value here is from the GsmPresenceStatus enumeration.</_summary>
|
|||||||
<_summary>Show full name in the user menu</_summary>
|
<_summary>Show full name in the user menu</_summary>
|
||||||
<_description>Whether the users full name is shown in the user menu or not.</_description>
|
<_description>Whether the users full name is shown in the user menu or not.</_description>
|
||||||
</key>
|
</key>
|
||||||
|
<key name="remember-mount-password" type="b">
|
||||||
|
<default>false</default>
|
||||||
|
<_summary>Whether to remember password for mounting encrypted or remote filesystems</_summary>
|
||||||
|
<_description>
|
||||||
|
The shell will request a password when an encrypted device or a
|
||||||
|
remote filesystem is mounted. If the password can be saved for
|
||||||
|
future use a 'Remember Password' checkbox will be present.
|
||||||
|
This key sets the default state of the checkbox.
|
||||||
|
</_description>
|
||||||
|
</key>
|
||||||
<child name="calendar" schema="org.gnome.shell.calendar"/>
|
<child name="calendar" schema="org.gnome.shell.calendar"/>
|
||||||
<child name="recorder" schema="org.gnome.shell.recorder"/>
|
<child name="recorder" schema="org.gnome.shell.recorder"/>
|
||||||
<child name="keybindings" schema="org.gnome.shell.keybindings"/>
|
<child name="keybindings" schema="org.gnome.shell.keybindings"/>
|
||||||
|
@ -19,6 +19,8 @@ const ShellEntry = imports.ui.shellEntry;
|
|||||||
|
|
||||||
const LIST_ITEM_ICON_SIZE = 48;
|
const LIST_ITEM_ICON_SIZE = 48;
|
||||||
|
|
||||||
|
const REMEMBER_MOUNT_PASSWORD_KEY = 'remember-mount-password';
|
||||||
|
|
||||||
/* ------ Common Utils ------- */
|
/* ------ Common Utils ------- */
|
||||||
function _setLabelText(label, text) {
|
function _setLabelText(label, text) {
|
||||||
if (text) {
|
if (text) {
|
||||||
@ -387,7 +389,8 @@ const ShellMountPasswordDialog = new Lang.Class({
|
|||||||
if (flags & Gio.AskPasswordFlags.SAVING_SUPPORTED) {
|
if (flags & Gio.AskPasswordFlags.SAVING_SUPPORTED) {
|
||||||
this._rememberChoice = new CheckBox.CheckBox();
|
this._rememberChoice = new CheckBox.CheckBox();
|
||||||
this._rememberChoice.getLabelActor().text = _("Remember Password");
|
this._rememberChoice.getLabelActor().text = _("Remember Password");
|
||||||
this._rememberChoice.actor.checked = true;
|
this._rememberChoice.actor.checked =
|
||||||
|
global.settings.get_boolean(REMEMBER_MOUNT_PASSWORD_KEY);
|
||||||
this._messageBox.add(this._rememberChoice.actor);
|
this._messageBox.add(this._rememberChoice.actor);
|
||||||
} else {
|
} else {
|
||||||
this._rememberChoice = null;
|
this._rememberChoice = null;
|
||||||
@ -419,6 +422,8 @@ const ShellMountPasswordDialog = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_onEntryActivate: function() {
|
_onEntryActivate: function() {
|
||||||
|
global.settings.set_boolean(REMEMBER_MOUNT_PASSWORD_KEY,
|
||||||
|
this._rememberChoice && this._rememberChoice.actor.checked);
|
||||||
this.emit('response', 1,
|
this.emit('response', 1,
|
||||||
this._passwordEntry.get_text(),
|
this._passwordEntry.get_text(),
|
||||||
this._rememberChoice &&
|
this._rememberChoice &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user