예제 #1
0
def add_group():
    group = GetTextFromUser(_("Please enter a group name:"), _("Add Group"))
    if group is None or not group.strip():
        return

    protos = [acct.connection for acct in profile.account_manager.connected_accounts]
    for proto in protos:
        with traceguard:
            proto.add_group(group)
예제 #2
0
파일: oscargui.py 프로젝트: sgricci/digsby
    def show(email = None):
        val = GetTextFromUser(_('Enter an email address:'),
                              _('Edit Account Email: {username}').format(username=oscar.self_buddy.name),
                              default_value = email or '')

        if val is None or not val.strip():
            return

        log.info('setting new account email %r', val)
        return set(val)
예제 #3
0
파일: __init__.py 프로젝트: sgricci/digsby
def add_group():
    group = GetTextFromUser(_('Please enter a group name:'), _('Add Group'))
    if group is None or not group.strip():
        return

    protos = [
        acct.connection for acct in profile.account_manager.connected_accounts
    ]
    for proto in protos:
        with traceguard:
            proto.add_group(group)
예제 #4
0
    def rename_gui(self):
        from gui.toolbox import GetTextFromUser

        localalias = self.alias
        if localalias is None:
            localalias = ''

        s = GetTextFromUser(_('Enter an alias for %s:') % self.name,
                                           caption = _('Rename %s') % self.name,
                                           default_value = localalias )
        if s is not None:
            if s == '' or s.strip():
                # dialog returns None if "Cancel" button is pressed -- that means do nothing

                # rename expects None to mean "no alias" and anything else to mean an alias--so
                # do the bool check to turn '' into None here.
                self.rename(s if s else None)
                return s
예제 #5
0
    def rename_gui(self):
        from gui.toolbox import GetTextFromUser

        localalias = self.alias
        if localalias is None:
            localalias = ''

        s = GetTextFromUser(_('Enter an alias for %s:') % self.name,
                            caption=_('Rename %s') % self.name,
                            default_value=localalias)
        if s is not None:
            if s == '' or s.strip():
                # dialog returns None if "Cancel" button is pressed -- that means do nothing

                # rename expects None to mean "no alias" and anything else to mean an alias--so
                # do the bool check to turn '' into None here.
                self.rename(s if s else None)
                return s