track e-tree sort api change. (treepath_compare): same. (new_folder_cb):

2000-10-02  Chris Toshok  <toshok@helixcode.com>

	* e-storage-set-view.c (new_storage_cb): track e-tree sort api change.
	(treepath_compare): same.
	(new_folder_cb): same.

svn path=/trunk/; revision=5675
This commit is contained in:
Chris Toshok
2000-10-02 22:16:00 +00:00
committed by Chris Toshok
parent 4dd58b9823
commit f590ec2dbd
2 changed files with 13 additions and 10 deletions
+6
View File
@@ -1,3 +1,9 @@
2000-10-02 Chris Toshok <toshok@helixcode.com>
* e-storage-set-view.c (new_storage_cb): track e-tree sort api change.
(treepath_compare): same.
(new_folder_cb): same.
2000-10-02 Chris Toshok <toshok@helixcode.com>
* e-storage-set-view.c (e_storage_set_view_construct): pass NULL
+7 -10
View File
@@ -523,15 +523,14 @@ etree_is_editable (ETreeModel *etree, ETreePath *path, int col, void *model_data
/* StorageSet signal handling. */
static ETreeModel *sort_model;
static gint
treepath_compare (ETreePath **node1,
ETreePath **node2)
treepath_compare (ETreeModel *model,
ETreePath *node1,
ETreePath *node2)
{
char *path1, *path2;
path1 = e_tree_model_node_get_data (sort_model, *node1);
path2 = e_tree_model_node_get_data (sort_model, *node2);
path1 = e_tree_model_node_get_data (model, node1);
path2 = e_tree_model_node_get_data (model, node2);
return strcasecmp (path1, path2);
}
@@ -565,8 +564,7 @@ new_storage_cb (EStorageSet *storage_set,
/* FIXME: We want a more specialized sort, e.g. the local folders should always be
on top. */
sort_model = priv->etree_model;
e_tree_model_node_sort (priv->etree_model, priv->root_node, (GCompareFunc)treepath_compare);
e_tree_model_node_set_compare_function (priv->etree_model, priv->root_node, (GCompareFunc)treepath_compare);
}
static void
@@ -634,8 +632,7 @@ new_folder_cb (EStorageSet *storage_set,
return;
}
sort_model = priv->etree_model;
e_tree_model_node_sort (priv->etree_model, parent_node, (GCompareFunc)treepath_compare);
e_tree_model_node_sort (priv->etree_model, parent_node);
}
static void