Ejemplo n.º 1
0
def buddy_item(buddy):
    # disabling icons for now--when users pin buddies, their status icons become
    # out of date.
    status_icon = None

    ipc_call = funccall('chat', idstr=buddy.idstr())

    name = unicode(buddy.alias)
    desc = _('Chat with {name}').format(name=name)

    return action(ipc_call, desc, name, status_icon)
Ejemplo n.º 2
0
def buddy_item(buddy):
    # disabling icons for now--when users pin buddies, their status icons become
    # out of date.
    status_icon = None

    ipc_call = funccall('chat', idstr=buddy.idstr())

    name = unicode(buddy.alias)
    desc = _('Chat with {name}').format(name=name)

    return action(ipc_call, desc, name, status_icon)
Ejemplo n.º 3
0
    def after():
        from gui import skin
        TASKS = [
            action('globalstatus', _('Set your status on multiple networks'),
                   _('Set Global Status'), skin.get('icons.globalstatus',
                                                    None)),
            action('newim', _('Open the New IM window'), _('New IM...'),
                   skin.get('AppDefaults.UnreadMessageIcon', None)),
            action('prefsdialog', _('Open the Digsby Preferences window'),
                   _('Preferences...')),
        ]

        if SHOW_STATUS_ITEMS:
            TASKS.append(None)  # separator
            TASKS.extend(jumplist_status_items(profile.status))

        # Exit Digsby
        TASKS.append(None)
        TASKS.append(
            action('exit', _('Close all windows and exit'), _('Exit Digsby'),
                   skin.get('AppDefaults.JumpListCloseIcon', None)))

        jumplist = [
            (u'', TASKS),
        ]

        if TOP_BUDDIES_ENABLED:
            logging = logging_enabled()

            if logging and log_sizes is not None:
                buddies = [
                    buddy_item(buddy)
                    for buddy in log_sizes[:MAX_BUDDIES_IN_LOGSIZE_LIST]
                    if not buddy.__class__.__name__ == 'OfflineBuddy'
                ]
            else:
                buddies = [
                    action(
                        funccall('prefsdialog', tabname='text_conversations'),
                        _('Opens the Preferences Window where you can enable logging'
                          ), _('Enable Chat Logs'))
                ]

            jumplist.append((u'Top Buddies (by log size)', buddies))

        success = cgui.SetUpJumpList(APP_ID, jumplist)

        # clear jumplist on shutdown
        register_shutdown_hook()
Ejemplo n.º 4
0
    def after():
        from gui import skin
        TASKS = [
            action('globalstatus', _('Set your status on multiple networks'), _('Set Global Status'), skin.get('icons.globalstatus', None)),
            action('newim',        _('Open the New IM window'),               _('New IM...'), skin.get('AppDefaults.UnreadMessageIcon', None)),
            action('prefsdialog',  _('Open the Digsby Preferences window'),   _('Preferences...')),
        ]

        if SHOW_STATUS_ITEMS:
            TASKS.append(None) # separator
            TASKS.extend(jumplist_status_items(profile.status))

        # Exit Digsby
        TASKS.append(None)
        TASKS.append(action('exit', _('Close all windows and exit'), _('Exit Digsby'), skin.get('AppDefaults.JumpListCloseIcon', None)))

        jumplist = [
            (u'', TASKS),
        ]

        if TOP_BUDDIES_ENABLED:
            logging = logging_enabled()

            if logging and log_sizes is not None:
                buddies = [buddy_item(buddy)
                           for buddy in log_sizes[:MAX_BUDDIES_IN_LOGSIZE_LIST]
                           if not buddy.__class__.__name__ == 'OfflineBuddy']
            else:
                buddies = [action(funccall('prefsdialog', tabname='text_conversations'), _('Opens the Preferences Window where you can enable logging'), _('Enable Chat Logs'))]

            jumplist.append((u'Top Buddies (by log size)', buddies))

        success = cgui.SetUpJumpList(APP_ID, jumplist)

        # clear jumplist on shutdown
        register_shutdown_hook()
Ejemplo n.º 5
0
 def status_action(name, label):
     tooltip = _('Change IM Status to {status}').format(status=label)
     ipc = funccall('status', status=name)
     return action(ipc, tooltip, label, status_icons[name])
Ejemplo n.º 6
0
 def status_action(name, label):
     tooltip = _('Change IM Status to {status}').format(status=label)
     ipc = funccall('status', status=name)
     return action(ipc, tooltip, label, status_icons[name])