aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-03-22 16:06:30 +0800
committerChris Lahey <clahey@src.gnome.org>2001-03-22 16:06:30 +0800
commit26d5ee2938ef96d50f8611a0d64c3b396b22a9d9 (patch)
tree81e4809e63992f0ce88427a3ab49cac6448ebcac
parentfd03473c711a20ed4eaf0e309caff1a28a83010e (diff)
downloadgsoc2013-evolution-26d5ee2938ef96d50f8611a0d64c3b396b22a9d9.tar
gsoc2013-evolution-26d5ee2938ef96d50f8611a0d64c3b396b22a9d9.tar.gz
gsoc2013-evolution-26d5ee2938ef96d50f8611a0d64c3b396b22a9d9.tar.bz2
gsoc2013-evolution-26d5ee2938ef96d50f8611a0d64c3b396b22a9d9.tar.lz
gsoc2013-evolution-26d5ee2938ef96d50f8611a0d64c3b396b22a9d9.tar.xz
gsoc2013-evolution-26d5ee2938ef96d50f8611a0d64c3b396b22a9d9.tar.zst
gsoc2013-evolution-26d5ee2938ef96d50f8611a0d64c3b396b22a9d9.zip
Changed this to derefence the pointers passed in from qsort as we should
2001-03-22 Christopher James Lahey <clahey@ximian.com> * e-tree-memory.c (sort_callback): Changed this to derefence the pointers passed in from qsort as we should instead of just casting them. (e_tree_memory_sort_node): Set the first_child and last_child of the node changed. svn path=/trunk/; revision=8882
-rw-r--r--widgets/table/e-tree-memory.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/widgets/table/e-tree-memory.c b/widgets/table/e-tree-memory.c
index 20d96ad6e6..b14beafb15 100644
--- a/widgets/table/e-tree-memory.c
+++ b/widgets/table/e-tree-memory.c
@@ -556,8 +556,8 @@ typedef struct {
static int
sort_callback(const void *data1, const void *data2, gpointer user_data)
{
- ETreePath path1 = (void *) data1;
- ETreePath path2 = (void *) data2;
+ ETreePath path1 = *(ETreePath *)data1;
+ ETreePath path2 = *(ETreePath *)data2;
MemoryAndClosure *mac = user_data;
return (*mac->callback) (mac->memory, path1, path2, mac->closure);
}
@@ -596,6 +596,7 @@ e_tree_memory_sort_node (ETreeMemory *etmm,
e_sort (children, count, sizeof (ETreeMemoryPath *), sort_callback, &mac);
+ path->first_child = NULL;
last = NULL;
for (i = 0;
i < count;
@@ -603,11 +604,15 @@ e_tree_memory_sort_node (ETreeMemory *etmm,
children[i]->prev_sibling = last;
if (last)
last->next_sibling = children[i];
+ else
+ path->first_child = children[i];
last = children[i];
}
if (last)
last->next_sibling = NULL;
+ path->last_child = last;
+
g_free(children);
e_tree_model_node_changed(E_TREE_MODEL(etmm), node);