コード例 #1
0
def main():
    from tests.testapp import testapp
    from tests.mock.mockbuddy import MockBuddy
    from path import path

    a = testapp('../../..')

    from gui.imwin.messagearea import MessageArea
    from gui.imwin.styles import get_theme
    from common.logger import history_from_files
    from gui import skin

    f = wx.Frame(None, title = 'Conversation Preview')
    msgarea = MessageArea(f)

    buddy = MockBuddy('digsby01')

    theme = get_theme('GoneDark', 'Steel')
    msgarea.init_content(theme, buddy.alias, buddy, show_history = False)

    msgs = history_from_files([skin.resourcedir() / 'Example Conversation.html'])
    msgarea.replay_messages(msgs, buddy)

    f.Show()
    a.MainLoop()
コード例 #2
0
ファイル: actionlink.py プロジェクト: AlexUlrich/digsby

if __name__ == '__main__':
    message_style = 'GoneDark'


    def msgobj(msg):
        return S(buddy = b,
                 conversation = c,
                 message = msg,
                 timestamp = datetime.now())

    from tests.testapp import testapp
    a = testapp('../../..')

    theme = get_theme(message_style)
    f = wx.Frame(None, size = (600,400))
    p = wx.Panel(f)

    b  = wx.Button(p, -1, 'foo')
    b2 = wx.Button(p, -1, 'bar')
    b3 = wx.Button(p, -1, 'html')

    s = p.Sizer = wx.BoxSizer(wx.VERTICAL)
    msg = MessageArea(p, theme = theme)

    msg.OnURL('21321321:accept', lambda: log.info("SUCCESS"))

    b.Bind(wx.EVT_BUTTON,
           lambda e:  (msg.format_message('incoming', msgobj('foo foo <a href="21321321-accept">foo</a> foo fooo fo foo?'))))
コード例 #3
0
ファイル: actionlink.py プロジェクト: sgricci/digsby
        self.callbacks = callbacks


if __name__ == '__main__':
    message_style = 'GoneDark'

    def msgobj(msg):
        return S(buddy=b,
                 conversation=c,
                 message=msg,
                 timestamp=datetime.now())

    from tests.testapp import testapp
    a = testapp('../../..')

    theme = get_theme(message_style)
    f = wx.Frame(None, size=(600, 400))
    p = wx.Panel(f)

    b = wx.Button(p, -1, 'foo')
    b2 = wx.Button(p, -1, 'bar')
    b3 = wx.Button(p, -1, 'html')

    s = p.Sizer = wx.BoxSizer(wx.VERTICAL)
    msg = MessageArea(p, theme=theme)

    msg.OnURL('21321321:accept', lambda: log.info("SUCCESS"))

    b.Bind(
        wx.EVT_BUTTON, lambda e: (msg.format_message(
            'incoming',