Mercurial > libervia-web
diff libervia.py @ 312:b4781a350483
browser_side: display a "New message" button and add a "comment" icon for main entries in MicroblogPanel when the unibox is disabled
author | souliane <souliane@mailoo.org> |
---|---|
date | Mon, 30 Dec 2013 00:33:19 +0100 |
parents | 05e264e96a1c |
children | 5ad70625867a |
line wrap: on
line diff
--- a/libervia.py Mon Dec 30 00:30:45 2013 +0100 +++ b/libervia.py Mon Dec 30 00:33:19 2013 +0100 @@ -174,13 +174,9 @@ self.room_list = [] # list of rooms self.mblog_cache = [] # used to keep our own blog entries in memory, to show them in new mblog panel self.avatars_cache = {} # keep track of jid's avatar hash (key=jid, value=file) - #self.discuss_panel.addWidget(panels.EmptyPanel(self)) - self.discuss_panel.addWidget(panels.MicroblogPanel(self, [])) - #self.discuss_panel.addWidget(panels.EmptyPanel(self)) self._register_box = None RootPanel().add(self.panel) DOM.addEventPreview(self) - self.resize() self._register = RegisterCall() self._register.call('isRegistered', self._isRegisteredCB) self.initialised = False @@ -328,7 +324,13 @@ self._defaultDomain = "libervia.org" self.bridge.call("getNewAccountDomain", (domain_cb, domain_eb)) - self.bridge.call('asyncGetParamA', self._setUniBox, Const.ENABLE_UNIBOX_PARAM, Const.ENABLE_UNIBOX_KEY) + + def unibox_cb(enable): + self._setUniBox(enable) + self.discuss_panel.addWidget(panels.MicroblogPanel(self, [])) + self.resize() # resize after all the UI elements have been attached + + self.bridge.call('asyncGetParamA', unibox_cb, Const.ENABLE_UNIBOX_PARAM, Const.ENABLE_UNIBOX_KEY) def _tryAutoConnect(self): """This method retrieve the eventual URL parameters to auto-connect the user."""