def __init__(self, util, bounding_box, listeners): """ Initializer :param util: utility object :param bounding_box: bounding box :param listeners: buttons listeners """ config = util.config linux = config[LINUX_PLATFORM] items = [] self.add_button(items, KEY_HOME, None, [listeners[KEY_HOME]]) self.add_button(items, KEY_REFRESH, None, [listeners[KEY_REFRESH]]) self.add_button(items, WIFI, None, [listeners[WIFI]]) self.add_button(items, KEY_DISCONNECT, None, [listeners[KEY_DISCONNECT]]) if linux and config[USAGE][USE_BLUETOOTH]: self.add_button(items, BLUETOOTH, None, [listeners[BLUETOOTH]]) self.add_button(items, KEY_BLUETOOTH_REMOVE, None, [listeners[KEY_BLUETOOTH_REMOVE]]) self.add_button(items, KEY_PLAYER, KEY_PLAY_PAUSE, [listeners[KEY_PLAYER]]) Navigator.__init__(self, util, bounding_box, "network.navigator", items, None)
def __init__(self, util, bounding_box, listeners, language_url=None): """ Initializer :param util: utility object :param bounding_box: bounding box :param listeners: buttons listeners :param language_url: language URL """ items = [] self.add_button(items, KEY_HOME, None, [listeners[KEY_HOME]]) if language_url == None: self.add_button(items, IMAGE_ABC, None, [listeners[GO_USER_HOME]]) self.add_button(items, IMAGE_NEW_BOOKS, None, [listeners[GO_ROOT]]) if language_url == None or language_url == "": # English-USA or Russian self.add_button(items, IMAGE_BOOK_GENRE, None, [listeners[GO_TO_PARENT]]) self.add_button(items, IMAGE_PLAYER, None, [listeners[GO_PLAYER]], source=BOOK_NAVIGATOR) self.add_button(items, KEY_BACK, None, [listeners[GO_BACK]], source=BOOK_NAVIGATOR_BACK) arrow_items = [] self.add_button(arrow_items, None, None, [listeners[GO_LEFT_PAGE]]) self.add_button(arrow_items, None, None, [listeners[GO_RIGHT_PAGE]]) Navigator.__init__(self, util, bounding_box, "book.navigator", items, arrow_items) self.back_button = self.get_button_by_name(KEY_BACK) try: self.back_button.add_release_listener(listeners[KEY_PLAY_FILE]) except: pass
def __init__(self, util, bounding_box, listeners, connected_cd_drives): """ Initializer :param util: utility object :param bounding_box: bounding box :param listeners: buttons listeners :param connected_cd_drives: number of connected drives """ config = util.config p = config[AUDIO][PLAYER_NAME] show_drives = connected_cd_drives > 1 and (p == VLC_NAME or p == MPD_NAME) items = [] self.add_button(items, KEY_HOME, None, [listeners[KEY_HOME]]) if show_drives: self.add_button(items, KEY_CD_PLAYERS, None, [listeners[KEY_CD_PLAYERS]]) self.add_button(items, KEY_REFRESH, None, [listeners[KEY_REFRESH]]) self.add_button(items, KEY_EJECT, None, [listeners[KEY_EJECT]]) lsnrs = [] lsnrs.append(listeners[GO_BACK]) lsnrs.append(listeners[KEY_PLAYER]) self.add_button(items, KEY_BACK, None, lsnrs) arrow_items = [] self.add_button(arrow_items, None, None, [listeners[GO_LEFT_PAGE]]) self.add_button(arrow_items, None, None, [listeners[GO_RIGHT_PAGE]]) Navigator.__init__(self, util, bounding_box, "cd.tracks.navigator", items, arrow_items)
def __init__(self, util, bounding_box, listeners): """ Initializer :param util: utility object :param bounding_box: bounding box :param listeners: buttons listeners """ items = [] self.add_button(items, KEY_HOME, None, [listeners[KEY_HOME]]) self.add_button(items, KEY_BACK, None, [listeners[KEY_BACK]]) self.add_button(items, KEY_PLAYER, None, [listeners[KEY_PLAYER]]) Navigator.__init__(self, util, bounding_box, "collection.navigator", items, None)
def __init__(self, util, bounding_box, listeners): """ Initializer :param util: utility object :param bounding_box: bounding box :param listeners: buttons listeners :param show_visibility: True - show visibility icon, False - don't show """ items = [] self.add_button(items, KEY_HOME, None, [listeners[KEY_HOME]]) self.add_button(items, KEY_BACK, None, [listeners[KEY_BACK]]) self.add_button(items, COLLECTION, None, [listeners[COLLECTION]]) self.add_button(items, KEY_PLAYER, None, [listeners[KEY_PLAYER]]) Navigator.__init__(self, util, bounding_box, "latin.keyboard.navigator", items, None)
def __init__(self, util, bounding_box, listeners): """ Initializer :param util: utility object :param bounding_box: bounding box :param listeners: buttons listeners """ items = [] self.add_button(items, KEY_HOME, KEY_HOME, [listeners[KEY_HOME]]) self.add_button(items, KEY_PLAYER, KEY_PLAY_PAUSE, [listeners[KEY_PLAYER]]) arrow_items = [] self.add_button(arrow_items, None, None, [listeners[GO_LEFT_PAGE]]) self.add_button(arrow_items, None, None, [listeners[GO_RIGHT_PAGE]]) Navigator.__init__(self, util, bounding_box, "file.navigator", items, arrow_items)
def __init__(self, util, bounding_box, listeners): """ Initializer :param util: utility object :param bounding_box: bounding box :param listeners: buttons listeners """ items = [] self.add_button(items, KEY_HOME, None, [listeners[KEY_HOME]]) self.add_button(items, KEY_BACK, None, [listeners[KEY_BACK]]) self.add_button(items, COLLECTION, None, [listeners[COLLECTION]]) self.add_button(items, KEY_LIST, None, [listeners[COLLECTION_TOPIC]]) self.add_button(items, KEY_PLAYER, None, [listeners[KEY_PLAYER]]) arrow_items = [] self.add_button(arrow_items, None, None, [listeners[GO_LEFT_PAGE]]) self.add_button(arrow_items, None, None, [listeners[GO_RIGHT_PAGE]]) Navigator.__init__(self, util, bounding_box, "topic.detail.navigator", items, arrow_items)
def __init__(self, util, bounding_box, listeners, pages): """ Initializer :param util: utility object :param bounding_box: bounding box :param listeners: buttons listeners :param pages: number of menu pages """ items = [] self.add_button(items, KEY_HOME, None, [listeners[KEY_HOME]]) self.add_button(items, KEY_BACK, None, [listeners[GO_BACK]]) self.add_button(items, KEY_PLAYER, None, [listeners[KEY_PLAYER]]) arrow_items = [] if pages > 1: self.add_button(arrow_items, None, None, [listeners[GO_LEFT_PAGE]]) self.add_button(arrow_items, None, None, [listeners[GO_RIGHT_PAGE]]) Navigator.__init__(self, util, bounding_box, "podcast.navigator", items, arrow_items)
def __init__(self, util, bounding_box, listeners): """ Initializer :param util: utility object :param bounding_box: bounding box :param listeners: buttons listeners """ items = [] if util.config[HOME_NAVIGATOR][HOME_BACK]: self.add_button(items, KEY_BACK, None, [listeners[KEY_BACK]]) if util.is_screensaver_available( ) and util.config[HOME_NAVIGATOR][HOME_SCREENSAVER]: self.add_button(items, SCREENSAVER, None, [listeners[SCREENSAVER]]) if util.config[HOME_NAVIGATOR][HOME_LANGUAGE]: self.add_button(items, LANGUAGE, None, [listeners[LANGUAGE]]) if util.config[HOME_NAVIGATOR][EQUALIZER]: self.add_button(items, EQUALIZER, None, [listeners[EQUALIZER]]) if util.config[HOME_NAVIGATOR][TIMER]: self.add_button(items, TIMER, None, [listeners[TIMER]]) if util.config[HOME_NAVIGATOR][NETWORK]: self.add_button(items, NETWORK, None, [listeners[NETWORK]]) if util.config[HOME_NAVIGATOR][KEY_PLAYER]: self.add_button(items, KEY_PLAYER, None, [listeners[KEY_PLAYER]]) if util.config[HOME_NAVIGATOR][ABOUT]: self.add_button(items, KEY_ABOUT, None, [listeners[KEY_ABOUT]]) if len(items) == 0: return Navigator.__init__(self, util, bounding_box, "home.navigator", items, None)