From d3a7e6343b8484d319faa97ca7908dd50cbe6255 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Thu, 11 Mar 2004 07:02:58 +0000 Subject: when we sort, handle not having the node in the tree. otherwise we always 2004-03-11 Not Zed * em-folder-tree-model.c (sort_cb): when we sort, handle not having the node in the tree. otherwise we always compare against "" which puts it at the head of the branch, rather than the tail. See #55428. svn path=/trunk/; revision=25024 --- mail/em-folder-tree-model.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'mail/em-folder-tree-model.c') diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c index 62b526496a..0f240aa056 100644 --- a/mail/em-folder-tree-model.c +++ b/mail/em-folder-tree-model.c @@ -197,7 +197,7 @@ sort_cb (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data aname = gtk_tree_path_to_string (path); gtk_tree_path_free (path); } else { - aname = g_strdup(""); + return 1; } path = gtk_tree_model_get_path (model, b); @@ -205,10 +205,12 @@ sort_cb (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data bname = gtk_tree_path_to_string (path); gtk_tree_path_free (path); } else { - bname = g_strdup(""); + g_free(aname); + return -1; } - + ret = strcmp (aname, bname); + g_free (aname); g_free (bname); -- cgit