Changeset 10145

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

2 less blocking windows

Location:
trunk/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/config.py

    r10138 r10145  
    13851385                                        status_before) 
    13861386 
     1387                        def on_yes(checked): 
     1388                                relog() 
     1389                        def on_no(): 
     1390                                if self.resend_presence: 
     1391                                        self.resend() 
    13871392                        self.dialog = dialogs.YesNoDialog(_('Relogin now?'), 
    13881393                                _('If you want all the changes to apply instantly, ' 
    1389                                 'you must relogin.')) 
    1390                         resp = self.dialog.get_response() 
    1391                         if resp == gtk.RESPONSE_YES: 
    1392                                 relog() 
    1393                         elif self.resend_presence: 
    1394                                 self.resend() 
     1394                                'you must relogin.'), on_response_yes=on_yes, on_response_no=on_no) 
    13951395                elif self.resend_presence: 
    13961396                        self.resend() 
  • 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):