mirror of
https://github.com/gryf/wicd.git
synced 2026-02-19 08:25:47 +01:00
Moved translations out of translations.py, re-designed l10n system a bit
This commit is contained in:
@@ -57,7 +57,7 @@ from wicd import wpath
|
||||
from wicd import networking
|
||||
from wicd import misc
|
||||
from wicd import wnettools
|
||||
from wicd.misc import noneToBlankString
|
||||
from wicd.misc import noneToBlankString, _status_dict
|
||||
from wicd.logfile import ManagedStdio
|
||||
from wicd.configmanager import ConfigManager
|
||||
|
||||
@@ -1176,15 +1176,24 @@ class WirelessDaemon(dbus.service.Object):
|
||||
return ip
|
||||
|
||||
@dbus.service.method('org.wicd.daemon.wireless')
|
||||
def CheckWirelessConnectingMessage(self):
|
||||
""" Returns the wireless interface's status message. """
|
||||
if not self.wifi.connecting_thread == None:
|
||||
def CheckWirelessConnectingStatus(self):
|
||||
""" Returns the wireless interface's status code. """
|
||||
if self.wifi.connecting_thread:
|
||||
essid = self.wifi.connecting_thread.network["essid"]
|
||||
stat = self.wifi.connecting_thread.GetStatus()
|
||||
return essid, stat
|
||||
else:
|
||||
return False
|
||||
|
||||
@dbus.service.method('org.wicd.daemon.wireless')
|
||||
def CheckWirelessConnectingMessage(self):
|
||||
""" Returns the wireless interface's status message. """
|
||||
if self.wifi.connecting_thread:
|
||||
essid, stat = self.CheckWirelessConnectingStatus()
|
||||
return essid, _status_dict[stat]
|
||||
else:
|
||||
return False
|
||||
|
||||
@dbus.service.method('org.wicd.daemon.wireless')
|
||||
def ReadWirelessNetworkProfile(self, id):
|
||||
""" Reads in wireless profile as the active network """
|
||||
@@ -1372,11 +1381,19 @@ class WiredDaemon(dbus.service.Object):
|
||||
else:
|
||||
return False
|
||||
|
||||
@dbus.service.method('org.wicd.daemon.wired')
|
||||
def CheckWiredConnectingStatus(self):
|
||||
"""Returns the wired interface's status code. '"""
|
||||
if self.wired.connecting_thread:
|
||||
return self.wired.connecting_thread.GetStatus()
|
||||
else:
|
||||
return False
|
||||
|
||||
@dbus.service.method('org.wicd.daemon.wired')
|
||||
def CheckWiredConnectingMessage(self):
|
||||
""" Returns the wired interface's status message. """
|
||||
if self.wired.connecting_thread:
|
||||
return self.wired.connecting_thread.GetStatus()
|
||||
return _status_dict(self.CheckWiredConnectingStatus())
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user