comparison src/browser/sat_browser/chat.py @ 652:0262fee86375 frontends_multi_profiles

browser_side: MicroblogPanel.accepted_groups (set of unicode) is now built from QuickWidget.targets (set of tuple of unicode)
author souliane <souliane@mailoo.org>
date Fri, 27 Feb 2015 01:11:34 +0100
parents 6d3142b782c3
children 267761bf7f08
comparison
equal deleted inserted replaced
651:2df91d0308ac 652:0262fee86375
163 if keycode == KEY_ENTER: 163 if keycode == KEY_ENTER:
164 self.host.showWarning(None, None) 164 self.host.showWarning(None, None)
165 else: 165 else:
166 self.host.showWarning(*self.getWarningData()) 166 self.host.showWarning(*self.getWarningData())
167 167
168 def matchEntity(self, item, type_=None):
169 """
170 @param entity: target jid as a string or jid.JID instance.
171 @return: True if self matches the given entity
172 """
173 if type_ is None:
174 type_ = self.type
175 entity = item if isinstance(item, jid.JID) else jid.JID(item)
176 try:
177 return self.target.bare == entity.bare and self.type == type_
178 except AttributeError as e:
179 e.include_traceback()
180 return False
181
182 def addMenus(self, menu_bar): 168 def addMenus(self, menu_bar):
183 """Add cached menus to the header. 169 """Add cached menus to the header.
184 170
185 @param menu_bar (GenericMenuBar): menu bar of the widget's header 171 @param menu_bar (GenericMenuBar): menu bar of the widget's header
186 """ 172 """