diff --git a/net_speed.js b/net_speed.js index 54f5ee4..848e386 100644 --- a/net_speed.js +++ b/net_speed.js @@ -366,12 +366,14 @@ var NetSpeed = class NetSpeed { this._saving = 0; this._load(); + this._updateDefaultGw(); + this._changed = this._setting.connect('changed', Lang.bind(this, this._reload)); this._timerid = Mainloop.timeout_add(this.timer, Lang.bind(this, this._update)); this._status_icon = new NetSpeedStatusIcon.NetSpeedStatusIcon(this); let placement = this._setting.get_string('placement'); Panel.addToStatusArea('netspeed', this._status_icon, 0, placement); - this._updateDefaultGw(); + } diff --git a/prefs.js b/prefs.js index 837ffc1..74330aa 100644 --- a/prefs.js +++ b/prefs.js @@ -164,7 +164,7 @@ const App = class NetSpeed_App { let active = 0; if (activeDev == "all") { active = 0; - } else if (activeDev == "defaultGw") { + } else if (activeDev == "defaultGW") { active = 1; } else { for (let i = 0; i < this._devices.length; ++i) {