Example #1
0
 def refresh_collections_index(self):
     if 'Collections Index' not in self.screen_names:
         self.create_collections_index()
         return False
     collections_index = self.get_screen('Collections Index').children[0]
     collections = get_collections()
     list_adapter = ListAdapter(data=collections,
                                args_converter = collections_args_converter,
                                selection_mode = 'single',
                                allow_empty_selection=True,
                                cls=CollectionChooserButton,
                                )
     collections_index.collections_list.adapter = list_adapter
Example #2
0
 def new_board_dialog(self):
     print 'Opening new_board_dialog'
     dialog = NewBoardQuery(manager=self)
     popup = Popup(content=dialog, title='Create new board...', size_hint=(0.85, 0.9))
     popup.content.popup = popup
     collections_list = get_collections()
     list_adapter = ListAdapter(data=collections_list,
                                args_converter=collections_args_converter,
                                selection_mode='single',
                                allow_empty_selection=True,
                                cls=CollectionChooserButton
                                )
     dialog.collections_list.adapter = list_adapter
     popup.open()
Example #3
0
 def create_collections_index(self):
     app = App.get_running_app()
     collections = get_collections()
     collections_index = CollectionsIndex(managedby=self)
     
     list_adapter = ListAdapter(data=collections,
                                args_converter = collections_args_converter,
                                selection_mode = 'single',
                                allow_empty_selection=True,
                                cls=CollectionChooserButton,
                                )
     collections_index.collections_list.adapter = list_adapter
     collections_screen = Screen(name='Collections Index')
     collections_screen.add_widget(collections_index)
     self.add_widget(collections_screen)