mirror of
https://github.com/gryf/wicd.git
synced 2026-01-03 20:34:17 +01:00
experimental:
- Use gobject.timeout_add_seconds instead of gobject.timeout_add when possible - Merge some fixes from pluggablebackends - Replace os.system usage with subprocess.call.
This commit is contained in:
@@ -289,7 +289,14 @@ def main():
|
||||
|
||||
"""
|
||||
monitor = ConnectionStatus()
|
||||
gobject.timeout_add(2500, monitor.update_connection_status)
|
||||
if daemon.GetCurrentBackend() == "ioctl":
|
||||
to_time = 2.5
|
||||
else:
|
||||
to_time = 4
|
||||
try:
|
||||
gobject.timeout_add_seconds(to_time, monitor.update_connection_status)
|
||||
except:
|
||||
gobject.timeout_add(to_time * 1000, monitor.update_connection_status)
|
||||
|
||||
mainloop = gobject.MainLoop()
|
||||
mainloop.run()
|
||||
|
||||
Reference in New Issue
Block a user