diff --git a/data/network.metainfo.xml.in b/data/network.metainfo.xml.in
index 91b91bfa..1ff6152b 100644
--- a/data/network.metainfo.xml.in
+++ b/data/network.metainfo.xml.in
@@ -33,6 +33,7 @@
Minor updates
- Provide description text on the VPN page
+ - Show connected Wi-Fi network name in sidebar
- Updated translations
diff --git a/src/Views/WifiPage.vala b/src/Views/WifiPage.vala
index e5a2c976..0202b986 100644
--- a/src/Views/WifiPage.vala
+++ b/src/Views/WifiPage.vala
@@ -427,6 +427,37 @@ public class Network.WifiInterface : Network.Widgets.Page {
}
}
+ protected override void update_status () {
+ switch (device.state) {
+ case ACTIVATED:
+ status_type = SUCCESS;
+ break;
+ case DISCONNECTED:
+ status_type = OFFLINE;
+ break;
+ case FAILED:
+ status_type = ERROR;
+ break;
+ default:
+ status_type = WARNING;
+ break;
+ }
+
+ switch (device.state) {
+ case UNAVAILABLE:
+ status = _("Disabled");
+ break;
+ case ACTIVATED:
+ status = NM.Utils.ssid_to_utf8 (
+ ((NM.DeviceWifi) device).active_access_point.get_ssid ().get_data ()
+ );
+ break;
+ default:
+ status = Utils.state_to_string (device.state);
+ break;
+ }
+ }
+
protected override void update_switch () {
status_switch.active = !software_locked;
}
diff --git a/src/Widgets/Page.vala b/src/Widgets/Page.vala
index 1d737939..84d056b4 100644
--- a/src/Widgets/Page.vala
+++ b/src/Widgets/Page.vala
@@ -59,7 +59,7 @@ namespace Network.Widgets {
show_end_title_buttons = true;
}
- private void update_status () {
+ public virtual void update_status () {
switch (device.state) {
case ACTIVATED:
status_type = SUCCESS;
@@ -75,11 +75,7 @@ namespace Network.Widgets {
break;
}
- if (device is NM.DeviceWifi && state == UNAVAILABLE) {
- status = _("Disabled");
- } else {
- status = Utils.state_to_string (device.state);
- }
+ status = Utils.state_to_string (device.state);
}
public virtual void update () {