Ignore:
Timestamp:
Dec 4, 2013 12:19:48 PM (10 years ago)
Author:
nanang
Message:

Re #1708: Implement adding participants, also various misc updates/fixes.

File:
1 edited

Legend:

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

    r4675 r4677  
    6969         
    7070        def newChat(self, buddy): 
    71                 chat = ch.Chat(self, buddy) 
     71                chat = ch.Chat(self.app, self, buddy) 
    7272                self.chatList.append(chat) 
    7373                return chat 
     
    109109                ci = c.getInfo() 
    110110                msg = "Incoming call for account '%s'" % self.cfg.idUri 
    111                 if msgbox.askquestion(msg, "Accept call from '%s'?" % (ci.remoteURI), default=msgbox.YES) == u'yes': 
     111                if msgbox.askquestion(msg, "Accept call from '%s'?" % (ci.remoteUri), default=msgbox.YES) == u'yes': 
    112112                        call_prm.statusCode = 200 
    113113                        c.answer(call_prm) 
    114114                         
    115115                        # create chat instance 
    116                         bud = self.findBuddy(ci.remoteURI) 
    117                         if not bud: return 
     116                        bud = self.findBuddy(ci.remoteUri) 
     117                        if not bud: 
     118                                print "=== Incoming call from '%s': cannot find buddy" % ci.remoteUri 
     119                                return 
    118120                        chat = self.findChat(bud) 
    119                         if not chat: chat = self.newChat(bud, c) 
    120                          
     121                        if not chat: chat = self.newChat(bud) 
     122                         
     123                        chat.showWindow() 
    121124                        chat.registerCall(bud, c) 
    122                         chat.showWindow() 
     125                        chat.updateCallState(c, ci) 
    123126                else: 
    124127                        c.hangup(call_prm) 
     
    126129        def onInstantMessage(self, prm): 
    127130                bud = self.findBuddy(prm.fromUri) 
    128                 if not bud: return 
     131                if not bud: 
     132                        print "=== Incoming IM from '%s': cannot find buddy" % prm.fromUri 
     133                        return 
    129134                chat = self.findChat(bud) 
    130135                if not chat: chat = self.newChat(bud) 
    131136                         
     137                chat.showWindow() 
    132138                chat.addMessage(bud.cfg.uri, prm.msgBody) 
    133                 chat.showWindow() 
    134139                 
    135140        def onInstantMessageStatus(self, prm): 
     
    145150        def onTypingIndication(self, prm): 
    146151                bud = self.findBuddy(prm.fromUri) 
    147                 if not bud: return 
     152                if not bud: 
     153                        print "=== Incoming typing indication from '%s': cannot find buddy" % prm.fromUri 
     154                        return 
    148155                chat = self.findChat(bud) 
    149156                if not chat: return 
Note: See TracChangeset for help on using the changeset viewer.