~doublep/py-gtktree/main

Viewing all changes in revision 28.

  • Committer: Paul Pogonyshev
  • Date: 2009-11-14 15:54:51 UTC
  • Revision ID: pogonyshev@gmx.net-20091114155451-xtc5uicm1ppk02e8
2009-11-14  Paul Pogonyshev  <pogonyshev@gmx.net>

        * NEWS: Update.

        * gtktree/model.py (RowObjectTreeModel.root): New property, only
        defined for node-based models.
        (RowObjectTreeModel._compute_child_node_insertion_point)
        (RowObjectTreeModel._do_apply_sort_settings_to_node): New methods,
        only defined for node-based models.
        (RowObjectListStore.note_changes): Optimization: don't call
        _do_apply_sort_settings() if there are no changes at all.
        (RowObjectTreeStore.note_changes): Override: call
        _do_apply_sort_settings() when sorted.
        (RowObjectTreeStore.__contains__): Implement the method.
        (RowObjectTreeStore._compute_child_node_insertion_point): Rename
        from _get_child_node_insertion_point().
        (RowObjectTreeStore._do_apply_sort_settings_to_node): New method:
        call _do_apply_sort_settings() for node's subtree.
        (RowObjectTreeStore._do_apply_sort_settings): Add 'nodes'
        argument: apply either to those nodes (default to all nodes).

        * gtktree/_impl/tree_node.py (DefaultTreeNode._set_row_object):
        Fix: call note_changes() on the model if it exists.
        (DefaultTreeNode.child_row_objects): New property; type will be
        changed later.
        (_DefaultTreeNodeChildren._do_insert): When inserting into a
        sorted model, sort node's subtree accordingly first.

        * test/tree_store.py (RowObjectTreeStoreTestCase.test_sortable_interface_1):
        Also test emitted signals.
        (RowObjectTreeStoreTestCase.test_sortable_interface_append)
        (RowObjectTreeStoreTestCase.test_sortable_interface_set_row_object)
        (RowObjectTreeStoreTestCase.test_sortable_interface_note_changes):
        New tests.
        (_sorting_foo_forest, _sorting_foo_forest_sorted_ascending)
        (_sorting_foo_forest_sorted_descending): Convert previously
        defined constants to functions to permit modifications.

        * examples/editing_tree.py: Make all columns sortable.
        (on_shuffle, warn_if_model_is_sorted): New functions.

        * examples/editing_tree.ui.xml: Add shuffle button.

        * TODO: One new item.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: