# HG changeset patch # User Goffi # Date 1432746616 -7200 # Node ID b81816f42c81d6d0e304fcf2f13af49fbd64e3ec # Parent be55a782a97660ae44b2baef599416c5c5242db2 browser side: added signal caching before profile is plugged, as QuickFrontend mechanism is not used diff -r be55a782a976 -r b81816f42c81 src/browser/libervia_main.py --- a/src/browser/libervia_main.py Mon Apr 20 17:10:38 2015 +0200 +++ b/src/browser/libervia_main.py Wed May 27 19:10:16 2015 +0200 @@ -77,6 +77,8 @@ log.info("============ onModuleLoad ==============") self.bridge_signals = json.BridgeSignals(self) QuickApp.__init__(self, json.BridgeCall) + self._profile_plugged = False + self.signals_cache[C.PROF_KEY_NONE] = [] self.panel = main_panel.MainPanel(self) self.tab_panel = self.panel.tab_panel self.tab_panel.addTabListener(self) @@ -349,8 +351,9 @@ self.bridge.getNewAccountDomain(callback=domain_cb, errback=domain_eb) self.plug_profiles([C.PROF_KEY_NONE]) # XXX: None was used intitially, but pyjamas bug when using variable arguments and None is the only arg. - def profilePlugged(self, dummy): # FIXME: to be called as a "profilePlugged" listener? - QuickApp.profilePlugged(self, dummy) + def profilePlugged(self, dummy): + self._profile_plugged = True + QuickApp.profilePlugged(self, C.PROF_KEY_NONE) microblog_widget = self.displayWidget(blog.MicroblogPanel, ()) self.setSelected(microblog_widget) diff -r be55a782a976 -r b81816f42c81 src/browser/sat_browser/json.py --- a/src/browser/sat_browser/json.py Mon Apr 20 17:10:38 2015 +0200 +++ b/src/browser/sat_browser/json.py Wed May 27 19:10:16 2015 +0200 @@ -261,4 +261,8 @@ return if with_profile: args.append(C.PROF_KEY_NONE) - callback(*args) + if not self.host._profile_plugged: + log.debug("Profile is not plugged, we cache the signal") + self.host.signals_cache[C.PROF_KEY_NONE].append((name, callback, args, {})) + else: + callback(*args)