Skip to content

Commit

Permalink
Gnome 3.18 does not have status. Set label in this case.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomflannaghan committed Oct 23, 2015
1 parent 89905ec commit edf6dd3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,16 @@ const ProxySwitcher = new Lang.Class({

refresh: function() {
// run every time settings have changed. Keeps the menu status in sync.
this._switcherMenu.status.text = this._stateText[this._mode];
if ('status' in this._switcherMenu) {
// Older versions of Gnome have a status label
this._switcherMenu.status.text = this._stateText[this._mode];
}
else {
// Gnome 3.18 doesn't have status so set the main label
this._switcherMenu.label.text =
_("Proxy") + " " + this._stateText[this._mode];
}

for (var state in this._items) {
this._items[state].setOrnament(
(state == this._mode) ? PopupMenu.Ornament.DOT
Expand Down

0 comments on commit edf6dd3

Please sign in to comment.