“Disconnected from server” message is now an error only if we didn't ask for it

This commit is contained in:
Florent Le Coz 2015-04-13 18:07:25 +02:00
parent 91fde24388
commit 5cc714a327

View file

@ -923,7 +923,8 @@ def on_disconnected(self, event):
roster.modified()
for tab in self.get_tabs(tabs.MucTab):
tab.disconnect()
self.information(_("Disconnected from server."), _('Error'))
msg_typ = _('Error') if not self.legitimate_disconnect else _('Info')
self.information(_("Disconnected from server."), msg_typ)
if not self.legitimate_disconnect and config.get('auto_reconnect', True):
self.information(_("Auto-reconnecting."), _('Info'))
self.xmpp.connect()