Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 274451 Details for
Bug 368519
mail-client/mutt - patches making sidebar more useful
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to sort the sidebar's IMAP-folder
sidebar-sorted.patch (text/plain), 2.25 KB, created by
avx
on 2011-05-24 03:11:34 UTC
(
hide
)
Description:
patch to sort the sidebar's IMAP-folder
Filename:
MIME Type:
Creator:
avx
Created:
2011-05-24 03:11:34 UTC
Size:
2.25 KB
patch
obsolete
>From: Evgeni Golov <sargentd@die-welt.net> >License: 3-BSD > >When using IMAP and imap_check_subscribed, the server reports the >dirs in a random order. >This patch introduces a new option, sidebar_sort. Which, when it is >set, sorts the dirs in the sidebar alphabetically. > >I hope, it's usefull for someone ;) > >PS: This has to be applied ontop of my sidebar-dotted patch, but it >should be easy to adopt it to a vanilla mutt. > >Index: mutt-1.5.20/init.h >=================================================================== >--- mutt-1.5.20.orig/init.h 2009-06-17 10:50:32.000000000 +0200 >+++ mutt-1.5.20/init.h 2009-06-17 10:50:47.000000000 +0200 >@@ -1984,6 +1984,11 @@ > ** .pp > ** Should the sidebar shorten the path showed. > */ >+ { "sidebar_sort", DT_BOOL, R_BOTH, OPTSIDEBARSORT, 0 }, >+ /* >+ ** .pp >+ ** Should the sidebar be sorted. >+ */ > { "pgp_use_gpg_agent", DT_BOOL, R_NONE, OPTUSEGPGAGENT, 0}, > /* > ** .pp >Index: mutt-1.5.20/mutt.h >=================================================================== >--- mutt-1.5.20.orig/mutt.h 2009-06-17 10:50:37.000000000 +0200 >+++ mutt-1.5.20/mutt.h 2009-06-17 10:50:47.000000000 +0200 >@@ -428,6 +428,7 @@ > OPTSCORE, > OPTSIDEBAR, > OPTSIDEBARSHORTPATH, >+ OPTSIDEBARSORT, > OPTSIGDASHES, > OPTSIGONTOP, > OPTSORTRE, >Index: mutt-1.5.20/sidebar.c >=================================================================== >--- mutt-1.5.20.orig/sidebar.c 2009-06-17 10:50:28.000000000 +0200 >+++ mutt-1.5.20/sidebar.c 2009-06-17 10:50:47.000000000 +0200 >@@ -54,6 +54,35 @@ > for ( ; tmp->next != 0; tmp = tmp->next ) > tmp->next->prev = tmp; > >+ if (option(OPTSIDEBARSORT)) { >+ int needsort=1; >+ BUFFY *prev; >+ BUFFY *next; >+ BUFFY *tmp2; >+ while (needsort==1) { >+ needsort=0; >+ tmp = Incoming; >+ for ( ; tmp ; tmp=tmp->next ) { >+ if (tmp->next != NULL && strcmp(tmp->path, tmp->next->path) > 0) { >+ needsort=1; >+ prev = tmp->prev; >+ next = tmp->next; >+ if (prev != NULL) >+ prev->next = next; >+ else >+ Incoming = next; >+ next->prev = prev; >+ tmp2 = next->next; >+ next->next = tmp; >+ tmp->prev = next; >+ tmp->next = tmp2; >+ if (tmp2 != NULL) >+ tmp2->prev = tmp; >+ } >+ } >+ } >+ } >+ > if ( TopBuffy == 0 && BottomBuffy == 0 ) > TopBuffy = Incoming; > if ( BottomBuffy == 0 ) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 368519
:
274449
| 274451