Ignore:
Timestamp:
Nov 29, 2013 5:56:02 AM (10 years ago)
Author:
ming
Message:

Re #1519: Add Call API in pjsua2.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/pjsua2/pjsip-apps/src/pygui/application.py

    r4657 r4663  
    191191                self._onTimer() 
    192192 
     193        def updateCall(self, acc): 
     194                iid = str(acc.randId) 
     195                for call in acc.callList: 
     196                        calliid = str(call.randId) 
     197                        uri, status = call.statusText() 
     198                        if self.tv.exists(calliid): 
     199                                self.tv.item(call.iid, text=uri, values=(status,)) 
     200                        else: 
     201                                call.iid = self.tv.insert(iid, 0, calliid, open=True, text=uri, values=(status,)) 
     202 
    193203        def updateAccount(self, acc): 
    194204                iid = str(acc.randId) 
     
    270280                self.accMenu = tk.Menu(top, tearoff=False) 
    271281                # Labels, must match with _onAccContextMenu() 
    272                 labels = ['Unregister', 'Reregister', 'Add buddy...', '-', 
     282                labels = ['Call', '-', 'Unregister', 'Reregister', 'Add buddy...', '-', 
    273283                          'Online', 'Invisible', 'Away', 'Busy', '-', 
    274284                          'Settings...', '-', 
     
    351361                        return 
    352362                 
    353                 if label=='Unregister': 
     363                if label=='Call': 
     364                        acc.makeCall() 
     365                elif label=='Unregister': 
    354366                        acc.setRegistration(False) 
    355367                elif label=='Reregister': 
Note: See TracChangeset for help on using the changeset viewer.