1
0
mirror of https://github.com/gryf/wicd.git synced 2026-01-04 21:04:15 +01:00

Only show valid wpa_supplicant drivers in the GUI.

Don't needlessly created PreferenceDialog objects.
Use dbus signals to alert the UI that the daemon is back up, instead of polling.
This commit is contained in:
Dan O'Reilly
2008-12-16 00:48:47 -05:00
parent 318024a123
commit ba3bc2afc2
8 changed files with 149 additions and 118 deletions

View File

@@ -113,7 +113,8 @@ class WicdDaemon(dbus.service.Object):
self.wired.wiface = self.wifi.wiface
signal.signal(signal.SIGTERM, self.DaemonClosing)
self.DaemonStarting()
# Scan since we just got started
if auto_connect:
print "autoconnecting if needed...", str(self.GetWirelessInterface())
@@ -705,6 +706,11 @@ class WicdDaemon(dbus.service.Object):
print 'calling wired profile chooser'
self.SetNeedWiredProfileChooser(True)
@dbus.service.signal(dbus_interface="org.wicd.daemon", signature='')
def DaemonStarting(self):
""" Emits a signa indicating the daemon is starting. """
pass
@dbus.service.signal(dbus_interface='org.wicd.daemon', signature='')
def DaemonClosing(self):
""" Emits a signal indicating the daemon will be closing. """
@@ -1122,6 +1128,11 @@ class WirelessDaemon(dbus.service.Object):
essid_key = "essid:" + str(self.LastScan[networkid])
self.config.remove_section(essid_key)
@dbus.service.method('org.wicd.daemon.wireless')
def GetWpaSupplicantDrivers(self, drivers):
""" Returns all valid wpa_supplicant drivers in a given list. """
return self.wifi.GetWpaSupplicantDrivers(drivers)
@dbus.service.method('org.wicd.daemon.wireless')
def ReloadConfig(self):
""" Reloads the active config file. """