comparison frontends/src/quick_frontend/quick_app.py @ 272:1d2e0dfe7114

bridge: core & frontend sides of bridge are now generated
author Goffi <goffi@goffi.org>
date Mon, 24 Jan 2011 22:05:04 +0100
parents c4b84a2d2ad1
children c1ad04586edf
comparison
equal deleted inserted replaced
271:0288f97334f2 272:1d2e0dfe7114
117 self.profiles[profile]={} 117 self.profiles[profile]={}
118 if self.single_profile: 118 if self.single_profile:
119 self.profile = profile 119 self.profile = profile
120 120
121 ###now we get the essential params### 121 ###now we get the essential params###
122 self.profiles[profile]['whoami']=JID(self.bridge.getParamA("JabberID","Connection", profile)) 122 self.profiles[profile]['whoami']=JID(self.bridge.getParamA("JabberID","Connection", profile_key=profile))
123 autoconnect = self.bridge.getParamA("autoconnect","Connection", profile) == "true" 123 autoconnect = self.bridge.getParamA("autoconnect","Connection", profile_key=profile) == "true"
124 self.profiles[profile]['watched']=self.bridge.getParamA("Watched", "Misc", profile).split() #TODO: put this in a plugin 124 self.profiles[profile]['watched']=self.bridge.getParamA("Watched", "Misc", profile_key=profile).split() #TODO: put this in a plugin
125 125
126 ## misc ## 126 ## misc ##
127 self.profiles[profile]['onlineContact'] = set() #FIXME: temporary 127 self.profiles[profile]['onlineContact'] = set() #FIXME: temporary
128 128
129 #TODO: gof: manage multi-profiles here 129 #TODO: gof: manage multi-profiles here
438 438
439 def onExit(self): 439 def onExit(self):
440 """Must be called when the frontend is terminating""" 440 """Must be called when the frontend is terminating"""
441 #TODO: mange multi-profile here 441 #TODO: mange multi-profile here
442 try: 442 try:
443 autodisconnect = self.bridge.getParamA("autodisconnect","Connection", self.profile) == "true" 443 autodisconnect = self.bridge.getParamA("autodisconnect","Connection", profile_key=self.profile) == "true"
444 if autodisconnect and self.bridge.isConnected(self.profile): 444 if autodisconnect and self.bridge.isConnected(self.profile):
445 #Does the user want autodisconnection ? 445 #Does the user want autodisconnection ?
446 self.bridge.disconnect(self.profile) 446 self.bridge.disconnect(self.profile)
447 except: 447 except:
448 pass 448 pass