[gnome-shell] Make it possible to not show the users name permanently
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Make it possible to not show the users name permanently
- Date: Sat, 24 Nov 2012 22:11:00 +0000 (UTC)
commit 855b238ec5be6ff747fd72a14f8cf1d5c8a07fa1
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Nov 17 23:51:06 2012 -0500
Make it possible to not show the users name permanently
In particular on the lock screen, this can be a privacy issue.
https://bugzilla.gnome.org/show_bug.cgi?id=688577
data/org.gnome.shell.gschema.xml.in.in | 5 +++++
js/ui/userMenu.js | 11 +++++++++--
2 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/data/org.gnome.shell.gschema.xml.in.in b/data/org.gnome.shell.gschema.xml.in.in
index eaeb01a..5e09cbd 100644
--- a/data/org.gnome.shell.gschema.xml.in.in
+++ b/data/org.gnome.shell.gschema.xml.in.in
@@ -65,6 +65,11 @@ value here is from the GsmPresenceStatus enumeration.</_summary>
menuitem in single-user, single-session situations.
</_description>
</key>
+ <key name="show-full-name" type="b">
+ <default>true</default>
+ <_summary>Show full name in the user menu</_summary>
+ <_description>Whether the users full name is shown in the user menu or not.</_description>
+ </key>
<child name="calendar" schema="org.gnome.shell.calendar"/>
<child name="recorder" schema="org.gnome.shell.recorder"/>
<child name="keybindings" schema="org.gnome.shell.keybindings"/>
diff --git a/js/ui/userMenu.js b/js/ui/userMenu.js
index ebfcb0e..dbe2ed6 100644
--- a/js/ui/userMenu.js
+++ b/js/ui/userMenu.js
@@ -27,6 +27,7 @@ const DISABLE_LOCK_SCREEN_KEY = 'disable-lock-screen';
const DISABLE_LOG_OUT_KEY = 'disable-log-out';
const LOCK_ENABLED_KEY = 'lock-enabled';
const ALWAYS_SHOW_LOG_OUT_KEY = 'always-show-log-out';
+const SHOW_FULL_NAME_KEY = 'show-full-name';
const DIALOG_ICON_SIZE = 64;
@@ -550,9 +551,12 @@ const UserMenuButton = new Lang.Class({
Lang.bind(this, this._updateSwitchUser));
this._lockdownSettings.connect('changed::' + DISABLE_LOG_OUT_KEY,
Lang.bind(this, this._updateLogout));
-
this._lockdownSettings.connect('changed::' + DISABLE_LOCK_SCREEN_KEY,
Lang.bind(this, this._updateLockScreen));
+ this._screenSaverSettings.connect('changed::' + SHOW_FULL_NAME_KEY,
+ Lang.bind(this, this._updateUserName));
+ global.settings.connect('changed::' + SHOW_FULL_NAME_KEY,
+ Lang.bind(this, this._updateUserName));
this._updateSwitchUser();
this._updateLogout();
this._updateLockScreen();
@@ -597,7 +601,10 @@ const UserMenuButton = new Lang.Class({
},
_updateUserName: function() {
- if (this._user.is_loaded)
+ let settings = global.settings;
+ if (Main.sessionMode.isLocked)
+ settings = this._screenSaverSettings;
+ if (this._user.is_loaded && settings.get_boolean(SHOW_FULL_NAME_KEY))
this._name.set_text(this._user.get_real_name());
else
this._name.set_text("");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]