Mercurial > libervia-backend
comparison frontends/quick_frontend/quick_app.py @ 200:7baee9bb37af
quick_frontend: fixed disconnect, and removed autojoin of muc room put for dev
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 20 Aug 2010 01:13:39 +0800 |
parents | 9ee4a1d0d7fb |
children | 96186f36d8cb |
comparison
equal
deleted
inserted
replaced
199:58f96e66ec17 | 200:7baee9bb37af |
---|---|
175 """called when the connection is made""" | 175 """called when the connection is made""" |
176 if not self.check_profile(profile): | 176 if not self.check_profile(profile): |
177 return | 177 return |
178 debug(_("Connected")) | 178 debug(_("Connected")) |
179 self.setStatusOnline(True) | 179 self.setStatusOnline(True) |
180 self.bridge.joinMUC('conference.necton2.int', 'test', self.profiles[self.profile]['whoami'].node, self.profile) #gof: | |
181 | 180 |
182 | 181 |
183 def disconnected(self, profile): | 182 def disconnected(self, profile): |
184 """called when the connection is closed""" | 183 """called when the connection is closed""" |
185 if not self.check_profile(profile): | 184 if not self.check_profile(profile): |
427 raise NotImplementedError | 426 raise NotImplementedError |
428 | 427 |
429 def onExit(self): | 428 def onExit(self): |
430 """Must be called when the frontend is terminating""" | 429 """Must be called when the frontend is terminating""" |
431 #TODO: mange multi-profile here | 430 #TODO: mange multi-profile here |
432 autodisconnect = self.bridge.getParamA("autodisconnect","Connection", self.profile) == "true" | 431 try: |
433 if autodisconnect and self.bridge.isConnected(self.profile): | 432 autodisconnect = self.bridge.getParamA("autodisconnect","Connection", self.profile) == "true" |
434 #Does the user want autodisconnection ? | 433 if autodisconnect and self.bridge.isConnected(self.profile): |
435 self.bridge.disconnect(self.profile) | 434 #Does the user want autodisconnection ? |
435 self.bridge.disconnect(self.profile) | |
436 except: | |
437 pass |