diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2000-05-14 09:53:42 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2000-05-14 09:53:42 +0800 |
commit | eab1fd11357334c4ec3454ce9efacb220deabc12 (patch) | |
tree | 31d0d5f20b3c19e90081e3058e35c39bc7f4f021 /shell/e-storage-set-view.c | |
parent | fe60e68db6cc9066d934f884ec6c4386c7f6570a (diff) | |
download | gsoc2013-evolution-eab1fd11357334c4ec3454ce9efacb220deabc12.tar gsoc2013-evolution-eab1fd11357334c4ec3454ce9efacb220deabc12.tar.gz gsoc2013-evolution-eab1fd11357334c4ec3454ce9efacb220deabc12.tar.bz2 gsoc2013-evolution-eab1fd11357334c4ec3454ce9efacb220deabc12.tar.lz gsoc2013-evolution-eab1fd11357334c4ec3454ce9efacb220deabc12.tar.xz gsoc2013-evolution-eab1fd11357334c4ec3454ce9efacb220deabc12.tar.zst gsoc2013-evolution-eab1fd11357334c4ec3454ce9efacb220deabc12.zip |
Sort folders in the storage view.
svn path=/trunk/; revision=3023
Diffstat (limited to 'shell/e-storage-set-view.c')
-rw-r--r-- | shell/e-storage-set-view.c | 19 |
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; |