2009-11-15  Paul Pogonyshev  <pogonyshev@gmx.net>

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

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

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.

2009-11-13  Paul Pogonyshev  <pogonyshev@gmx.net>

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

2009-11-12  Paul Pogonyshev  <pogonyshev@gmx.net>

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

2009-11-11  Paul Pogonyshev  <pogonyshev@gmx.net>

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

2009-11-10  Paul Pogonyshev  <pogonyshev@gmx.net>

	* gtktree/_impl/tree_node.py (TreeNode.is_ancestor): New method.
	(TreeNode._validate_new_child): New method, break out of
	_DefaultTreeNodeChildren._do_insert().  Add two more checks to
	prevent loops with the is-parent relation.

	* gtktree/model.py (RowObjectTreeStore.do_row_drop_possible):
	Fix: don't allow draggin a node into itself.

	* test/tree_store.py (DefaultTreeNodeTestCase.test_illegal_child_4)
	(DefaultTreeNodeTestCase.test_illegal_child_5): New tests.

2009-11-09  Paul Pogonyshev  <pogonyshev@gmx.net>

	* gtktree/_impl/c_hacks.c: New file.

	* setup.py: Define and build C extension 'gtktree._impl.c_hacks'.
	(build_ext): New class (copied from Py-notify package).
	(invoke_pkg_config): New function.

	* gtktree/model.py: Import 'c_hacks' extension and use it to
	complete 'RowObjectListStore's implementation of
	'gtk.TreeSortable'.
	(RowObjectTreeModel._get_column_getter): New method.
	(_UNSORTED, _DEFAULT_SORT): New constants (currently imported from
	the C extension).
	(RowObjectListStore): Implement 'gtk.TreeSortable' interface.
	(RowObjectListStore.is_sorted): New property.
	(RowObjectListStore._check_is_not_sorted): New internal method.
	(RowObjectListStore._do_insert): Use new _do_insert_sorted() as
	needed.
	(RowObjectListStore._do_insert_sorted): New method.
	(RowObjectListStore.sort): Rewrite as 'key' no longer needs to be
	emulated.
	(RowObjectListStore.reorder, RowObjectListStore.reverse)
	(RowObjectListStore.sort)
	(RowObjectListStore.swap, RowObjectListStore.move_to)
	(RowObjectListStore.move_before, RowObjectListStore.move_after):
	Refuse to work on sorted models.
	(RowObjectListStore._handle_new_value_order): New internal method,
	break out of sort().
	(RowObjectListStore.do_get_sort_column_id)
	(RowObjectListStore.do_set_sort_column_id)
	(RowObjectListStore.do_has_default_sort_func): New methods.

	* examples/simple_list.py: No longer use 'gtk.TreeModelSort'.

	* examples/*.py: Print 'ImportError' as hiding it is often bad.

	* docs/py-gtktree.txt: Update in several places with documentation
	on sortable implementation.

	* TODO: Update.

2009-11-08  Paul Pogonyshev  <pogonyshev@gmx.net>

	--- Release 0.1.3 ---

	* NEWS: Update.

	* gtktree/util.py (TreeViewUtils.get_selected_node): Return just
	the node, without 'gtk.TreeIter'.
	(TreeViewUtils.get_selected_row_list)
	(TreeViewUtils.get_selected_node_list): New functions.
	(TreeViewUtils.enable_renderer_editing): New function.
	(_do_get_selection): New function, break out common parts of
	TreeViewUtils.get_selected_row() and
	TreeViewUtils.get_selected_node().

	* gtktree/model.py (RowObjectTreeModel.__init__): Also compute
	setters, only for string attributes for now.
	(RowObjectTreeModel.set_cell): New method.
	(_attrgetter): New function, break out of
	RowObjectTreeModel.__init__().
	(_attrsetter, _raising_attrsetter): New functions.

	* examples/editing_tree.py: Add a boolean (check box) column in
	the model and the view.  Make all columns inline-editable using
	new 'TreeViewUtils' function.
	(on_insert_new_node): New function.

	* examples/editing_tree.ui.xml: Add a comment labels, one more
	action button and icons in all buttons.

	* examples/README: Expand description of 'editing_tree.py'.

	* docs/py-gtktree.txt: Document several new functions and methods.

2009-11-07  Paul Pogonyshev  <pogonyshev@gmx.net>

	* gtktree/_impl/tree_node.py (TreeNode.create_tree): New class
	method.
	(TreeNode.depth_first_order, TreeNode.traversal_postorder)
	(TreeNode.breadth_first_order): New methods.
	(_DefaultTreeNodeChildren.reverse)
	(_DefaultTreeNodeChildren.sort): New methods, just raise
	'NotImplentedError' for now --- better than failing in an obscure
	way.
	(_DefaultTreeNodeChildren.__getslice__): Remove unneded
	override (and buggy too).

	* test/tree_store.py (TreeNodeTestCase): New test case.

	* docs/py-gtktree.txt: Expand with several new sections.  Update
	some existing sections.

	* README: Stop calling the tests 'unit tests'.

	* NEWS: Update.
	* TODO: Update.

2009-11-06  Paul Pogonyshev  <pogonyshev@gmx.net>

	* gtktree/model.py (_HAVE_DOTTED_ATTRGETTER_SUPPORT): New
	variable, just determine at runtime.
	(RowObjectTreeModel.__init__): Support dotted attributes.  If
	'operator.attrgetter' doesn't support those out of the box,
	emulate it.
	(RowObjectTreeModel._do_get_row_object)
	(RowObjectTreeModel._do_get_node)
	(RowObjectTreeModel._do_get_iter): Fix: raise 'NotImplentedError',
	not 'NotImplemented'.

	* gtktree/_impl/tree_node.py (TreeNode.is_draggable)
	(TreeNode.accepts_dragged_child_node)
	(TreeNode.accepts_parent_node_after_drag): Ask row object using
	duck typing by default.
	(LazyDefaultTreeNode.lazy_has_children)
	(LazyDefaultTreeNode.lazy_load): Likewise.
	(LazyDefaultTreeNode._do_lazy_load): Allow implementation to
	return row objects too.  In such a case, silently wrap those in
	nodes.
	(TreeNode.parent_node, TreeNode.next_node)
	(TreeNode.first_child_node, TreeNode.delete_child_node)
	(TreeNode.insert_child_node): Fix: raise 'NotImplentedError', not
	'NotImplemented'.

	* examples/drag_between_tree_and_list.py: Tweak to take advantage
	of new duck typing in the implementation.  Use plain
	'DefaultTreeNode' everywhere.  Add dotted attribute column in the
	list model.
	(FoodCategory): Include parts of retired 'FoodCategoryTreeNode'.
	(FoodItem): Likewise with removed 'FoodItemTreeNode'.

	* examples/lazy_tree_structure.py (Folder): Replace class
	'FolderNode': take advantage of new duck typing in the
	implementation.

	* docs/py-gtktree.txt: Document dotted column attributes and duck
	typing.

2009-11-05  Paul Pogonyshev  <pogonyshev@gmx.net>

	* gtktree/_impl/tree_node.py (TreeNode.is_draggable): New
	property.
	(TreeNode.accepts_dragged_child_node)
	(TreeNode.accepts_parent_node_after_drag): New methods.

	* gtktree/model.py (RowObjectTreeModel.default_node_type): New
	property.
	(RowObjectTreeModel._get_drag_data): If 'source_model' is not
	node-based, but 'self' is, try to wrap the row object using
	'default_node_type'.
	(RowObjectTreeStore.do_row_draggable): Ask the node.
	(RowObjectTreeStore._get_drag_destination_nodes): New method:
	break out from do_row_draggable() and fix for some cases.
	(RowObjectTreeStore.do_row_drop_possible): Ask both dragged and
	prospective parent nodes if they don't mind the drag.

	* examples/lazy_tree_structure.ui.xml: Add several comment labels.

	* examples/drag_between_tree_and_list.ui.xml:
	* examples/drag_between_tree_and_list.py: New example.

	* examples/README: Describe it.

2009-11-04  Paul Pogonyshev  <pogonyshev@gmx.net>

	* gtktree/model.py (RowObjectTreeStore._create_index_error):
	Remove (accidental left over of copy'n'paste).
	(_RootTreeNode._set_row_object): Forbid changing the row object.

	* gtktree/_impl/tree_node.py (_DefaultTreeNodeChildren.extend)
	(_DefaultTreeNodeChildren.pop): New methods.
	(_DefaultTreeNodeChildren._get_existing_child_index)
	(_DefaultTreeNodeChildren._get_insertion_point)
	(_DefaultTreeNodeChildren._create_index_error): New methods, base
	on similar ones in 'RowObjectListStore'.
	(_DefaultTreeNodeChildren.remove): Inline.
	(_DefaultTreeNodeChildren.insert)
	(_DefaultTreeNodeChildren.__delitem__)
	(_DefaultTreeNodeChildren.__setitem__): Fix for index wrapping
	using new methods.
	(_DefaultTreeNodeChildren._do_insert): Explicitly fail if any
	inserted object is not an instance of 'TreeNode' or already has a
	parent or is a root of a tree model.

	* test/tree_store.py (DefaultTreeNodeTestCase.test_delete_2)
	(DefaultTreeNodeTestCase.test_extend_1)
	(DefaultTreeNodeTestCase.test_insert_1)
	(DefaultTreeNodeTestCase.test_insert_2)
	(DefaultTreeNodeTestCase.test_pop_1)
	(DefaultTreeNodeTestCase.test_illegal_child_1)
	(DefaultTreeNodeTestCase.test_illegal_child_2)
	(DefaultTreeNodeTestCase.test_illegal_child_3): New tests.

	* examples/lazy_tree_structure.py: Add several comments.  Ditch
	'comment' everywhere, as unused.
	(FolderNode.__repr__): Remove as unneeded.

	* examples/README: Expand description of 'lazy_tree_structure.py'.

	* docs/py-gtktree.txt: Expand sections about the tree store.

2009-11-03  Paul Pogonyshev  <pogonyshev@gmx.net>

	--- Release 0.1.2 ---

	* NEWS: Update.
	* TODO: Update.

	* setup.py: Also include new 'gtktree._impl' package.

	* MANIFEST.in: Also distribute 'generate-documentation.py' and
	'docs/reST.css'.

	* gtktree/_impl/tree_node.py (TreeNode.delete_child_node)
	(TreeNode.insert_child_node): New abstract methods.
	(TreeNode.hierarchic_copy): New method.
	(DefaultTreeNode.delete_child_node)
	(DefaultTreeNode.insert_child_node): Override and define via
	'child_nodes' methods.
	(_DefaultTreeNodeChildren.insert): New method.
	(_DefaultTreeNodeChildren.__delitem__): Fix slice deletion by
	reversing index list.
	(_DefaultTreeNodeChildren.__setitem__): Implement extend slice
	setting.

	* gtktree/model.py (RowObjectTreeModel._get_drag_data): Return a
	node, not row object if the model is node-based.
	(RowObjectListStore.__gtype_name__): Fix.
	(RowObjectTreeStore): Implement gtk.TreeDragSource and
	gtk.TreeDragDest.
	(RowObjectTreeStore.__gtype_name__): Add.
	(RowObjectTreeStore.node_based): Override and return true.
	(RowObjectTreeStore.on_iter_n_children): Handle root node.

	* examples/editing_tree.py: Enable drag'n'drop in the tree view.

	* test/list_store.py (_create_foo_list_store): Break out to the
	top level.

	* test/tree_store.py (DefaultTreeNodeTestCase): New test case,
	break out of 'RowObjectTreeStoreTestCase', as most tests there (at
	the moment) actually test nodes, not the model.
	(DefaultTreeNodeTestCase.test_set_item_1)
	(DefaultTreeNodeTestCase.test_set_slice_1)
	(DefaultTreeNodeTestCase.test_delete_1)
	(DefaultTreeNodeTestCase.test_delete_slice_1): New tests.
	(_create_foo_tree_store): Break out to the top level.

	* docs/reST.css: Tweak table of contents appearance.

2009-11-02  Paul Pogonyshev  <pogonyshev@gmx.net>

	* gtktree/_impl/tree_node.py (TreeNode.has_child_nodes_currently):
	New property.
	(_DefaultTreeNodeChildren.__delitem__): Implement slice deletions.
	(_DefaultTreeNodeChildren): Properly override __getslice__() and
	__delslice__() if needed.
	(LazyDefaultTreeNode): New class.
	(_Placeholder): New internal class.

	* examples/lazy_tree_structure.ui.xml:
	* examples/lazy_tree_structure.py: New example.

	* examples/README: Describe it.

	* docs/py-gtktree.txt: Expand with new sections.  Create stubs for
	missing sections.

	* docs/reST.css: Don't justify paragraphs.

2009-11-01  Paul Pogonyshev  <pogonyshev@gmx.net>

	* gtktree/model.py (RowObjectTreeModel.node_based): New property.
	(RowObjectTreeModel.get_node, RowObjectTreeModel._do_get_node):
	New methods.
	(RowObjectTreeStore): New class.
	(_RootTreeNode): New internal class.

	* gtktree/_impl/__init__.py:
	* gtktree/_impl/tree_node.py: New files.

	* gtktree/util.py (TreeViewUtils.get_selected_row)
	(TreeViewUtils.get_selected_node): New functions.
	(_check_tree_model): New internal function.

	* test/_common.py: New file, break out of 'test/list_store.py'.

	* test/tree_store.py: New test file.

	* examples/simple_tree.ui.xml:
	* examples/simple_tree.py:
	* examples/editing_tree.ui.xml:
	* examples/editing_tree.py: Two new examples.

	* examples/README: Describe two new example programs.

	* NEWS: Update.

2009-01-02  Paul Pogonyshev  <pogonyshev@gmx.net>

	--- Release 0.1.1 ---

	* NEWS: Update.

	* docs/py-gtktree.txt: Fix some method declarations after the
	latest 'model.py' changes.  Add copyright notice and simple
	permissive license.

	* README (Frequently Asked Questions): New section.
	(Copyrights and Licenses): Mention the license for
	'docs/py-gtktree.txt'.

	* gtktree/model.py (RowObjectListStore.index)
	(RowObjectListStore.insert_after, RowObjectListStore._do_insert)
	(RowObjectListStore.pop, RowObjectListStore.reorder)
	(RowObjectListStore.move_to, RowObjectListStore.__getitem__)
	(RowObjectListStore.__setitem__, RowObjectListStore.__delitem__)
	(RowObjectListStore._do_get_iter): Revamp all index access to use
	either _get_existing_row_index() or _get_insertion_point() for
	unification.
	(RowObjectListStore._get_existing_row_index): Use operator.index()
	to handle __index__() method as Python itself does.
	(RowObjectListStore._get_clamped_row_index): Remove method.
	(RowObjectListStore._get_insertion_point): New method, similar to
	removed one above, but fixed and generalized.

	* (Globally): Update copyright notices.

2008-12-30  Paul Pogonyshev  <pogonyshev@gmx.net>

	* generate-documentation.py: New file.

	* docs/py-gtktree.txt: Remove draft warning.  Use definition lists
	in reference part.

	* docs/reST.css: New file.

	* run-tests.py: Change to the top distribution directory first.

2008-12-29  Paul Pogonyshev  <pogonyshev@gmx.net>

	* test/list_store.py (RowObjectListStoreTestCase.test_set_slice)
	(RowObjectListStoreTestCase.test_set_extended_slice): New tests.

	* gtktree/model.py (RowObjectListStore.__setitem__): Implement
	assignment to slices.

	* docs/py-gtktree.txt: Document assignment to slices and remove
	disclaimers about its being unimplemented.

	* TODO: Remove the implemented item.

2008-12-28  Paul Pogonyshev  <pogonyshev@gmx.net>

	* setup.py: Fix author email and download url.

	* run-tests.py: Work also after fresh check-out (i.e. before
	'./setup.py' is run for the first time).



Changes before the project registration on Launchpad (2008-12-28) were not logged.


  Copyright (C) 2008, 2009 Paul Pogonyshev.

  Copying and distribution of this file, with or without modification,
  are permitted provided the copyright notice and this notice are preserved.



Local Variables:
coding: utf-8
End:
