From f590ec2dbdd8a317e5b1d3c31bdee60fc921d752 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Mon, 2 Oct 2000 22:16:00 +0000 Subject: track e-tree sort api change. (treepath_compare): same. (new_folder_cb): 2000-10-02 Chris Toshok * 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 --- shell/ChangeLog | 6 ++++++ shell/e-storage-set-view.c | 17 +++++++---------- 2 files changed, 13 insertions(+), 10 deletions(-) (limited to 'shell') diff --git a/shell/ChangeLog b/shell/ChangeLog index ffd715284f..c3fdfbdffa 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,9 @@ +2000-10-02 Chris Toshok + + * 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 * e-storage-set-view.c (e_storage_set_view_construct): pass NULL diff --git a/shell/e-storage-set-view.c b/shell/e-storage-set-view.c index 2bf308f29a..f4223b4d67 100644 --- a/shell/e-storage-set-view.c +++ b/shell/e-storage-set-view.c @@ -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 -- cgit