when we create a new account, plugin.windows[account] doesn't exists
This commit is contained in:
parent
0cfb3f5249
commit
1a82ed0ca3
|
@ -913,7 +913,12 @@ class Account_modification_window:
|
||||||
'''Class for account informations'''
|
'''Class for account informations'''
|
||||||
def on_account_modification_window_destroy(self, widget):
|
def on_account_modification_window_destroy(self, widget):
|
||||||
'''close window'''
|
'''close window'''
|
||||||
|
if self.plugin.windows.has_key(self.account):
|
||||||
|
if self.plugin.windows[self.account].has_key('account_modification')
|
||||||
del self.plugin.windows[self.account]['account_modification']
|
del self.plugin.windows[self.account]['account_modification']
|
||||||
|
return
|
||||||
|
if self.plugin.windows.has_key('account_modification'):
|
||||||
|
del self.plugin.windows['account_modification']
|
||||||
|
|
||||||
def on_cancel_button_clicked(self, widget):
|
def on_cancel_button_clicked(self, widget):
|
||||||
self.window.destroy()
|
self.window.destroy()
|
||||||
|
|
|
@ -533,10 +533,10 @@ class Roster_window:
|
||||||
menu.reposition()
|
menu.reposition()
|
||||||
|
|
||||||
def on_edit_account(self, widget, account):
|
def on_edit_account(self, widget, account):
|
||||||
if self.plugin.windows.has_key('account_modification'):
|
if self.plugin.windows[account].has_key('account_modification'):
|
||||||
self.plugin.windows['account_modification'].window.present()
|
self.plugin.windows[account]['account_modification'].window.present()
|
||||||
else:
|
else:
|
||||||
self.plugin.windows['account_modification'] = \
|
self.plugin.windows[account]['account_modification'] = \
|
||||||
config.Account_modification_window(self.plugin, account)
|
config.Account_modification_window(self.plugin, account)
|
||||||
|
|
||||||
def mk_menu_account(self, event, iter):
|
def mk_menu_account(self, event, iter):
|
||||||
|
|
Loading…
Reference in New Issue