Commit 8f4c0fc2 authored by Jan Grulich's avatar Jan Grulich
Browse files

Display wireless icon with full signal for shared connections

CCBUG:325945
parent dfe13270
......@@ -151,6 +151,17 @@ QString ModelItem::icon() const
break;
case NetworkManager::ConnectionSettings::Wireless:
if (m_signal == 0 ) {
if (!m_connectionPath.isEmpty()) {
NetworkManager::Connection::Ptr con = NetworkManager::findConnection(m_connectionPath);
if (con) {
NetworkManager::WirelessSetting::Ptr wirelessSetting;
wirelessSetting = con->settings()->setting(NetworkManager::Setting::Wireless).dynamicCast<NetworkManager::WirelessSetting>();
if (wirelessSetting && (wirelessSetting->mode() == NetworkManager::WirelessSetting::Adhoc ||
wirelessSetting->mode() == NetworkManager::WirelessSetting::Ap)) {
return "network-wireless-100";
}
}
}
return "network-wireless-00";
} else if (m_signal < 20) {
return "network-wireless-20";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment