Mercurial > libervia-web
comparison src/browser/libervia_main.py @ 852:6f0a127077c4
browser: set the background transparent when the register panel is displayed
author | souliane <souliane@mailoo.org> |
---|---|
date | Sat, 16 Jan 2016 10:49:16 +0100 |
parents | 83a40d786e7a |
children | fa7703642c0e |
comparison
equal
deleted
inserted
replaced
851:77a494f13118 | 852:6f0a127077c4 |
---|---|
322 self.menus.addMenu(C.MENU_JID_CONTEXT, (D_(u"User"), D_("Public blog")), callback=main_menu.onPublicBlog) | 322 self.menus.addMenu(C.MENU_JID_CONTEXT, (D_(u"User"), D_("Public blog")), callback=main_menu.onPublicBlog) |
323 | 323 |
324 def _isRegisteredCB(self, result): | 324 def _isRegisteredCB(self, result): |
325 registered, warning = result | 325 registered, warning = result |
326 if not registered: | 326 if not registered: |
327 self.panel.setStyleAttribute("opacity", "0.25") # set background transparency | |
327 self._register_box = register.RegisterBox(self.logged) | 328 self._register_box = register.RegisterBox(self.logged) |
328 self._register_box.centerBox() | 329 self._register_box.centerBox() |
329 self._register_box.show() | 330 self._register_box.show() |
330 if warning: | 331 if warning: |
331 dialog.InfoDialog(_('Security warning'), warning).show() | 332 dialog.InfoDialog(_('Security warning'), warning).show() |
338 self._register.call('asyncConnect', lambda x: self.logged()) | 339 self._register.call('asyncConnect', lambda x: self.logged()) |
339 else: | 340 else: |
340 self.logged() | 341 self.logged() |
341 | 342 |
342 def logged(self): | 343 def logged(self): |
344 self.panel.setStyleAttribute("opacity", "1") # background becomes foreground | |
343 if self._register_box: | 345 if self._register_box: |
344 self._register_box.hide() | 346 self._register_box.hide() |
345 del self._register_box # don't work if self._register_box is None | 347 del self._register_box # don't work if self._register_box is None |
346 | 348 |
347 # display the presence status panel and tab bar | 349 # display the presence status panel and tab bar |