2 less blocking windows
This commit is contained in:
parent
d7c60041ea
commit
303c0f6a71
2 changed files with 12 additions and 14 deletions
|
@ -1384,14 +1384,14 @@ class AccountsWindow:
|
||||||
gobject.timeout_add(500, login, self.current_account, show_before,
|
gobject.timeout_add(500, login, self.current_account, show_before,
|
||||||
status_before)
|
status_before)
|
||||||
|
|
||||||
|
def on_yes(checked):
|
||||||
|
relog()
|
||||||
|
def on_no():
|
||||||
|
if self.resend_presence:
|
||||||
|
self.resend()
|
||||||
self.dialog = dialogs.YesNoDialog(_('Relogin now?'),
|
self.dialog = dialogs.YesNoDialog(_('Relogin now?'),
|
||||||
_('If you want all the changes to apply instantly, '
|
_('If you want all the changes to apply instantly, '
|
||||||
'you must relogin.'))
|
'you must relogin.'), on_response_yes=on_yes, on_response_no=on_no)
|
||||||
resp = self.dialog.get_response()
|
|
||||||
if resp == gtk.RESPONSE_YES:
|
|
||||||
relog()
|
|
||||||
elif self.resend_presence:
|
|
||||||
self.resend()
|
|
||||||
elif self.resend_presence:
|
elif self.resend_presence:
|
||||||
self.resend()
|
self.resend()
|
||||||
|
|
||||||
|
|
14
src/gajim.py
14
src/gajim.py
|
@ -1855,20 +1855,18 @@ class Interface:
|
||||||
self.instances[account]['privacy_lists'].privacy_list_removed(name)
|
self.instances[account]['privacy_lists'].privacy_list_removed(name)
|
||||||
|
|
||||||
def handle_event_zc_name_conflict(self, account, data):
|
def handle_event_zc_name_conflict(self, account, data):
|
||||||
dlg = dialogs.InputDialog(_('Username Conflict'),
|
def on_ok(new_name):
|
||||||
_('Please type a new username for your local account'),
|
|
||||||
is_modal = True)
|
|
||||||
dlg.input_entry.set_text(data)
|
|
||||||
response = dlg.get_response()
|
|
||||||
if response == gtk.RESPONSE_OK:
|
|
||||||
new_name = dlg.input_entry.get_text()
|
|
||||||
gajim.config.set_per('accounts', account, 'name', new_name)
|
gajim.config.set_per('accounts', account, 'name', new_name)
|
||||||
status = gajim.connections[account].status
|
status = gajim.connections[account].status
|
||||||
gajim.connections[account].username = new_name
|
gajim.connections[account].username = new_name
|
||||||
gajim.connections[account].change_status(status, '')
|
gajim.connections[account].change_status(status, '')
|
||||||
else:
|
def on_cancel():
|
||||||
gajim.connections[account].change_status('offline','')
|
gajim.connections[account].change_status('offline','')
|
||||||
|
|
||||||
|
dlg = dialogs.InputDialog(_('Username Conflict'),
|
||||||
|
_('Please type a new username for your local account'), input_str=data,
|
||||||
|
is_modal=True, ok_handler=on_ok, cancel_handler=on_cancel)
|
||||||
|
|
||||||
def handle_event_ping_sent(self, account, contact):
|
def handle_event_ping_sent(self, account, contact):
|
||||||
if contact.jid == contact.get_full_jid():
|
if contact.jid == contact.get_full_jid():
|
||||||
# If contact is a groupchat user
|
# If contact is a groupchat user
|
||||||
|
|
Loading…
Add table
Reference in a new issue