comparison browser_side/richtext.py @ 359:151bf1afd97e

browser_side: fix error when displaying the microblogs of a contact
author souliane <souliane@mailoo.org>
date Tue, 18 Feb 2014 14:38:04 +0100
parents 2b5503392fbd
children 019e1e706e74
comparison
equal deleted inserted replaced
358:df743589bb8c 359:151bf1afd97e
71 self.no_title = 'no_title' in options or self.read_only 71 self.no_title = 'no_title' in options or self.read_only
72 self.no_command = 'no_command' in options or self.read_only 72 self.no_command = 'no_command' in options or self.read_only
73 73
74 def _prepareUI(self, y_offset=0): 74 def _prepareUI(self, y_offset=0):
75 """Prepare the UI to host title panel, toolbar, text area... 75 """Prepare the UI to host title panel, toolbar, text area...
76 @param y_offset: Y offset to start from (extra rows on top)""" 76 @param y_offset: Y offset to start from (extra rows on top)"""
77 if not self.read_only: 77 if not self.read_only:
78 self.title_offset = y_offset 78 self.title_offset = y_offset
79 self.toolbar_offset = self.title_offset + (0 if self.no_title else 1) 79 self.toolbar_offset = self.title_offset + (0 if self.no_title else 1)
80 self.content_offset = self.toolbar_offset + (len(composition.RICH_SYNTAXES) if self._debug else 1) 80 self.content_offset = self.toolbar_offset + (len(composition.RICH_SYNTAXES) if self._debug else 1)
81 self.command_offset = self.content_offset + 1
82 else:
83 self.title_offset = self.toolbar_offset = self.content_offset = y_offset
81 self.command_offset = self.content_offset + 1 84 self.command_offset = self.content_offset + 1
82 FlexTable.__init__(self, self.command_offset + (0 if self.no_command else 1), 2) 85 FlexTable.__init__(self, self.command_offset + (0 if self.no_command else 1), 2)
83 self.addStyleName(self.style['main']) 86 self.addStyleName(self.style['main'])
84 87
85 def refresh(self, edit=None): 88 def refresh(self, edit=None):