lp:py-gtktree

Created by Paul Pogonyshev on 2008-12-28 and last modified on 2010-03-11
Get this branch:
bzr branch lp:py-gtktree
Only Paul Pogonyshev can upload to this branch. If you are Paul Pogonyshev please log in for upload directions.

Related bugs

Related blueprints

Branch information

Owner:
Paul Pogonyshev
Project:
Py-gtktree
Status:
Development

Recent revisions

34. By Paul Pogonyshev on 2010-03-11

2010-03-11 Paul Pogonyshev <email address hidden>

 * gtktree/model.py (_TreeSortableHelper.set_sort_func): New
 override.

 * test/list_store.py
 (RowObjectListStoreTestCase.test_sortable_interface_sort_function_user_data):
 New test.

33. By Paul Pogonyshev on 2009-11-22

2009-11-22 Paul Pogonyshev <email address hidden>

 * gtktree/model.py (_attrgetter): Add special handling for '.'
 attribute.

 * gtktree/util.py (_enable_text_renderer_editing)
 (_enable_toggle_renderer_editing): New functions, break out of
 TreeViewUtils.enable_renderer_editing(). Tweak text renderer
 handling to get value from 'edited' signal if the value is just
 text (i.e. when renderer is not a 'gtk.SpinButton').
 (_enable_combo_renderer_editing): New function.

 * examples/editing_tree.py: Delete 'description' column
 everywhere. Add 'index' and 'status' instead.

32. By Paul Pogonyshev on 2009-11-18

2009-11-18 Paul Pogonyshev <email address hidden>

 * gtktree/_impl/tree_node.py (_DefaultTreeNodeChildNodes._wrap)
 (_DefaultTreeNodeChildNodes._wrap_sequence): New methods.

 * test/tree_store.py (DefaultTreeNodeTestCase.test_append_to_row_objects)
 (DefaultTreeNodeTestCase.test_extend_row_objects)
 (DefaultTreeNodeTestCase.test_insert_into_row_objects): New tests.

31. By Paul Pogonyshev on 2009-11-17

2009-11-17 Paul Pogonyshev <email address hidden>

 * gtktree/_impl/tree_node.py (child_row_objects): Change the
 property to return an object of new
 '_DefaultTreeNodeChildRowObjects' type.
 (_DefaultTreeNodeChildNodes): Rename from
 '_DefaultTreeNodeChildren'.
 (_DefaultTreeNodeChildNodes.reverse): Implement.
 (_DefaultTreeNodeChildRowObjects): New internal class.

30. By Paul Pogonyshev on 2009-11-15

2009-11-15 Paul Pogonyshev <email address hidden>

 --- Release 0.1.4 ---

 * NEWS: Update.

 * setup.py (clean): New class. Delete any symbolic links to the
 building directory from the source tree.

 * run-tests.py: Improve 'is configured' test to avoid taking an
 installed version for a properly configured distribution.
 (_build_extensions): New function (copied from Py-notify package).
 (TestProgram): New class, call _build_extensions() before running
 any tests.

29. By Paul Pogonyshev on 2009-11-15

2009-11-15 Paul Pogonyshev <email address hidden>

 * gtktree/_impl/c_hacks.c (proxy__do_get_sort_column_id): Don't
 leak 'result' object.
 (TreeIterCompareFuncWrapper_call)
 (TreeIterCompareFuncWrapper_destroy)
 (wrap_tree_iter_compare_func, do_proxy_do_set_sort_func)
 (proxy__do_set_sort_func, proxy__do_set_default_sort_func): New
 functions.
 (register_tree_sortable_implementation): Also fixup
 'set_sort_func' and 'set_default_sort_func' interface fields.
 (initc_hacks): Import 'gtk.TreeModel' and 'gtk.TreeIter' for type
 checking.

 * gtktree/model.py (_TreeSortableHelper): New internal mixin
 class.
 (RowObjectListStore): Inherit also from '_TreeSortableHelper'.
 (RowObjectListStore.is_sorted): Remove (inherited now).
 (RowObjectListStore._do_insert_sorted): Update to support sort
 functions.
 (RowObjectListStore.__bisect_with_classic_sort_function): New
 method.
 (RowObjectListStore.do_get_sort_column_id)
 (RowObjectListStore.do_set_sort_column_id)
 (RowObjectListStore.do_has_default_sort_func): Remove (inherited
 now).
 (RowObjectListStore._do_apply_sort_settings): Update to support
 sort functions.
 (RowObjectTreeStore): Inherit also from '_TreeSortableHelper'.
 (RowObjectTreeStore.is_sorted)
 (RowObjectTreeStore.do_get_sort_column_id)
 (RowObjectTreeStore.do_set_sort_column_id)
 (RowObjectTreeStore.do_has_default_sort_func): Remove (inherited
 now).
 (RowObjectTreeStore._support_classic_sort_functions): New
 override.

 * test/list_store.py (RowObjectListStoreTestCase.test_sortable_interface_sort_function_1)
 (RowObjectListStoreTestCase.test_sortable_interface_sort_function_2)
 (RowObjectListStoreTestCase.test_sortable_interface_sort_function_append):
 New tests.
 (_sort_even_numbers_first): New function.

 * TODO: Two more items.

28. By Paul Pogonyshev on 2009-11-14

2009-11-14 Paul Pogonyshev <email address hidden>

 * 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.

27. By Paul Pogonyshev on 2009-11-13

2009-11-13 Paul Pogonyshev <email address hidden>

 * gtktree/model.py: Use native PyGTK support for
 'gtk.TreeSortable' implementation (now available in trunk) if
 present in runtime, else fallback on using our 'c_hacks'.
 (RowObjectListStore._handle_new_value_order): Fix wrong creation
 of 'new_order' list.
 (RowObjectTreeStore._do_apply_sort_settings): Likewise.
 (RowObjectTreeStore._get_child_node_insertion_point): New method.

 * gtktree/_impl/tree_node.py (TreeNode.create_forest): New class
 method.
 (TreeNode.build_row_object_skeleton): New method.
 (_DefaultTreeNodeChildren._do_insert): Implement proper insertion
 in a sorted model.

 * test/list_store.py (RowObjectListStoreTestCase.test_sort)
 (RowObjectListStoreTestCase.test_sortable_interface_1)
 (RowObjectListStoreTestCase.test_sortable_interface_set_item)
 (RowObjectListStoreTestCase.test_sortable_interface_note_changes):
 Fix wrong (though currently unused) expected 'reordered'
 parameter.

 * test/tree_store.py (RowObjectTreeStoreTestCase.test_sortable_interface_1):
 New test.
 (_SORTING_FOO_FOREST, _SORTING_FOO_FOREST_SORTED_ASCENDING)
 (_SORTING_FOO_FOREST_SORTED_DESCENDING): New constants.
 (_create_sorting_foo_tree_store): New function.

 * docs/py-gtktree.txt: A mindo fix.

 * examples/drag_between_lists.py:
 * examples/drag_between_tree_and_list.py):
 * examples/simple_list.py: Don't use 'sort_column_id' property as
 it is too new (GTK+ 2.18).

 * TODO: One new item.

26. By Paul Pogonyshev on 2009-11-12

2009-11-12 Paul Pogonyshev <email address hidden>

 * gtktree/_impl/tree_node.py (TreeNode.num_child_nodes_currently):
 New property.
 (TreeNode.build_child_node_list): New method.
 (TreeNode.reorder_child_nodes): New abstract method.
 (DefaultTreeNode.build_child_node_list): Override to just return a
 copy of already built 'child_nodes'.
 (DefaultTreeNode.reorder_child_nodes)
 (_DefaultTreeNodeChildren.reorder): New methods.

 * gtktree/model.py (RowObjectTreeModel.is_sorted): New
 property (always false in the base class).
 (RowObjectTreeModel._check_is_not_sorted): Move here from
 'RowObjectListStore'.
 (RowObjectListStore.do_row_drop_possible): Disable reordering
 drags if 'self' is sorted.
 (RowObjectTreeStore): Implement 'gtk.TreeSortable' interface.
 (RowObjectTreeStore.is_sorted): New property.
 (RowObjectTreeStore.do_get_sort_column_id)
 (RowObjectTreeStore.do_set_sort_column_id)
 (RowObjectTreeStore._do_apply_sort_settings)
 (RowObjectTreeStore.do_has_default_sort_func): New methods.
 (RowObjectTreeStore.do_row_drop_possible): Disable drags within
 the same parent node if the model is sorted.

 * examples/drag_between_lists.py: Make all columns sortable.

 * examples/drag_between_tree_and_list.py: Likewise.

25. By Paul Pogonyshev on 2009-11-11

2009-11-11 Paul Pogonyshev <email address hidden>

 * gtktree/model.py (RowObjectListStore.note_changes): Override:
 call new _do_apply_sort_settings() when sorted.
 (RowObjectListStore.__setitem__): Call new
 _do_apply_sort_settings() when sorted in several places.
 (RowObjectListStore._do_apply_sort_settings): New method, break
 out of do_set_sort_column_id().

 * test/list_store.py (RowObjectListStoreTestCase.test_sortable_interface_1)
 (RowObjectListStoreTestCase.test_sortable_interface_append)
 (RowObjectListStoreTestCase.test_sortable_interface_set_item)
 (RowObjectListStoreTestCase.test_sortable_interface_note_changes):
 New tests.

Branch metadata

Branch format:
Branch format 6
Repository format:
Bazaar pack repository format 1 (needs bzr 0.92)
This branch contains Public information 
Everyone can see this information.

Subscribers