aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);