2 bugs less2 bugs less

This commit is contained in:
Yann Leboulanger 2003-11-09 22:29:41 +00:00
parent 4fb271ad1f
commit d84e0444c9
2 changed files with 6 additions and 5 deletions

View File

@ -126,16 +126,15 @@ class GajimCore:
return return
#('STATUS', status) #('STATUS', status)
elif ev[0] == 'STATUS': elif ev[0] == 'STATUS':
if (ev[1] != 'offline') and (self.connected == 0): if (ev[1] != 'offline') and (self.connected == 0):
self.connect() self.connect()
elif (ev[1] == 'offline') and (self.connected == 1): elif (ev[1] == 'offline') and (self.connected == 1):
self.con.disconnect() self.con.disconnect()
self.connected = 0 self.connected = 0
return 1 if ev[1] != 'offline':
p = common.jabber.Presence() p = common.jabber.Presence()
p.setShow(ev[1]) p.setShow(ev[1])
self.con.send(p) self.con.send(p)
#('MSG', (jid, msg)) #('MSG', (jid, msg))
elif ev[0] == 'MSG': elif ev[0] == 'MSG':
msg = common.jabber.Message(ev[1][0], ev[1][1]) msg = common.jabber.Message(ev[1][0], ev[1][1])

View File

@ -338,6 +338,8 @@ class roster:
def on_status_changed(self, widget): def on_status_changed(self, widget):
self.queueOUT.put(('STATUS',widget.name)) self.queueOUT.put(('STATUS',widget.name))
if not self.showOffline:
self.treestore.clear()
def on_add(self, widget): def on_add(self, widget):
window_add = add(self) window_add = add(self)