Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 274449 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 handle "." in IMAP-locations
sidebar-dotted.patch (text/plain), 2.54 KB, created by
avx
on 2011-05-24 03:10:49 UTC
(
hide
)
Description:
patch to handle "." in IMAP-locations
Filename:
MIME Type:
Creator:
avx
Created:
2011-05-24 03:10:49 UTC
Size:
2.54 KB
patch
obsolete
>From: Evgeni Golov <sargentd@die-welt.net> >License: 3-BSD > >When using IMAP, a '.' is often used as a separator instead of '/'. >This patch enables mutt to find these dots and >1. correctly intend the dir in the sidebar >2. if "sidebar_shortpath" is set, shorten the dir to the part after > the last dot > >I hope, it's usefull for someone ;) > >Index: mutt-1.5.20/sidebar.c >=================================================================== >--- mutt-1.5.20.orig/sidebar.c 2009-06-17 10:46:20.000000000 +0200 >+++ mutt-1.5.20/sidebar.c 2009-06-17 10:47:48.000000000 +0200 >@@ -255,14 +255,23 @@ > int i; > tmp_folder_name = tmp->path + strlen(Maildir); > for (i = 0; i < strlen(tmp->path) - strlen(Maildir); i++) { >- if (tmp_folder_name[i] == '/') sidebar_folder_depth++; >+ if (tmp_folder_name[i] == '/' || tmp_folder_name[i] == '.') sidebar_folder_depth++; > } > if (sidebar_folder_depth > 0) { >- sidebar_folder_name = malloc(strlen(basename(tmp->path)) + sidebar_folder_depth + 1); >+ if (option(OPTSIDEBARSHORTPATH)) { >+ tmp_folder_name = strrchr(tmp->path, '.'); >+ if (tmp_folder_name == NULL) >+ tmp_folder_name = tmp->path; >+ else >+ tmp_folder_name++; >+ } >+ else >+ tmp_folder_name = tmp->path; >+ sidebar_folder_name = malloc(strlen(basename(tmp_folder_name)) + sidebar_folder_depth + 1); > for (i=0; i < sidebar_folder_depth; i++) > sidebar_folder_name[i]=' '; > sidebar_folder_name[i]=0; >- strncat(sidebar_folder_name, basename(tmp->path), strlen(basename(tmp->path)) + sidebar_folder_depth); >+ strncat(sidebar_folder_name, basename(tmp_folder_name), strlen(basename(tmp_folder_name)) + sidebar_folder_depth); > } > } > printw( "%.*s", SidebarWidth - delim_len + 1, >Index: mutt-1.5.20/mutt.h >=================================================================== >--- mutt-1.5.20.orig/mutt.h 2009-06-17 10:47:58.000000000 +0200 >+++ mutt-1.5.20/mutt.h 2009-06-17 10:48:20.000000000 +0200 >@@ -427,6 +427,7 @@ > OPTSAVENAME, > OPTSCORE, > OPTSIDEBAR, >+ OPTSIDEBARSHORTPATH, > OPTSIGDASHES, > OPTSIGONTOP, > OPTSORTRE, >Index: mutt-1.5.20/init.h >=================================================================== >--- mutt-1.5.20.orig/init.h 2009-06-17 10:48:41.000000000 +0200 >+++ mutt-1.5.20/init.h 2009-06-17 10:49:14.000000000 +0200 >@@ -1979,6 +1979,11 @@ > ** .pp > ** The width of the sidebar. > */ >+ { "sidebar_shortpath", DT_BOOL, R_BOTH, OPTSIDEBARSHORTPATH, 0 }, >+ /* >+ ** .pp >+ ** Should the sidebar shorten the path showed. >+ */ > { "pgp_use_gpg_agent", DT_BOOL, R_NONE, OPTUSEGPGAGENT, 0}, > /* > ** .pp
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