some bugfix when modifying account
This commit is contained in:
parent
5e47ab69ed
commit
27c5cd358e
|
@ -323,12 +323,11 @@ class GajimCore:
|
||||||
con.disconnect()
|
con.disconnect()
|
||||||
self.hub.sendPlugin('STATUS', ev[1], 'offline')
|
self.hub.sendPlugin('STATUS', ev[1], 'offline')
|
||||||
elif ev[2][0] != 'offline' and self.connected[ev[1]] == 1:
|
elif ev[2][0] != 'offline' and self.connected[ev[1]] == 1:
|
||||||
p = common.jabber.Presence()
|
type = 'available'
|
||||||
p.setShow(ev[2][0])
|
|
||||||
p.setStatus(ev[2][1])
|
|
||||||
if ev[2][0] == 'invisible':
|
if ev[2][0] == 'invisible':
|
||||||
p.setType('invisible')
|
type = 'invisible'
|
||||||
con.send(p)
|
prio = str(self.cfgParser.tab[ev[1]]['priority'])
|
||||||
|
con.sendPresence(type, prio, ev[2][0], ev[2][1])
|
||||||
self.hub.sendPlugin('STATUS', ev[1], ev[2][0])
|
self.hub.sendPlugin('STATUS', ev[1], ev[2][0])
|
||||||
#('MSG', account, (jid, msg))
|
#('MSG', account, (jid, msg))
|
||||||
elif ev[0] == 'MSG':
|
elif ev[0] == 'MSG':
|
||||||
|
|
|
@ -361,9 +361,8 @@ class accountPreference_Window:
|
||||||
if infos.has_key('proxyhost'):
|
if infos.has_key('proxyhost'):
|
||||||
self.xml.get_widget("entry_proxyhost").set_text(infos['proxyhost'])
|
self.xml.get_widget("entry_proxyhost").set_text(infos['proxyhost'])
|
||||||
if infos.has_key('proxyport'):
|
if infos.has_key('proxyport'):
|
||||||
# self.xml.get_widget("entry_proxyport").set_text('%i'%\
|
self.xml.get_widget("entry_proxyport").set_text(str(\
|
||||||
self.xml.get_widget("entry_proxyport").set_text(\
|
infos['proxyport']))
|
||||||
infos['proxyport'])
|
|
||||||
|
|
||||||
def on_save_clicked(self, widget):
|
def on_save_clicked(self, widget):
|
||||||
"""When save button is clicked : Save informations in config file"""
|
"""When save button is clicked : Save informations in config file"""
|
||||||
|
@ -427,19 +426,19 @@ class accountPreference_Window:
|
||||||
del self.plugin.roster.contacts[self.account]
|
del self.plugin.roster.contacts[self.account]
|
||||||
del self.plugin.accounts[self.account]
|
del self.plugin.accounts[self.account]
|
||||||
self.plugin.send('ACC_CHG', self.account, name)
|
self.plugin.send('ACC_CHG', self.account, name)
|
||||||
self.plugin.accounts[name] = {'name': login, 'hostname': hostname,\
|
self.plugin.accounts[name] = {'name': login, 'hostname': hostname,\
|
||||||
'password': entryPass.get_text(), 'ressource': \
|
'password': entryPass.get_text(), 'ressource': \
|
||||||
entryRessource.get_text(), 'priority' : prio, 'use_proxy': \
|
entryRessource.get_text(), 'priority' : prio, 'use_proxy': \
|
||||||
useProxy, 'proxyhost': entryProxyhost.get_text(), 'proxyport': \
|
useProxy, 'proxyhost': entryProxyhost.get_text(), 'proxyport': \
|
||||||
proxyPort}
|
proxyPort}
|
||||||
self.plugin.send('CONFIG', None, ('accounts', self.plugin.accounts))
|
self.plugin.send('CONFIG', None, ('accounts', self.plugin.accounts))
|
||||||
#refresh accounts window
|
#refresh accounts window
|
||||||
if self.plugin.windows.has_key('accounts'):
|
if self.plugin.windows.has_key('accounts'):
|
||||||
self.plugin.windows['accounts'].init_accounts()
|
self.plugin.windows['accounts'].init_accounts()
|
||||||
#refresh roster
|
#refresh roster
|
||||||
self.plugin.roster.draw_roster()
|
self.plugin.roster.draw_roster()
|
||||||
widget.get_toplevel().destroy()
|
widget.get_toplevel().destroy()
|
||||||
return
|
return
|
||||||
#if it's a new account
|
#if it's a new account
|
||||||
else:
|
else:
|
||||||
if name in self.plugin.accounts.keys():
|
if name in self.plugin.accounts.keys():
|
||||||
|
@ -449,8 +448,7 @@ class accountPreference_Window:
|
||||||
if check.get_active():
|
if check.get_active():
|
||||||
self.plugin.send('NEW_ACC', None, (hostname, login, \
|
self.plugin.send('NEW_ACC', None, (hostname, login, \
|
||||||
entryPass.get_text(), name, entryRessource.get_text(), prio, \
|
entryPass.get_text(), name, entryRessource.get_text(), prio, \
|
||||||
checkProxy.get_active(), entryProxyhost.get_text(), \
|
checkProxy.get_active(), entryProxyhost.get_text(), proxyPort))
|
||||||
entryProxyport.get_text()))
|
|
||||||
check.set_active(FALSE)
|
check.set_active(FALSE)
|
||||||
return
|
return
|
||||||
self.plugin.accounts[name] = {'name': login, 'hostname': hostname,\
|
self.plugin.accounts[name] = {'name': login, 'hostname': hostname,\
|
||||||
|
|
Loading…
Reference in New Issue