don't ask os info when we are invisible. For #1964

This commit is contained in:
Yann Leboulanger 2006-08-21 19:54:09 +00:00
parent 00ee3a62d5
commit 3175c9113a
2 changed files with 8 additions and 3 deletions

View File

@ -880,6 +880,10 @@ class Connection(ConnectionHandlers):
def request_os_info(self, jid, resource):
if not self.connection:
return
# If we are invisible, do not request
if self.connected == gajim.SHOW_LIST.index('invisible'):
self.dispatch('OS_INFO', (jid, resource, _('Not fetched because of invisible status'), _('Not fetched because of invisible status')))
return
to_whom_jid = jid
if resource:
to_whom_jid += '/' + resource

View File

@ -372,8 +372,8 @@ class VcardWindow:
# Request os info in contact is connected
if self.contact.show not in ('offline', 'error'):
gajim.connections[self.account].request_os_info(self.contact.jid,
self.contact.resource)
gobject.idle_add(gajim.connections[self.account].request_os_info,
self.contact.jid, self.contact.resource)
self.os_info = {0: {'resource': self.contact.resource, 'client': '',
'os': ''}}
i = 1
@ -386,7 +386,8 @@ class VcardWindow:
uf_resources += '\n' + c.resource + \
_(' resource with priority ') + unicode(c.priority)
if c.show not in ('offline', 'error'):
gajim.connections[self.account].request_os_info(c.jid,
gobject.idle_add(
gajim.connections[self.account].request_os_info, c.jid,
c.resource)
gajim.connections[self.account].request_last_status_time(c.jid,
c.resource)