aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-03-11 15:02:58 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-03-11 15:02:58 +0800
commitd3a7e6343b8484d319faa97ca7908dd50cbe6255 (patch)
treea238370bbebad6c6d9b502306ac234d58ef99c5f /mail
parent299e621e3792ddce87e03bca90f0bb832263cc4a (diff)
downloadgsoc2013-evolution-d3a7e6343b8484d319faa97ca7908dd50cbe6255.tar
gsoc2013-evolution-d3a7e6343b8484d319faa97ca7908dd50cbe6255.tar.gz
gsoc2013-evolution-d3a7e6343b8484d319faa97ca7908dd50cbe6255.tar.bz2
gsoc2013-evolution-d3a7e6343b8484d319faa97ca7908dd50cbe6255.tar.lz
gsoc2013-evolution-d3a7e6343b8484d319faa97ca7908dd50cbe6255.tar.xz
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')
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/em-folder-tree-model.c8
2 files changed, 10 insertions, 3 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 688ddebfbb..062482a543 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,10 @@
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.
+
* em-folder-tree.c (tree_drag_motion): make dnd look funny for
joe. #55246.
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);