Changeset 10145 for trunk/src/gajim.py

Show
Ignore:
Timestamp:
08/07/08 17:51:23 (4 months ago)
Author:
asterix
Message:

2 less blocking windows

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/gajim.py

    r10144 r10145  
    18561856 
    18571857        def handle_event_zc_name_conflict(self, account, data): 
    1858                 dlg = dialogs.InputDialog(_('Username Conflict'), 
    1859                         _('Please type a new username for your local account'), 
    1860                         is_modal = True) 
    1861                 dlg.input_entry.set_text(data) 
    1862                 response = dlg.get_response() 
    1863                 if response == gtk.RESPONSE_OK: 
    1864                         new_name = dlg.input_entry.get_text() 
     1858                def on_ok(new_name): 
    18651859                        gajim.config.set_per('accounts', account, 'name', new_name) 
    18661860                        status = gajim.connections[account].status 
    18671861                        gajim.connections[account].username = new_name 
    18681862                        gajim.connections[account].change_status(status, '') 
    1869                 else: 
     1863                def on_cancel(): 
    18701864                        gajim.connections[account].change_status('offline','') 
     1865 
     1866                dlg = dialogs.InputDialog(_('Username Conflict'), 
     1867                        _('Please type a new username for your local account'), input_str=data, 
     1868                        is_modal=True, ok_handler=on_ok, cancel_handler=on_cancel) 
    18711869 
    18721870        def handle_event_ping_sent(self, account, contact):