コード例 #1
0
def ContactConverter_makeVO(base, cls, contact, useBigIcons = False):
    #log('ContactConverter_makeVO')
    res = base(contact, useBigIcons)
    if contacts.isAvailable():
        res.update({'xvm_contact_data':contacts.getXvmContactData(contact.getID())})
    #log(res)
    return res
コード例 #2
0
ファイル: __init__.py プロジェクト: Satariall/xvm-test
def ContactConverter_makeVO(base, self, contact, includeIcons = True):
    #log('ContactConverter_makeVO')
    res = base(self, contact, includeIcons)
    if contacts.isAvailable():
        res.update({'xvm_contact_data':contacts.getXvmContactData(contact.getID())})
    #log(res)
    return res
コード例 #3
0
def PlayerContactsCMHandler_generateOptions(base, self, ctx=None):
    #log('PlayerContactsCMHandler_generateOptions')
    options = base(self, ctx)
    options.append(
        self._makeItem(MENU.XVM_EDIT_CONTACT_DATA,
                       l10n('Edit data'),
                       optInitData={'enabled': contacts.isAvailable()}))
    return options
コード例 #4
0
def ContactConverter_makeVO(base, cls, contact, useBigIcons=False):
    #log('ContactConverter_makeVO')
    res = base(contact, useBigIcons)
    if contacts.isAvailable():
        res.update(
            {'xvm_contact_data': contacts.getXvmContactData(contact.getID())})
    #log(res)
    return res
コード例 #5
0
def ContactTooltipData_getDisplayableData(base, self, dbID, defaultName):
    result = base(self, dbID, defaultName)
    if contacts.isAvailable():
        #if result['xvm_contact_data']['nick']: # commented for use original nick in tooltip
        #    result['userProps']['userName'] = result['xvm_contact_data']['nick']
        if result['xvm_contact_data']['comment']:
            result['note'] = "<font color='#%s'>%s</font>"  % (XFWCOLORS.UICOLOR_LABEL, l10n(result['xvm_contact_data']['comment']))
    return result
コード例 #6
0
def ContactTooltipData_getDisplayableData(base, self, dbID, defaultName):
    result = base(self, dbID, defaultName)
    if contacts.isAvailable():
        #if result['xvm_contact_data']['nick']: # commented for use original nick in tooltip
        #    result['userProps']['userName'] = result['xvm_contact_data']['nick']
        if result['xvm_contact_data']['comment']:
            result['note'] = "<font color='#%s'>%s</font>" % (
                XFW_COLORS.UICOLOR_LABEL,
                l10n(result['xvm_contact_data']['comment']))
    return result
コード例 #7
0
def PlayerContactsCMHandler_generateOptions(base, self, ctx = None):
    #log('PlayerContactsCMHandler_generateOptions')
    options = base(self, ctx)
    options.append(self._makeItem(MENU.XVM_EDIT_CONTACT_DATA, l10n('Edit data'), optInitData={'enabled': contacts.isAvailable()}))
    return options