user-menu: Rename "Do Not Disturb" to "Notifications"

At least for the foreseeable future, the gnome-session desktop
presence won't be used for anything but suppressing (non-urgent)
notifications. To clarify this behavior, rename the "Do Not Disturb"
switch to "Notifications" (and adjust the switch logic accordingly).

https://bugzilla.gnome.org/show_bug.cgi?id=652718
This commit is contained in:
Florian Müllner 2011-09-04 18:39:37 +02:00
parent f326dde09c
commit a5d0ac7955

View File

@ -522,8 +522,8 @@ UserMenuButton.prototype = {
}, },
_updateSwitch: function(presence, status) { _updateSwitch: function(presence, status) {
let active = status == GnomeSession.PresenceStatus.BUSY; let active = status == GnomeSession.PresenceStatus.AVAILABLE;
this._dontDisturbSwitch.setToggleState(active); this._notificationsSwitch.setToggleState(active);
}, },
_updatePresenceIcon: function(accountMgr, presence, status, message) { _updatePresenceIcon: function(accountMgr, presence, status, message) {
@ -548,10 +548,10 @@ UserMenuButton.prototype = {
item.connect('activate', Lang.bind(this, this._onMyAccountActivate)); item.connect('activate', Lang.bind(this, this._onMyAccountActivate));
this.menu.addMenuItem(item); this.menu.addMenuItem(item);
item = new PopupMenu.PopupSwitchMenuItem(_("Do Not Disturb")); item = new PopupMenu.PopupSwitchMenuItem(_("Notifications"));
item.connect('activate', Lang.bind(this, this._updatePresenceStatus)); item.connect('activate', Lang.bind(this, this._updatePresenceStatus));
this.menu.addMenuItem(item); this.menu.addMenuItem(item);
this._dontDisturbSwitch = item; this._notificationsSwitch = item;
item = new PopupMenu.PopupSeparatorMenuItem(); item = new PopupMenu.PopupSeparatorMenuItem();
this.menu.addMenuItem(item); this.menu.addMenuItem(item);
@ -594,8 +594,8 @@ UserMenuButton.prototype = {
}, },
_updatePresenceStatus: function(item, event) { _updatePresenceStatus: function(item, event) {
let status = item.state ? GnomeSession.PresenceStatus.BUSY let status = item.state ? GnomeSession.PresenceStatus.AVAILABLE
: GnomeSession.PresenceStatus.AVAILABLE; : GnomeSession.PresenceStatus.BUSY;
this._presence.setStatus(status); this._presence.setStatus(status);
}, },