comparison frontends/quick_frontend/quick_app.py @ 22:bb72c29f3432

added action cb mechanism for buttons. Tested with a temporary new user registration button.
author Goffi <goffi@goffi.org>
date Tue, 01 Dec 2009 04:56:08 +0100
parents 6928e3cb73a8
children 53e921c8a357
comparison
equal deleted inserted replaced
21:633c5ed65701 22:bb72c29f3432
38 self.bridge.register("newMessage", self.newMessage) 38 self.bridge.register("newMessage", self.newMessage)
39 self.bridge.register("presenceUpdate", self.presenceUpdate) 39 self.bridge.register("presenceUpdate", self.presenceUpdate)
40 self.bridge.register("paramUpdate", self.paramUpdate) 40 self.bridge.register("paramUpdate", self.paramUpdate)
41 self.bridge.register("contactDeleted", self.contactDeleted) 41 self.bridge.register("contactDeleted", self.contactDeleted)
42 self.bridge.register("askConfirmation", self.askConfirmation, "request") 42 self.bridge.register("askConfirmation", self.askConfirmation, "request")
43 self.bridge.register("actionResult", self.actionResult, "request")
43 44
44 ###now we get the essential params### 45 ###now we get the essential params###
45 self.whoami=JID(self.bridge.getParamV("JabberID","Connection")) 46 self.whoami=JID(self.bridge.getParamA("JabberID","Connection"))
46 self.watched=self.bridge.getParamV("Watched", "Misc").split() #TODO: put this in a plugin 47 self.watched=self.bridge.getParamA("Watched", "Misc").split() #TODO: put this in a plugin
47 48
48 ## misc ## 49 ## misc ##
50 self.current_action_ids = set()
49 self.onlineContact = set() #FIXME: temporary 51 self.onlineContact = set() #FIXME: temporary
50 52
51 if self.bridge.isConnected(): 53 if self.bridge.isConnected():
52 self.setStatusOnline(True) 54 self.setStatusOnline(True)
53 55
154 self.contactList.remove(self.CM.get_full(jid)) 156 self.contactList.remove(self.CM.get_full(jid))
155 self.CM.remove(target) 157 self.CM.remove(target)
156 158
157 def askConfirmation(self, type, id, data): 159 def askConfirmation(self, type, id, data):
158 raise NotImplementedError 160 raise NotImplementedError
161
162 def actionResult(self, type, id, data):
163 raise NotImplementedError