home *** CD-ROM | disk | FTP | other *** search
Wrap
# Source Generated with Decompyle++ # File: in.pyo (Python 2.6) from gui.toolbox import GetTextFromUser import wx from logging import getLogger log = getLogger('oscargui') def format_screenname(oscar, set): oldval = str(oscar.self_buddy.nice_name) while True: val = GetTextFromUser(_('Enter a formatted screenname for %s.\n\nThe new screenname must be the same as the old one,\nexcept for changes in capitalization and spacing.') % oscar.username, caption = _('Edit Formatted Screenname'), default_value = oldval) if val is None: return None if val.lower().replace(' ', '') == oldval.lower().replace(' ', ''): print 'setting new formatted name', val return set(str(val)) continue val.lower().replace(' ', '') == oldval.lower().replace(' ', '') def set_account_email(oscar, set): def show(email = (None, None)): if not email: pass val = GetTextFromUser(_('Enter an email address:'), _('Edit Account Email: %s') % oscar.self_buddy.name, default_value = '') if val is None or not val.strip(): return None log.info('setting new account email %r', val) return set(val) timer = wx.PyTimer(show) def success(email): if timer.IsRunning(): timer.Stop() show(email) else: log.info('server response was too late: %r', email) def error(): log.info('error retreiving account email for %r', oscar) if timer.IsRunning(): timer.Stop() show() timer.StartOneShot(2000) oscar.get_account_email(success = success, error = error)