From 693aad9b19a3f357c2397c41a3f05ad70f99a5b9 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 25 May 2005 18:25:39 +0000 Subject: [PATCH] show transports rows when we are online, and hide them when we are offline --- src/common/xmpp/auth.py | 3 +++ src/roster_window.py | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/common/xmpp/auth.py b/src/common/xmpp/auth.py index 0e4cfbdf3..b96d09af4 100644 --- a/src/common/xmpp/auth.py +++ b/src/common/xmpp/auth.py @@ -98,6 +98,9 @@ class SASL(PlugIn): """ Implements SASL authentication. """ def plugin(self,owner): if not self._owner.Dispatcher.Stream._document_attrs.has_key('version'): self.startsasl='not-supported' + elif self._owner.Dispatcher.Stream.features: + try: self.FeaturesHandler(self._owner.Dispatcher,self._owner.Dispatcher.Stream.features) + except NodeProcessed: pass else: self.startsasl=None def auth(self,username,password): diff --git a/src/roster_window.py b/src/roster_window.py index 4f1841c6a..78c6a9332 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -116,7 +116,8 @@ class Roster_window: user.groups.append('General') if (user.show == 'offline' or user.show == 'error') and \ - not showOffline and not 'Transports' in user.groups and \ + not showOffline and (not 'Transports' in user.groups or \ + gajim.connections[account].connected < 2) and \ not self.plugin.queues[account].has_key(user.jid): return @@ -152,6 +153,8 @@ class Roster_window: def really_remove_user(self, user, account): if user.jid in self.newly_added[account]: return + if user.jid.find('@') < 1 and gajim.connections[account].connected > 1: # It's an agent + return if user.jid in self.to_be_removed[account]: self.to_be_removed[account].remove(user.jid) if gajim.config.get('showoffline'):