]> git.llucax.com Git - software/mutt-debian.git/blobdiff - debian/patches/mutt-patched/sidebar-dotted
sidebar: don't overwrite the status if status_on_top is enabled (Closes: 494735)
[software/mutt-debian.git] / debian / patches / mutt-patched / sidebar-dotted
index 2c07d0b8ee5e8aca22346c2756f4dd80b7e10dc0..070a0cb306db4cc2ceade35867679b91832078fa 100644 (file)
@@ -9,17 +9,15 @@ This patch enables mutt to find these dots and
 
 I hope, it's usefull for someone ;)
 
 
 I hope, it's usefull for someone ;)
 
-Index: mutt/sidebar.c
-===================================================================
---- mutt.orig/sidebar.c        2009-06-25 12:36:53.000000000 +0200
-+++ mutt/sidebar.c     2009-06-25 12:36:59.000000000 +0200
+--- a/sidebar.c
++++ b/sidebar.c
 @@ -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++;
 @@ -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)) {
                        if (sidebar_folder_depth > 0) {
 -                              sidebar_folder_name = malloc(strlen(basename(tmp->path)) + sidebar_folder_depth + 1);
 +                              if (option(OPTSIDEBARSHORTPATH)) {
@@ -27,7 +25,7 @@ Index: mutt/sidebar.c
 +                                      if (tmp_folder_name == NULL)
 +                                              tmp_folder_name = tmp->path;
 +                                      else
 +                                      if (tmp_folder_name == NULL)
 +                                              tmp_folder_name = tmp->path;
 +                                      else
-+                                              tmp_folder_name++;
++                                              tmp_folder_name++;
 +                              }
 +                              else
 +                                      tmp_folder_name = tmp->path;
 +                              }
 +                              else
 +                                      tmp_folder_name = tmp->path;
@@ -40,11 +38,9 @@ Index: mutt/sidebar.c
                        }
                }
                printw( "%.*s", SidebarWidth - delim_len + 1,
                        }
                }
                printw( "%.*s", SidebarWidth - delim_len + 1,
-Index: mutt/init.h
-===================================================================
---- mutt.orig/init.h   2009-06-25 12:36:53.000000000 +0200
-+++ mutt/init.h        2009-06-25 12:36:59.000000000 +0200
-@@ -1969,6 +1969,11 @@
+--- a/init.h
++++ b/init.h
+@@ -1981,6 +1981,11 @@
    ** .pp
    ** The width of the sidebar.
    */
    ** .pp
    ** The width of the sidebar.
    */
@@ -56,11 +52,9 @@ Index: mutt/init.h
    { "pgp_use_gpg_agent", DT_BOOL, R_NONE, OPTUSEGPGAGENT, 0},
    /*
    ** .pp
    { "pgp_use_gpg_agent", DT_BOOL, R_NONE, OPTUSEGPGAGENT, 0},
    /*
    ** .pp
-Index: mutt/mutt.h
-===================================================================
---- mutt.orig/mutt.h   2009-06-25 12:36:53.000000000 +0200
-+++ mutt/mutt.h        2009-06-25 12:36:59.000000000 +0200
-@@ -426,6 +426,7 @@
+--- a/mutt.h
++++ b/mutt.h
+@@ -432,6 +432,7 @@
    OPTSAVENAME,
    OPTSCORE,
    OPTSIDEBAR,
    OPTSAVENAME,
    OPTSCORE,
    OPTSIDEBAR,
@@ -68,3 +62,18 @@ Index: mutt/mutt.h
    OPTSIGDASHES,
    OPTSIGONTOP,
    OPTSORTRE,
    OPTSIGDASHES,
    OPTSIGONTOP,
    OPTSORTRE,
+--- a/debian/extra/samples/sidebar.muttrc
++++ b/debian/extra/samples/sidebar.muttrc
+@@ -50,7 +50,11 @@
+ # 
+ # sidebar_delim (string)
+ # Specifies the delimiter between the sidebar and other screens
+-# 
++#
++# sidebar_shortpath (boolean)
++# When using IMAP, a '.' is often used as a separator. This option
++# allows to shorten the folder name to the part after the last dot.
++#
+ # color sidebar_new [fg] [bg]
+ # The foreground (fg) and background (bg) color of folders that contain new
+ # mail.