1 From: Evgeni Golov <sargentd@die-welt.net>
4 When using IMAP and imap_check_subscribed, the server reports the
5 dirs in a random order.
6 This patch introduces a new option, sidebar_sort. Which, when it is
7 set, sorts the dirs in the sidebar alphabetically.
9 I hope, it's usefull for someone ;)
11 PS: This has to be applied ontop of my sidebar-dotted patch, but it
12 should be easy to adopt it to a vanilla mutt.
15 ===================================================================
16 --- mutt.orig/sidebar.c 2009-06-25 12:36:59.000000000 +0200
17 +++ mutt/sidebar.c 2009-06-25 12:37:03.000000000 +0200
19 for ( ; tmp->next != 0; tmp = tmp->next )
20 tmp->next->prev = tmp;
22 + if (option(OPTSIDEBARSORT)) {
27 + while (needsort==1) {
30 + for ( ; tmp ; tmp=tmp->next ) {
31 + if (tmp->next != NULL && strcmp(tmp->path, tmp->next->path) > 0) {
51 if ( TopBuffy == 0 && BottomBuffy == 0 )
53 if ( BottomBuffy == 0 ) {
55 ===================================================================
56 --- mutt.orig/init.h 2009-06-25 12:36:59.000000000 +0200
57 +++ mutt/init.h 2009-06-25 12:37:03.000000000 +0200
58 @@ -1974,6 +1974,11 @@
60 ** Should the sidebar shorten the path showed.
62 + { "sidebar_sort", DT_BOOL, R_BOTH, OPTSIDEBARSORT, 0 },
65 + ** Should the sidebar be sorted.
67 { "pgp_use_gpg_agent", DT_BOOL, R_NONE, OPTUSEGPGAGENT, 0},
71 ===================================================================
72 --- mutt.orig/mutt.h 2009-06-25 12:36:59.000000000 +0200
73 +++ mutt/mutt.h 2009-06-25 12:37:03.000000000 +0200