reconnect only previously connected account when connection manager detect the reconnection, and with correct status message. fixes #2813

This commit is contained in:
Yann Leboulanger 2006-12-26 14:56:28 +00:00
parent 7e11bf1172
commit 6dde2b44ce
1 changed files with 6 additions and 4 deletions

View File

@ -17,13 +17,15 @@ from common import gajim
def device_now_active(self, *args): def device_now_active(self, *args):
for connection in gajim.connections.itervalues(): for connection in gajim.connections.itervalues():
if gajim.config.get_per('accounts', connection.name, 'listen_to_network_manager') and gajim.config.get_per('accounts', connection.name, 'sync_with_global_status'): if gajim.config.get_per('accounts', connection.name,
connection.change_status('online', '') 'listen_to_network_manager') and connection.time_to_reconnect:
connection._reconnect()
def device_no_longer_active(self, *args): def device_no_longer_active(self, *args):
for connection in gajim.connections.itervalues(): for connection in gajim.connections.itervalues():
if gajim.config.get_per('accounts', connection.name, 'listen_to_network_manager') and gajim.config.get_per('accounts', connection.name, 'sync_with_global_status'): if gajim.config.get_per('accounts', connection.name,
connection.change_status('offline', '') 'listen_to_network_manager') and connection.connected > 1:
connection._disconnectedReconnCB()
from common.dbus_support import system_bus from common.dbus_support import system_bus