From 31a5574eab9942e2af20018877ef603e62abc277 Mon Sep 17 00:00:00 2001 From: c84c <616846+c84c@users.noreply.github.com> Date: Sun, 22 Jan 2023 19:17:47 +0100 Subject: [PATCH] fix: typo in prefs defaultGW const and call _updateDefaultGw before loading NetSpeedStatusIcon --- net_speed.js | 4 +++- prefs.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/net_speed.js b/net_speed.js index 83162ca..ac9b354 100644 --- a/net_speed.js +++ b/net_speed.js @@ -365,12 +365,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) {