aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-storage-set-view.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/e-storage-set-view.c')
-rw-r--r--shell/e-storage-set-view.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/shell/e-storage-set-view.c b/shell/e-storage-set-view.c
index 15d297f5ef..a858f3b626 100644
--- a/shell/e-storage-set-view.c
+++ b/shell/e-storage-set-view.c
@@ -206,6 +206,23 @@ get_pixmap_and_mask_for_folder (EStorageSetView *storage_set_view,
#undef ICON_HEIGHT
}
+static int
+folder_compare_cb (gconstpointer a, gconstpointer b)
+{
+ EFolder *folder_a;
+ EFolder *folder_b;
+ const char *name_a;
+ const char *name_b;
+
+ folder_a = E_FOLDER (a);
+ folder_b = E_FOLDER (b);
+
+ name_a = e_folder_get_name (folder_a);
+ name_b = e_folder_get_name (folder_b);
+
+ return strcmp (name_a, name_b);
+}
+
static void
insert_folders (EStorageSetView *storage_set_view,
GtkCTreeNode *parent,
@@ -229,6 +246,8 @@ insert_folders (EStorageSetView *storage_set_view,
if (folder_list == NULL)
return;
+ folder_list = g_list_sort (folder_list, folder_compare_cb);
+
for (p = folder_list; p != NULL; p = p->next) {
EFolder *folder;
const char *folder_name;