def __init__(self, name='Search menu', eventhandler=None, type='media_search', pattern=None, universe=None): self.eventhandler = SearchMenuEventHandler(self) Menu.__init__(self, name, type=type, universe=universe) self.kbd = SearchKeyboardWindow(_('Search'), text='', confirm_action=self.search, search_menu=self) self.pattern = pattern self.navigator = pygui_globs['menustack'].get_navigator() self.positions_dict = dict() self.pattern = None self._wil_result = None self._getitems_keywords['result_count'] = ( lambda: self.get_result_count()) self._getitems_keywords['title'] = (lambda: self.get_title()) self.show() if not hasattr(self, 'move_navigator'): mn = Task(self._move_navigator) mn.delay = config.HMI_BASE['search_navigator_delay'] self.move_navigator = mn.start self.move_navigator_task = mn if not self.pattern: self.ask_pattern() else: self.search() return None
def create_content(self): if self._initialized: pass self._initialized = True self._last_timestamp = 0 sel_task = Task(self._fix_selected) sel_task.delay = self.duration * 2 sel_task._considered_idle = True self._schedule_selected = sel_task.start start = self.menu_list.selected_pos - self._selected GenericListing._create_content(self, start, self.style_name[:-6])
# # 2012-01-10 # Initial Commit # # # Copyright 2010-2012, WyDev Team. # Author: Polo35 ([email protected]) # # Licenced under Academic Free License version 3.0 # Review WyGui README & LICENSE files for further details. nname: 18 n 18(None)[self._initialized = True self._last_timestamp = 0 sel_task = Task(self._fix_selected) sel_task.delay = self.duration * 2 sel_task._considered_idle = True self._schedule_selected = sel_task.start start = self.menu_list.selected_pos - self._selected GenericListing._create_content(self, start, self.style_name[:-6]) ]: i: 9(), 17() o: nname: 17 n 17(None)[]: i: 0(f) o: 18() nname: 9 n 9(None)[]: