diff options
author | Not Zed <NotZed@Ximian.com> | 2004-03-11 15:02:58 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-03-11 15:02:58 +0800 |
commit | d3a7e6343b8484d319faa97ca7908dd50cbe6255 (patch) | |
tree | a238370bbebad6c6d9b502306ac234d58ef99c5f /mail/em-folder-tree-model.c | |
parent | 299e621e3792ddce87e03bca90f0bb832263cc4a (diff) | |
download | gsoc2013-evolution-d3a7e6343b8484d319faa97ca7908dd50cbe6255.tar.gz gsoc2013-evolution-d3a7e6343b8484d319faa97ca7908dd50cbe6255.tar.zst gsoc2013-evolution-d3a7e6343b8484d319faa97ca7908dd50cbe6255.zip |
when we sort, handle not having the node in the tree. otherwise we always
2004-03-11 Not Zed <NotZed@Ximian.com>
* 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
Diffstat (limited to 'mail/em-folder-tree-model.c')
-rw-r--r-- | mail/em-folder-tree-model.c | 8 |
1 files changed, 5 insertions, 3 deletions
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); |