comparison src/sat.tac @ 266:c4b84a2d2ad1

bridge: constructor and template improved, documentation added
author Goffi <goffi@goffi.org>
date Mon, 24 Jan 2011 17:47:45 +0100
parents 27bc5d7732a3
children c1ad04586edf
comparison
equal deleted inserted replaced
265:b5f1f3dc9ac6 266:c4b84a2d2ad1
106 106
107 self.disco.requestInfo(jid.JID(self.host_app.memory.getParamA("Server", "Connection", profile_key=self.profile))).addCallback(self.host_app.serverDisco) #FIXME: use these informations 107 self.disco.requestInfo(jid.JID(self.host_app.memory.getParamA("Server", "Connection", profile_key=self.profile))).addCallback(self.host_app.serverDisco) #FIXME: use these informations
108 108
109 def initializationFailed(self, reason): 109 def initializationFailed(self, reason):
110 print ("initializationFailed: %s" % reason) 110 print ("initializationFailed: %s" % reason)
111 self.host_app.bridge.connection_error(self.profile,"AUTH_ERROR") 111 self.host_app.bridge.connection_error("AUTH_ERROR", self.profile)
112 try: 112 try:
113 client.XMPPClient.initializationFailed(self, reason) 113 client.XMPPClient.initializationFailed(self, reason)
114 except: 114 except:
115 #we already send an error signal, no need to raise an exception 115 #we already send an error signal, no need to raise an exception
116 pass 116 pass
791 except KeyError: 791 except KeyError:
792 error (_("Trying to access an unknown menu")) 792 error (_("Trying to access an unknown menu"))
793 return "" 793 return ""
794 794
795 def callMenu(self, category, name, type="NORMAL", profile_key='@DEFAULT@'): 795 def callMenu(self, category, name, type="NORMAL", profile_key='@DEFAULT@'):
796 """return the help string of the menu""" 796 """return the id of the action"""
797 profile = self.memory.getProfileName(profile_key) 797 profile = self.memory.getProfileName(profile_key)
798 if not profile_key: 798 if not profile_key:
799 error (_('Non-exsitant profile')) 799 error (_('Non-exsitant profile'))
800 return "" 800 return ""
801 if self.menus.has_key((category,name,type)): 801 if self.menus.has_key((category,name,type)):