diff --git a/core/core.py b/core/core.py index 6dcaf758d..de1bd21c6 100644 --- a/core/core.py +++ b/core/core.py @@ -126,16 +126,15 @@ class GajimCore: return #('STATUS', status) elif ev[0] == 'STATUS': - if (ev[1] != 'offline') and (self.connected == 0): self.connect() elif (ev[1] == 'offline') and (self.connected == 1): self.con.disconnect() self.connected = 0 - return 1 - p = common.jabber.Presence() - p.setShow(ev[1]) - self.con.send(p) + if ev[1] != 'offline': + p = common.jabber.Presence() + p.setShow(ev[1]) + self.con.send(p) #('MSG', (jid, msg)) elif ev[0] == 'MSG': msg = common.jabber.Message(ev[1][0], ev[1][1]) diff --git a/plugins/gtkgui.py b/plugins/gtkgui.py index b43e72fda..4a3ef90ee 100644 --- a/plugins/gtkgui.py +++ b/plugins/gtkgui.py @@ -338,6 +338,8 @@ class roster: def on_status_changed(self, widget): self.queueOUT.put(('STATUS',widget.name)) + if not self.showOffline: + self.treestore.clear() def on_add(self, widget): window_add = add(self)