comparison src/browser/sat_browser/panels.py @ 478:992b900ab876

browser side: rename and refactor constant UI_PARAMS to CACHED_PARAMS, from a dict of dict to a list of 2-tuple
author souliane <souliane@mailoo.org>
date Thu, 12 Jun 2014 22:37:22 +0200
parents 97c72fe4a5f2
children 437eefa53a01
comparison
equal deleted inserted replaced
477:fac8e8bc9a1a 478:992b900ab876
77 self.setStyleName('uniBoxPanel') 77 self.setStyleName('uniBoxPanel')
78 self.unibox = None 78 self.unibox = None
79 79
80 def refresh(self): 80 def refresh(self):
81 """Enable or disable this panel. Contained widgets are created when necessary.""" 81 """Enable or disable this panel. Contained widgets are created when necessary."""
82 enable = self.host.getUIParam('unibox') 82 enable = self.host.getCachedParam(C.COMPOSITION_KEY, C.ENABLE_UNIBOX_PARAM) == 'true'
83 self.setVisible(enable) 83 self.setVisible(enable)
84 if enable and not self.unibox: 84 if enable and not self.unibox:
85 self.button = Button('<img src="media/icons/tango/actions/32/format-text-italic.png" class="richTextIcon"/>') 85 self.button = Button('<img src="media/icons/tango/actions/32/format-text-italic.png" class="richTextIcon"/>')
86 self.button.setTitle('Open the rich text editor') 86 self.button.setTitle('Open the rich text editor')
87 self.button.addStyleName('uniBoxButton') 87 self.button.addStyleName('uniBoxButton')