- Timestamp:
- Dec 4, 2013 12:19:48 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/pjsua2/pjsip-apps/src/pygui/account.py
r4675 r4677 69 69 70 70 def newChat(self, buddy): 71 chat = ch.Chat(self , buddy)71 chat = ch.Chat(self.app, self, buddy) 72 72 self.chatList.append(chat) 73 73 return chat … … 109 109 ci = c.getInfo() 110 110 msg = "Incoming call for account '%s'" % self.cfg.idUri 111 if msgbox.askquestion(msg, "Accept call from '%s'?" % (ci.remoteU RI), default=msgbox.YES) == u'yes':111 if msgbox.askquestion(msg, "Accept call from '%s'?" % (ci.remoteUri), default=msgbox.YES) == u'yes': 112 112 call_prm.statusCode = 200 113 113 c.answer(call_prm) 114 114 115 115 # 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 118 120 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() 121 124 chat.registerCall(bud, c) 122 chat. showWindow()125 chat.updateCallState(c, ci) 123 126 else: 124 127 c.hangup(call_prm) … … 126 129 def onInstantMessage(self, prm): 127 130 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 129 134 chat = self.findChat(bud) 130 135 if not chat: chat = self.newChat(bud) 131 136 137 chat.showWindow() 132 138 chat.addMessage(bud.cfg.uri, prm.msgBody) 133 chat.showWindow()134 139 135 140 def onInstantMessageStatus(self, prm): … … 145 150 def onTypingIndication(self, prm): 146 151 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 148 155 chat = self.findChat(bud) 149 156 if not chat: return
Note: See TracChangeset
for help on using the changeset viewer.