add support Network Manager 0.9 (NM_STATE_CONNECTED_GLOBAL = 70. A network device is connected, with global network connectivity.)

This commit is contained in:
Denis Fomin 2012-10-18 00:36:57 +04:00
parent 3a92d05544
commit f4a79d8848
1 changed files with 3 additions and 2 deletions

View File

@ -45,9 +45,10 @@ def device_no_longer_active(self, *args):
def state_changed(state):
"""
For Network Manager 0.7
For Network Manager 0.7 - 0.9
"""
if props.Get("org.freedesktop.NetworkManager", "State") == 3:
nm_state = props.Get("org.freedesktop.NetworkManager", "State")
if nm_state == 3 or nm_state == 70:
for connection in gajim.connections.itervalues():
if gajim.config.get_per('accounts', connection.name,
'listen_to_network_manager') and connection.time_to_reconnect: