Jeff Pittman
|
672b7a223c
|
Changed the default list adapter used for ListView, when only a list of item_strings is provided, to use plain Button as the cls, not ListItemButton, because selection support is not needed.
|
2012-08-01 06:11:31 -05:00 |
Jeff Pittman
|
03c45541ab
|
Added check for whether the adapter for the list view supports selection, guarding the call to check_for_empty_selection().
|
2012-08-01 06:08:46 -05:00 |
Jeff Pittman
|
86e03d4648
|
Moved check_for_empty_selection() up to ListAdapter. Added owning_view property to ListAdapter, for access to AbstractView.get_item_view() in check_for_empty_selection(). Added the set of adapter.owning_view in ListView __init__(), and added the all-important call to check_for_empty_selection() at the bottom of that __init__(). All of this makes initial selection work now, given the present arrangement of things.
|
2012-08-01 06:01:32 -05:00 |
Jeff Pittman
|
04549413c9
|
Put the branch todo list back at the top of listview.py.
|
2012-08-01 05:28:02 -05:00 |
Jeff Pittman
|
03e031d663
|
Added item_strings= to ListView call.
|
2012-07-31 23:33:04 -05:00 |
Jeff Pittman
|
44bc041cbf
|
Added missing list adapter bindings to tests.
|
2012-07-31 21:34:42 -05:00 |
Jeff Pittman
|
96aa693b43
|
Removed now defunct comment about atomic.
|
2012-07-31 20:44:48 -05:00 |
Jeff Pittman
|
fceb0b7453
|
Removed duplicate declation of lists_dict.
|
2012-07-31 20:00:10 -05:00 |
Jeff Pittman
|
0641a9a572
|
Import fixes for tests. Added listview adapter checks.
|
2012-07-31 19:28:02 -05:00 |
Jeff Pittman
|
67c03f102d
|
Whitespace and import fixes.
|
2012-07-31 19:19:37 -05:00 |
Jeff Pittman
|
1533b2cf62
|
Updated references for using kwargs. Fixed import.
|
2012-07-31 19:15:29 -05:00 |
Jeff Pittman
|
397619e58d
|
Added SimpleListAdapter to be the bare-bones, no selection, list adapter. ListAdapter now uses SimpleListAdapter if no adapter is provided. ListAdapter implements SelectionSupport, as before, but now subclasses SimpleListAdapter. Renamed SelectableListsAdapter to ListsAdapter. Updated examples and tests accordingly. Updated and fixed code examples in the docs for ListView.
|
2012-07-31 17:44:37 -05:00 |
Jeff Pittman
|
b27adda021
|
Removed required arguments in ListAdapter. Fixed examples and tests accordingly.
|
2012-07-31 16:13:17 -05:00 |
Jeff Pittman
|
58dae9eb4e
|
Removed the mixin SelectionObserver classes, and went back to explicit bindings done at the time of widget creation (just after). Updated examples and tests accordingly. The selection handler method is now called on_selection_change. The SelectionSupport mixin was changed to register the on_selection_change event, and was modified to dispatch in a more atomic fashion.
|
2012-07-31 14:08:00 -05:00 |
Jeff Pittman
|
4a0b2232ee
|
Replaced usage of raise NotImplementedError() with pass.
|
2012-07-31 11:11:04 -05:00 |
Jeff Pittman
|
65d96ef45d
|
Changed observed_selection_changed() to on_selection_change() in preparation for redoing with a Kivy event.
|
2012-07-31 11:02:57 -05:00 |
Jeff Pittman
|
fa7009d79d
|
Added a simple example for listview, that only takes a list of strings.
|
2012-07-31 10:02:21 -05:00 |
Jeff Pittman
|
867061fe4a
|
Removed the custom CompositeListItem from the example, and made a general CompositeListItem class in listview.py. This required a change to ListView to check for a provided adapter, and to handle its set for AbstractView, which as not __init().
|
2012-07-31 10:00:04 -05:00 |
Jeff Pittman
|
608ca35951
|
Found a less distracting name for the main view of the list_composite.py example.
|
2012-07-31 00:03:08 -05:00 |
Jeff Pittman
|
5ef9a77c50
|
Added a list_composite.py list example, based on testing of the one started in the docs in widgets/listview.py.
|
2012-07-30 23:56:29 -05:00 |
Jeff Pittman
|
b530e42850
|
Started writing formal examples for ListView in its doc header, which prompted several clean-ups. ListItemButton and ListItemLabel were added to listview.py, so that various custom ListItem classes made for the examples and tests could be removed. The todo list for this uix-listview branch was moved to a gist. A new adapters/util.py file was added, containing only list_item_args_adapter(). ListAdapter was modified to check for an args_converter argument, and if not present, to use the default one in adapters/util.py.
|
2012-07-30 22:39:15 -05:00 |
Jeff Pittman
|
f292049d4c
|
Added back call_count check.
|
2012-07-30 17:14:19 -05:00 |
Jeff Pittman
|
fcfe84d6cc
|
Updated additional adapter and list view test for recent changes.
|
2012-07-30 17:04:30 -05:00 |
Jeff Pittman
|
aa3342185c
|
Added comments in the SelectableListsAdapter test.
|
2012-07-30 16:45:46 -05:00 |
Jeff Pittman
|
f9663dc25a
|
Added check for background_color of initially selected items.
|
2012-07-30 16:30:18 -05:00 |
Jeff Pittman
|
6bb4cf1d6d
|
Renamed existing selection case to be specific to ListAdapter, and removed a redundant test. Added a test case for SelectableListsAdapter.
|
2012-07-30 16:19:41 -05:00 |
Jeff Pittman
|
bebcd580d6
|
Added selection observer to the initial selection test.
|
2012-07-30 15:27:22 -05:00 |
Jeff Pittman
|
9a64d78e5f
|
Updated tests for recent changes.
|
2012-07-30 15:12:58 -05:00 |
Jeff Pittman
|
c3fc85e352
|
Remamed the adapters with the Single... and Multiple... long descriptive names by what they do, SelectableListsAdapter and AccumulatingListAdapter, respectively.
|
2012-07-30 11:24:30 -05:00 |
Jeff Pittman
|
40c5b2a72a
|
Fixed the initial set in DetailView to use str() on the list item.
|
2012-07-30 09:50:08 -05:00 |
Jeff Pittman
|
3f6c8fad21
|
Removed the word Chained from the names of the new adapter classes, because it is redundant to Observing. Started an implementation of MultipleSelectionObservingListAdapter -- this is one of the long names. Added an example demonstrating this new adapter. Removed unneeded properties for views in the examples, because references to them are not used. Added better descriptions in headers for several examples.
|
2012-07-29 22:47:32 -05:00 |
Jeff Pittman
|
8ce7e9e0b0
|
Reinstated initialize_selection(), because it is needed when data changes. Added SingleSelectionObserver and MultipleSelectionObserver as markers. For now, using long descriptive names for the new adapter classes.
|
2012-07-29 21:32:03 -05:00 |
Jeff Pittman
|
2b2080fccd
|
Removed initialize_selection(), keeping check_for_empty_selection().
|
2012-07-29 19:14:59 -05:00 |
Jeff Pittman
|
cf07c322ac
|
Removed call to populate() at end of __init__ in ListView.
|
2012-07-29 17:53:53 -05:00 |
Jeff Pittman
|
61319369eb
|
Added initial set for fruit_name in DetailView of examples.
|
2012-07-29 17:49:52 -05:00 |
Jeff Pittman
|
569c82b07d
|
Removed special calls to check selection.
|
2012-07-29 13:59:15 -05:00 |
Jeff Pittman
|
9f26e72582
|
Made a new adapter called ChainedListAdapter to contain code that had been done at a higher level in a custom list view. Now ListView is used directly, and the selection chaining, or cascading, from list to list is pushed down to the adapters. SelectionObserver was modified to help in this reorganization. ChainedListAdapter uses the modified SelectionObserver, and implements the observed_selection_changed() method to update its selection. ChainedListAdapter contains a selectable_lists_dict, containing the lists of list items that change when selection of the observed list adapter changes, so the observed list selection is the key into this dict. Updated the listview widget examples, which became considerably simpler. Added a _trigger_hard_populate() method in ListView that fires when self.adapter.data changes, where the "hard" reference is to a reset of the item_view_instances dict to an empty before calling populate(). This is an effort to get the list to stay in sync with its list_adapter, but initial selection, despite all of these changes, still is not shown in the list view display.
|
2012-07-29 13:01:56 -05:00 |
Jeff Pittman
|
bd3380a7ad
|
Added check for selection -- do not force selection if already exists.
|
2012-07-29 08:14:16 -05:00 |
Jeff Pittman
|
5008dffec0
|
Removed check for list_adapter.
|
2012-07-29 07:47:34 -05:00 |
Jeff Pittman
|
19c8d0c878
|
Worked over the list_disclosure.py example to properly use the selection_target arg and kwargs.
|
2012-07-29 01:05:49 -05:00 |
Jeff Pittman
|
e2db30d37f
|
Changed SelectableItem to have list_adapter property passed from ListAdapter, not from the custom list item class of the examples, so removes it from the API. Likewise, put the binding between selection and handle_selection in SelectableItem, because this also always must be done, so should not be exposed in the API. Added a selection_target property to accommodate the idea in examples/widgets/list_disclosure.py, for composite list items, for which the components may or may not be selectable, but may wish to proxy for the parent composite list item -- this approach is marked as needing review. Changed get_view in ListAdapter to make the correct cls instantiation call to pass itself as one of the arguments to the list item.
|
2012-07-29 00:46:07 -05:00 |
Jeff Pittman
|
05aa65eff4
|
Changed the name of the list argument in select_list to obj_list. Removed unneeded description of how properties work.
|
2012-07-28 23:41:07 -05:00 |
Jeff Pittman
|
428375ea78
|
SelectableItem class def was missing (object): -- thanks tshirtman.
|
2012-07-27 07:30:25 -05:00 |
Jeff Pittman
|
13b2509bd4
|
Updated mixins dir for imports in examples.
|
2012-07-26 18:06:32 -05:00 |
Jeff Pittman
|
16bc85e65e
|
Moved kivy/uix/mixins to kivy/adapters/mixins, and changed the import in listadapter.py.
|
2012-07-26 17:35:19 -05:00 |
Jeff Pittman
|
dd6b816a8b
|
Split out check_for_empty_selection from initialize_selection(). initialize_selection() still bound to changes of selection_mode and allow_empty_selection.
|
2012-07-16 16:19:13 -05:00 |
Jeff Pittman
|
25c3692b1d
|
Added selection test to check for selected item by name.
|
2012-07-16 15:37:18 -05:00 |
Jeff Pittman
|
f8e5bb2762
|
Moved selection-related tests to a dedicated test module. Added more Adapter tests.
|
2012-07-16 10:17:10 -05:00 |
Jeff Pittman
|
b5c610437c
|
Added first listview related tests, test_adapters.py, test_uix_listview.py
|
2012-07-16 06:30:19 -05:00 |
Jeff Pittman
|
4927e8ccf3
|
Documentation started for various new classes.
|
2012-07-15 20:19:17 -05:00 |