confirmation is asked when we remove an account
This commit is contained in:
parent
b3473a5f1f
commit
cfd0e58803
|
@ -737,6 +737,11 @@ class accounts_Window:
|
|||
sel = self.treeview.get_selection()
|
||||
(model, iter) = sel.get_selected()
|
||||
account = model.get_value(iter, 0)
|
||||
window = confirm_Window('Are you sure you want to remove this account (' \
|
||||
+ account + ') ?')
|
||||
if window.wait() == gtk.RESPONSE_OK:
|
||||
if self.plugin.connected[account]:
|
||||
self.plugin.send('STATUS', account, ('offline', 'offline'))
|
||||
del self.plugin.accounts[account]
|
||||
self.plugin.send('CONFIG', None, ('accounts', self.plugin.accounts))
|
||||
del self.plugin.windows[account]
|
||||
|
@ -1595,7 +1600,6 @@ class roster_Window:
|
|||
txt = status
|
||||
self.plugin.send('STATUS', account, (status, txt))
|
||||
|
||||
|
||||
def on_optionmenu_changed(self, widget):
|
||||
"""When we change our status"""
|
||||
optionmenu = self.xml.get_widget('optionmenu')
|
||||
|
|
Loading…
Reference in New Issue