def build(self): matrix = SETTINGS['matrix'] self.icon = './res/img/icon.png' try: transition = globals()[SETTINGS['ui']['screen-transition'] ["transitions"][0]] direction = SETTINGS['ui']['screen-transition']['direction'][0] except: transition = NoTransition direction = 'up' root = ScreenManager(transition=transition(direction=direction)) root.fullscreen = False root.orientation = "portrait" root.user_id = matrix['user_id'] root.password = matrix['password'] root.default_room_alias = matrix['default_room_alias'] root.server = matrix['server'] root.predefined_rooms = matrix['predefined_rooms'] all_rooms = [root.default_room_alias] + root.predefined_rooms try: root.client, root.access_token = net.sign_in_matrix( root.server, root.user_id, root.password) root.add_widget(PublicRoomsList(app=root)) except net.API.MatrixRequestError, err: pass #raise err#sys.exit(err)
def build(self): matrix = SETTINGS['matrix'] self.icon = './res/img/icon.png' try: transition = globals()[SETTINGS['ui']['screen-transition']["transitions"][0]] direction = SETTINGS['ui']['screen-transition']['direction'][0] except: transition = NoTransition direction = 'up' root = ScreenManager(transition=transition(direction=direction)) root.fullscreen = False root.orientation = "portrait" root.user_id = matrix['user_id'] root.password = matrix['password'] root.default_room_alias = matrix['default_room_alias'] root.server = matrix['server'] root.predefined_rooms = matrix['predefined_rooms'] all_rooms = [root.default_room_alias] + root.predefined_rooms try: root.client, root.access_token = net.sign_in_matrix(root.server, root.user_id, root.password) root.add_widget(PublicRoomsList(app=root)) except net.API.MatrixRequestError, err: pass#raise err#sys.exit(err)