Changeset 4687


Ignore:
Timestamp:
Dec 5, 2013 1:20:37 PM (10 years ago)
Author:
nanang
Message:

Re #1708: Misc updates:

  • Explicitly invoke call hangup in stopping audio.
  • Show text chat box, if it's hidden, when user initiates instant message (right click on buddy).
Location:
pjproject/branches/projects/pjsua2/pjsip-apps/src/pygui
Files:
2 edited

Legend:

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

    r4686 r4687  
    399399                        chat = acc.findChat(bud.cfg.uri) 
    400400                        if not chat: chat = acc.newChat(bud.cfg.uri) 
    401                         chat.showWindow() 
     401                        chat.showWindow(True) 
    402402                elif label=='Subscribe': 
    403403                        bud.subscribePresence(True) 
  • pjproject/branches/projects/pjsua2/pjsip-apps/src/pygui/chat.py

    r4686 r4687  
    196196                        assert(0) # idx must be found! 
    197197                 
    198         def showWindow(self): 
     198        def showWindow(self, show_text_chat = False): 
    199199                self._gui.bringToFront() 
     200                if show_text_chat: 
     201                        self._gui.textShowHide(True) 
    200202 
    201203        # helper 
     
    293295                         
    294296        def stopCall(self): 
    295                 for p in self._participantList: 
     297                for idx, p in enumerate(self._participantList): 
    296298                        self._gui.audioUpdateState(str(p), gui.AudioState.DISCONNECTED) 
    297                         if True or not self.isPrivate(): 
     299                        c = self._callList[idx] 
     300                        if c: 
     301                                c.hangup(pj.CallOpParam()) 
     302 
     303                        if not self.isPrivate(): 
    298304                                self.kickParticipant(p) 
    299                  
    300                 # clear call list, calls should be auto-destroyed by GC (and hungup by destructor) 
    301                 #for idx, c in enumerate(self._callList): 
    302                 #       self._callList[idx] = None 
    303305                 
    304306        def updateCallState(self, thecall, info = None): 
Note: See TracChangeset for help on using the changeset viewer.