handle error status (need an error icon)
This commit is contained in:
parent
96d9ac8e2e
commit
f366cd3db6
|
@ -147,10 +147,9 @@ class GajimCore:
|
|||
self.hub.sendPlugin('UNSUBSCRIBED', self.connexions[con], \
|
||||
prs.getFrom().getBasic())
|
||||
elif type == 'error':
|
||||
print "\n\n******** ERROR *******"
|
||||
errmsg = prs._node.kids[0].getData()
|
||||
self.hub.sendPlugin('NOTIFY', self.connexions[con], \
|
||||
(prs.getFrom().getBasic(), 'offline', errmsg, \
|
||||
(prs.getFrom().getBasic(), 'error', errmsg, \
|
||||
prs.getFrom().getResource()))
|
||||
# END presenceCB
|
||||
|
||||
|
@ -160,6 +159,7 @@ class GajimCore:
|
|||
if self.connected[self.connexions[con]] == 1:
|
||||
self.connected[self.connexions[con]] = 0
|
||||
con.disconnect()
|
||||
del self.connexions[con]
|
||||
self.hub.sendPlugin('STATUS', self.connexions[con], 'offline')
|
||||
# END disconenctedCB
|
||||
|
||||
|
@ -175,7 +175,6 @@ class GajimCore:
|
|||
connection=common.xmlstream.TCP, port=5222)
|
||||
#debug = [common.jabber.DBG_ALWAYS], log = sys.stderr, \
|
||||
#connection=common.xmlstream.TCP_SSL, port=5223)
|
||||
self.connexions[con] = account
|
||||
try:
|
||||
con.connect()
|
||||
except IOError, e:
|
||||
|
@ -206,6 +205,7 @@ class GajimCore:
|
|||
self.hub.sendPlugin('ROSTER', account, roster)
|
||||
con.sendInitPresence()
|
||||
self.hub.sendPlugin('STATUS', account, 'online')
|
||||
self.connexions[con] = account
|
||||
self.connected[account] = 1
|
||||
return con
|
||||
else:
|
||||
|
|
|
@ -1139,7 +1139,8 @@ class roster_Window:
|
|||
else:
|
||||
user.groups.append('general')
|
||||
|
||||
if user.show == 'offline' and not showOffline and not 'Agents' in user.groups:
|
||||
if (user.show == 'offline' or user.show == 'error') and not showOffline\
|
||||
and not 'Agents' in user.groups:
|
||||
return
|
||||
|
||||
model = self.tree.get_model()
|
||||
|
@ -1251,7 +1252,7 @@ class roster_Window:
|
|||
self.add_user_to_roster(user, account)
|
||||
else:
|
||||
model = self.tree.get_model()
|
||||
if show == 'offline' and not showOffline:
|
||||
if (show == 'offline' or show == 'error') and not showOffline:
|
||||
self.remove_user(user, account)
|
||||
else:
|
||||
for i in iters:
|
||||
|
@ -1622,7 +1623,7 @@ class roster_Window:
|
|||
iconstyle = 'sun'
|
||||
self.path = 'plugins/gtkgui/icons/' + iconstyle + '/'
|
||||
self.pixbufs = {}
|
||||
for state in ('online', 'away', 'xa', 'dnd', 'offline', \
|
||||
for state in ('online', 'away', 'xa', 'dnd', 'offline', 'error', \
|
||||
'requested', 'message', 'opened', 'closed', 'not in list'):
|
||||
# try to open a pixfile with the correct method
|
||||
files = []
|
||||
|
|
Loading…
Reference in New Issue