Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann Leboulanger <asterix@lagaule.org>2008-08-07 19:51:23 +0400
committerYann Leboulanger <asterix@lagaule.org>2008-08-07 19:51:23 +0400
commit303c0f6a719c74114fdaec588c44a7549f5ced90 (patch)
tree5b902ef968255682467f79f30e3503e947ddebdc
parentd7c60041eaa1b2c912381329dc4ac2f6de1989af (diff)
2 less blocking windows
-rw-r--r--src/config.py12
-rwxr-xr-xsrc/gajim.py14
2 files changed, 12 insertions, 14 deletions
diff --git a/src/config.py b/src/config.py
index 103d9c6ac..f6367ffbf 100644
--- a/src/config.py
+++ b/src/config.py
@@ -1384,14 +1384,14 @@ class AccountsWindow:
gobject.timeout_add(500, login, self.current_account, show_before,
status_before)
+ def on_yes(checked):
+ relog()
+ def on_no():
+ if self.resend_presence:
+ self.resend()
self.dialog = dialogs.YesNoDialog(_('Relogin now?'),
_('If you want all the changes to apply instantly, '
- 'you must relogin.'))
- resp = self.dialog.get_response()
- if resp == gtk.RESPONSE_YES:
- relog()
- elif self.resend_presence:
- self.resend()
+ 'you must relogin.'), on_response_yes=on_yes, on_response_no=on_no)
elif self.resend_presence:
self.resend()
diff --git a/src/gajim.py b/src/gajim.py
index 134152b16..d520b9f42 100755
--- a/src/gajim.py
+++ b/src/gajim.py
@@ -1855,20 +1855,18 @@ class Interface:
self.instances[account]['privacy_lists'].privacy_list_removed(name)
def handle_event_zc_name_conflict(self, account, data):
- dlg = dialogs.InputDialog(_('Username Conflict'),
- _('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()
+ def on_ok(new_name):
gajim.config.set_per('accounts', account, 'name', new_name)
status = gajim.connections[account].status
gajim.connections[account].username = new_name
gajim.connections[account].change_status(status, '')
- else:
+ def on_cancel():
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):
if contact.jid == contact.get_full_jid():
# If contact is a groupchat user