status: Refine system status menu

* switch to a one-column layout (and adjust strings/widths
   accordingly
 * remove separator before system menu
 * add link to account settings to user submenu for consistency

https://bugzilla.gnome.org/show_bug.cgi?id=751377
This commit is contained in:
Florian Müllner
2015-08-06 11:19:37 +02:00
parent 5a0b209663
commit fa0e54edbb
10 changed files with 65 additions and 60 deletions

View File

@ -62,13 +62,13 @@ const Indicator = new Lang.Class({
this._indicator = this._addIndicator();
this._indicator.icon_name = 'find-location-symbolic';
this._item = new PopupMenu.PopupSubMenuMenuItem(_("Location"), true);
this._item = new PopupMenu.PopupSubMenuMenuItem('', true);
this._item.icon.icon_name = 'find-location-symbolic';
this._agent = Gio.DBusExportedObject.wrapJSObject(AgentIface, this);
this._agent.export(Gio.DBus.system, '/org/freedesktop/GeoClue2/Agent');
this._item.status.text = _("Enabled");
this._item.label.text = _("Location Enabled");
this._onOffAction = this._item.menu.addAction(_("Disable"), Lang.bind(this, this._onOnOffAction));
this._item.menu.addSettingsAction(_("Privacy Settings"), 'gnome-privacy-panel.desktop');
@ -173,10 +173,11 @@ const Indicator = new Lang.Class({
_updateMenuLabels: function() {
if (this._settings.get_boolean(ENABLED)) {
this._item.status.text = this._indicator.visible ? _("In Use") : _("Enabled");
this._item.label.text = this._indicator.visible ? _("Location In Use")
: _("Location Enabled");
this._onOffAction.label.text = _("Disable");
} else {
this._item.status.text = _("Disabled");
this._item.label.text = _("Location Disabled");
this._onOffAction.label.text = _("Enable");
}
},