Changeset 48

Show
Ignore:
Timestamp:
02/28/02 00:44:43 (7 years ago)
Author:
sholloway
Message:

Changes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/RBPrivate/Prototypes/ChatClient/ClientModel.py

    r45 r48  
    1818        self.context = node.context 
    1919        self.JabberClients = SmartSelectDict() 
    20         #self.LoginToClient('www.runeblade.com', 'shane.test1', 'testing', resource='RuneBlade2') 
     20 
     21    def Process(self, maxTime): 
     22        if self.JabberClients: 
     23            self.JabberClients.Process(maxTime) 
    2124         
    2225    def LoginToClient(self, server, username, password, resource='RuneBlade'): 
    2326        jc = Client(server) 
    2427        jc._SetDebug(sys.stdout, sys.stdout) 
    25         self.JabberClients[server, username] = jc 
     28        self.JabberClients[server, username, resource] = jc 
    2629 
    2730        # Install default handlers 
     
    3437        # Login 
    3538        jc.Authenticate(username, password, resource) 
    36         for i in xrange(5): self.JabberClients.Process(0.1) 
    37  
     39        jc.Presence() 
  • trunk/RBPrivate/Prototypes/ChatClient/Login.skin

    r45 r48  
    11<?xml version='1.0'?>  
    22<skin:skin xmlns:skin='http://namespaces.runeblade.com/skin' xmlns:py='http://namespaces.runeblade.com/xmlPython' xmlns='http://namespaces.runeblade.com/wxPythonSkin'> 
    3     <frame title='RuneBlade Chat Client Login' show='1'> 
     3    <frame title='RuneBlade Chat Client Server Login' show='1'> 
    44        <py:script contextvar='Mediator' module='LoginMediator' call='LoginMediator' /> 
    55        <layout sizerFit='1'> 
     
    77                <layout orientation='grid' args='-1, 2' sizerFit='1' sizerFlagDefault='wxALIGN_CENTER | wxALL' sizerBorderDefault='5'> 
    88                    <label>Username</label><input sizerOption='1' > 
    9                         <py:inline>self.context.Mediator.UsernameInput = self.parent().object</py:inline
     9                        <py:obj_variable owner='Mediator' name='UsernameInput' /
    1010                    </input> 
    1111                    <label>Password</label><input sizerOption='1' style='wxTE_PASSWORD'> 
    12                         <py:inline>self.context.Mediator.PasswordInput = self.parent().object</py:inline
     12                        <py:obj_variable owner='Mediator' name='PasswordInput' /
    1313                    </input> 
    1414                    <label>Resource</label><input value='RuneBlade' sizerOption='1' > 
    15                         <py:inline>self.context.Mediator.ResourceInput = self.parent().object</py:inline
     15                        <py:obj_variable owner='Mediator' name='ResourceInput' /
    1616                    </input> 
    1717                    <label>Server</label><input value='www.runeblade.com' sizerOption='1'> 
    18                         <py:inline>self.context.Mediator.ServerInput = self.parent().object</py:inline
     18                        <py:obj_variable owner='Mediator' name='ServerInput' /
    1919                    </input> 
    2020                    <button default='1' label='OK'> 
    21                         <py:inline>self.context.Mediator.OKButton = self.parent().object</py:inline
     21                        <py:obj_variable owner='Mediator' name='OKButton' /
    2222                    </button> 
    2323                    <button label='Cancel' > 
    24                         <py:inline>self.context.Mediator.CancelButton = self.parent().object</py:inline
     24                        <py:obj_variable owner='Mediator' name='CancelButton' /
    2525                    </button> 
    2626                </layout> 
  • trunk/RBPrivate/Prototypes/ChatClient/LoginMediator.py

    r45 r48  
    44 
    55from wxPython import wx 
    6  
    76 
    87#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
  • trunk/RBPrivate/Prototypes/ChatClient/MainFrame.skin

    r42 r48  
    22<skin:skin xmlns:skin='http://namespaces.runeblade.com/skin' xmlns:py='http://namespaces.runeblade.com/xmlPython' xmlns='http://namespaces.runeblade.com/wxPythonSkin'> 
    33    <frame title='RuneBlade Chat Client' show='1'> 
     4        <py:script contextvar='Mediator' module='MainframeMediator' call='MainframeMediator' /> 
    45        <menu_bar> 
    56            <menu text='File'> 
    6                 <menu_item text="Item 1" /
    7                 <menu_item text="Item 2" /
    8             </menu
    9             <menu text='Edit'
    10                 <menu_item text="Item 1" /
    11                 <menu_item text="Item 2" /
    12             </menu
    13             <menu text='View'
    14                 <menu_item text="Item 1" /
    15                 <menu_item text="Item 2" /
     7                <menu_item text="Accounts..."
     8                    <py:inline>wx.EVT_MENU(self.context.frame, parentObj.GetId(), self.context.Mediator.OnShowAccounts)</py:inline
     9                </menu_item
     10                <menu_item text="Options..."
     11                    <py:inline>wx.EVT_MENU(self.context.frame, parentObj.GetId(), self.context.Mediator.OnShowOptions)</py:inline
     12                </menu_item
     13                <menu_break/
     14                <menu_item text="Exit"
     15                    <py:inline>wx.EVT_MENU(self.context.frame, parentObj.GetId(), self.context.Mediator.OnExit)</py:inline
     16                </menu_item
    1617            </menu> 
    1718            <menu text='System'> 
    18                 <menu_item text="Add Contact" /> 
    19                 <menu_item text="Remove Contact" /> 
     19                <menu_item text="View Debug Streams"> 
     20                    <py:inline>wx.EVT_MENU(self.context.frame, parentObj.GetId(), self.context.Mediator.OnTODOItem)</py:inline> 
     21                </menu_item> 
    2022            </menu> 
    2123            <menu text='Help'> 
    22                 <menu_item text="Item 1" /> 
    23                 <menu_item text="Item 2" /> 
     24                <menu_item text="RuneBlade Chat Client"> 
     25                    <py:inline>wx.EVT_MENU(self.context.frame, parentObj.GetId(), self.context.Mediator.OnTODOItem)</py:inline> 
     26                </menu_item> 
     27                <menu_break/> 
     28                <menu_item text="www.runeblade.com"> 
     29                    <py:inline>wx.EVT_MENU(self.context.frame, parentObj.GetId(), self.context.Mediator.OnTODOItem)</py:inline> 
     30                </menu_item> 
     31                <menu_item text="www.jabber.org"> 
     32                    <py:inline>wx.EVT_MENU(self.context.frame, parentObj.GetId(), self.context.Mediator.OnTODOItem)</py:inline> 
     33                </menu_item> 
    2434            </menu> 
    2535        </menu_bar> 
     
    2737        <layout sizerFit='1' sizerOption='1' sizerFlag='wxEXPAND'> 
    2838            <layout sizerOption='1' sizerFlag='wxEXPAND'> 
    29                 <notebook size='(350, 500)' sizerOption='1' sizerFlag='wxEXPAND'> 
    30                     <column_list pagename='Chat' bgcolor='(250, 250, 255)' columns='"Contact", "Status"' style='wxLC_NO_HEADER' /> 
     39                <notebook size='(200, 400)' sizerOption='1' sizerFlag='wxEXPAND'> 
     40                    <column_list pagename='Buddy List' bgcolor='(250, 250, 255)' columns='"Contact", "Status", "JID"' style='wxLC_NO_HEADER'> 
     41                        <py:obj_variable owner='Mediator' name='BuddyList' /> 
     42                    </column_list> 
     43                    <!-- 
    3144                    <column_list pagename='Group Chat' bgcolor='(250, 255, 250)' columns='"Chat Room"' style='wxLC_NO_HEADER' /> 
    3245                    <styled_text pagename='System Messages' bgcolor='(255, 250, 250)'> 
     
    4457                        </py:inline> 
    4558                    </styled_text> 
     59                    --> 
    4660                </notebook> 
    4761            </layout> 
     
    4963 
    5064        <status_bar fields='2'/> 
     65        <py:inline>self.context.Mediator.Initialize()</py:inline> 
    5166    </frame> 
    5267</skin:skin> 
  • trunk/RBPrivate/Prototypes/ChatClient/client.skin

    r45 r48  
    11<?xml version='1.0'?>  
    22<skin:skin xmlns:skin='http://namespaces.runeblade.com/skin' xmlns:py='http://namespaces.runeblade.com/xmlPython' xmlns='http://namespaces.runeblade.com/wxPythonSkin'> 
     3    <py:inline> 
     4        from wxPython import wx 
     5        self.AddNamespace(vars(wx)) 
     6    </py:inline> 
    37    <application> 
    4         <py:script contextvar='Model' module='ClientModel' call='ClientModel' /> 
     8        <py:script contextvar='Model' module='ClientModel' call='ClientModel'/> 
    59        <skin:reference>MainFrame.skin</skin:reference> 
     10 
     11        <!-- 
    612        <skin:reference>Login.skin</skin:reference> 
    7  
    813        <skin:reference>ChatFrame.skin</skin:reference> 
    914        <skin:reference>GroupChatFrame.skin</skin:reference> 
    1015        <skin:reference>DebugFrame.skin</skin:reference> 
     16        --> 
     17 
    1118    </application> 
    1219</skin:skin>