diff options
Diffstat (limited to 'invest-applet/invest/networkmanager.py')
-rw-r--r-- | invest-applet/invest/networkmanager.py | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/invest-applet/invest/networkmanager.py b/invest-applet/invest/networkmanager.py deleted file mode 100644 index 446e0429..00000000 --- a/invest-applet/invest/networkmanager.py +++ /dev/null @@ -1,26 +0,0 @@ -import mate_invest -from gi.repository import Gio - -class NetworkManager: - def __init__(self): - self.network_available = True - self.statechange_callback = None - - self.monitor = Gio.NetworkMonitor.get_default() - self.monitor.connect('network-changed', self.on_network_changed) - - def online(self): - return self.network_available - - def offline(self): - return not self.online() - - # the signal handler for signals from the network manager - def on_network_changed(self, monitor, available): - self.network_available = available - # notify about state change - if self.statechange_callback != None: - self.statechange_callback() - - def set_statechange_callback(self,handler): - self.statechange_callback = handler |