fix(controlcenter): WiFi icon signal and accessor
- Change notify::wireless-enabled to notify::enabled - Change .wireless_enabled to .enabled
This commit is contained in:
1 file changed
+2
-4
@@ -903,16 +903,14 @@ class ModusControlCenter(AppletWindow):
|
|||||||
self._signal_connections.append(
|
self._signal_connections.append(
|
||||||
(
|
(
|
||||||
self.wifi_service,
|
self.wifi_service,
|
||||||
self.wifi_service.connect(
|
self.wifi_service.connect("notify::enabled", self.update_wifi_icon),
|
||||||
"notify::wireless-enabled", self.update_wifi_icon
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
def update_wifi_icon(self, *_):
|
def update_wifi_icon(self, *_):
|
||||||
try:
|
try:
|
||||||
if self.wifi_service and hasattr(self, "wifi_svg"):
|
if self.wifi_service and hasattr(self, "wifi_svg"):
|
||||||
is_enabled = self.wifi_service.wireless_enabled
|
is_enabled = self.wifi_service.enabled
|
||||||
self.wifi_svg.dynamic_file(
|
self.wifi_svg.dynamic_file(
|
||||||
"applets/wifi.svg" if is_enabled else "applets/wifi-off.svg"
|
"applets/wifi.svg" if is_enabled else "applets/wifi-off.svg"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in new issue
Block a user