Commit c4e21249 authored by John Harper's avatar John Harper Committed by John Harper
Browse files

reviewed by: Darin Adler <darin@eazel.com>

2001-02-22  John Harper  <jsh@eazel.com>

	reviewed by: Darin Adler <darin@eazel.com>

	Partially fixed bug 6863 (tree view slow to load):

	* libnautilus-extensions/nautilus-ctree.c (set_node_info):
	don't sort each node in auto-sort mode
	(nautilus_ctree_set_node_info): sort each node in auto-sort
	mode, but use the function that only sorts a single node, not
	the entire branch

	* components/tree/nautilus-tree-view.c
	(nautilus_tree_view_insert_model_node): temporarily turn off
	auto-sort mode while inserting nodes (do this by twiddling the
	bit by hand, since the function to set this flag automatically
	sorts the tree)
parent e91b1f3d
2001-02-22 John Harper <jsh@eazel.com>
reviewed by: Darin Adler <darin@eazel.com>
Partially fixed bug 6863 (tree view slow to load):
* libnautilus-extensions/nautilus-ctree.c (set_node_info):
don't sort each node in auto-sort mode
(nautilus_ctree_set_node_info): sort each node in auto-sort
mode, but use the function that only sorts a single node, not
the entire branch
* components/tree/nautilus-tree-view.c
(nautilus_tree_view_insert_model_node): temporarily turn off
auto-sort mode while inserting nodes (do this by twiddling the
bit by hand, since the function to set this flag automatically
sorts the tree)
2001-02-22 Mike Fleming <mfleming@eazel.com>
Bug 6761: promote html help uris in the {gnome-,g,}help
......
......@@ -276,6 +276,8 @@ nautilus_tree_view_insert_model_node (NautilusTreeView *view, NautilusTreeNode *
view->details->inserting_node = TRUE;
GTK_CLIST_UNSET_FLAG (GTK_CLIST (view->details->tree),
CLIST_AUTO_SORT);
view_node = nautilus_ctree_insert_node (NAUTILUS_CTREE (view->details->tree),
parent_view_node,
NULL,
......@@ -284,6 +286,8 @@ nautilus_tree_view_insert_model_node (NautilusTreeView *view, NautilusTreeNode *
closed_pixmap, closed_mask, open_pixmap, open_mask,
! nautilus_file_is_directory (file),
FALSE);
GTK_CLIST_SET_FLAG (GTK_CLIST (view->details->tree),
CLIST_AUTO_SORT);
view->details->inserting_node = FALSE;
gdk_pixmap_unref (closed_pixmap);
......
......@@ -3206,12 +3206,6 @@ set_node_info (NautilusCTree *ctree,
else
nautilus_ctree_node_set_pixtext (ctree, node, ctree->tree_column,
text, spacing, pixmap_closed, mask_closed);
if (GTK_CLIST_AUTO_SORT (GTK_CLIST (ctree))
&& NAUTILUS_CTREE_ROW (node)->parent != NULL)
{
nautilus_ctree_sort_node (ctree, NAUTILUS_CTREE_ROW (node)->parent);
}
}
static void
......@@ -4896,6 +4890,12 @@ nautilus_ctree_set_node_info (NautilusCTree *ctree,
NAUTILUS_CTREE_ROW (node)->expanded = (is_leaf) ? FALSE : expanded;
if (GTK_CLIST_AUTO_SORT (GTK_CLIST (ctree))
&& NAUTILUS_CTREE_ROW (node)->parent != NULL)
{
nautilus_ctree_sort_single_node (ctree, NAUTILUS_CTREE_ROW (node)->parent);
}
tree_draw_node (ctree, node);
}
......
......@@ -3206,12 +3206,6 @@ set_node_info (NautilusCTree *ctree,
else
nautilus_ctree_node_set_pixtext (ctree, node, ctree->tree_column,
text, spacing, pixmap_closed, mask_closed);
if (GTK_CLIST_AUTO_SORT (GTK_CLIST (ctree))
&& NAUTILUS_CTREE_ROW (node)->parent != NULL)
{
nautilus_ctree_sort_node (ctree, NAUTILUS_CTREE_ROW (node)->parent);
}
}
static void
......@@ -4896,6 +4890,12 @@ nautilus_ctree_set_node_info (NautilusCTree *ctree,
NAUTILUS_CTREE_ROW (node)->expanded = (is_leaf) ? FALSE : expanded;
if (GTK_CLIST_AUTO_SORT (GTK_CLIST (ctree))
&& NAUTILUS_CTREE_ROW (node)->parent != NULL)
{
nautilus_ctree_sort_single_node (ctree, NAUTILUS_CTREE_ROW (node)->parent);
}
tree_draw_node (ctree, node);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment