From 7480539010bab6905c944b11b036492a1a625994 Mon Sep 17 00:00:00 2001 From: pdmef Date: Sun, 7 Aug 2005 18:10:59 +0000 Subject: [PATCH] Rocco Rutte: - revert latest sidebar update to show non-deleted messages instead of total - add/rename some $sidebar_number_format expandos to get same behavior as for $status_format (see manual and UPGRADING) (old %c and %f still kept) git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@377 e385b8ad-14ed-0310-8656-cc95a2468c6d --- UPGRADING | 6 ++ doc/manual.txt | 223 ++++++++++++++++++++++++++----------------------- init.h | 15 ++-- sidebar.c | 44 ++++++++-- 4 files changed, 172 insertions(+), 116 deletions(-) diff --git a/UPGRADING b/UPGRADING index a88c5b3..a3f0c35 100644 --- a/UPGRADING +++ b/UPGRADING @@ -10,6 +10,12 @@ This document is not the place for verbose documentation; it only offers the necessary keywords to look them up in the manual, ChangeLog or other sources of information. +2005-08-07: + + For $sidebar_number_format, the expandos %c and %f are replaced with + their $status_format pendants %m and %F respectively. Use of %c and + %f is deprecated but still kept for compatibility. + 2005-08-06: Due to merging in changes made to mutt where NSS support was dropped, diff --git a/doc/manual.txt b/doc/manual.txt index 47b941a..6c4d120 100644 --- a/doc/manual.txt +++ b/doc/manual.txt @@ -4,7 +4,7 @@ by Andreas Krennmair and others originally based on _m_u_t_t by Michael Elkins and others - version devel + version devel-r377 AAbbssttrraacctt @@ -1823,7 +1823,7 @@ Example: send-hook mutt 'set mime_forward signature=''' Another typical use for this command is to change the values of the _$_a_t_t_r_i_b_u_- - _t_i_o_n (section 6.4.15 , page 84), _$_s_i_g_n_a_t_u_r_e (section 6.4.259 , page 142) and + _t_i_o_n (section 6.4.15 , page 84), _$_s_i_g_n_a_t_u_r_e (section 6.4.259 , page 143) and _$_l_o_c_a_l_e (section 6.4.114 , page 108) variables in order to change the language of the attributions and signatures based upon the recipients. @@ -4531,7 +4531,7 @@ going messages. This is probably only useful in connection to the _s_e_n_d_-_h_o_o_k command. It can be overridden by use of the _p_g_p_-_m_e_n_u, when encryption is not required or signing is requested as well. If ``_$_s_m_i_m_e___i_s___d_e_f_a_u_l_t (section - 6.4.277 , page 146)'' is _s_e_t, then OpenSSL is used instead to create S/MIME + 6.4.277 , page 147)'' is _s_e_t, then OpenSSL is used instead to create S/MIME messages and settings can be overridden by use of the _s_m_i_m_e_-_m_e_n_u. (Crypto only) @@ -4545,7 +4545,7 @@ encryption/signing for messages. See also ``_$_c_r_y_p_t___a_u_t_o_e_n_c_r_y_p_t (section 6.4.34 , page 88)'', ``_$_c_r_y_p_t___r_e_p_l_y_e_n_c_r_y_p_t (section 6.4.38 , page 89)'', ``_$_c_r_y_p_t___a_u_t_o_s_i_g_n (section 6.4.36 , page 88)'', ``_$_c_r_y_p_t___r_e_p_l_y_s_i_g_n (section - 6.4.39 , page 89)'' and ``_$_s_m_i_m_e___i_s___d_e_f_a_u_l_t (section 6.4.277 , page 146)''. + 6.4.39 , page 89)'' and ``_$_s_m_i_m_e___i_s___d_e_f_a_u_l_t (section 6.4.277 , page 147)''. _6_._4_._3_6 _c_r_y_p_t___a_u_t_o_s_i_g_n @@ -4556,7 +4556,7 @@ Setting this variable will cause Mutt-ng to always attempt to cryptographically sign outgoing messages. This can be overridden by use of the _p_g_p_-_m_e_n_u, when signing is not required or encryption is requested as well. If - ``_$_s_m_i_m_e___i_s___d_e_f_a_u_l_t (section 6.4.277 , page 146)'' is _s_e_t, then OpenSSL is + ``_$_s_m_i_m_e___i_s___d_e_f_a_u_l_t (section 6.4.277 , page 147)'' is _s_e_t, then OpenSSL is used instead to create S/MIME messages and settings can be overridden by use of the _s_m_i_m_e_-_m_e_n_u. (Crypto only) @@ -4572,7 +4572,7 @@ encryption/signing for messages. See also ``_$_c_r_y_p_t___a_u_t_o_e_n_c_r_y_p_t (section 6.4.34 , page 88)'', ``_$_c_r_y_p_t___r_e_p_l_y_e_n_c_r_y_p_t (section 6.4.38 , page 89)'', ``_$_c_r_y_p_t___a_u_t_o_s_i_g_n (section 6.4.36 , page 88)'', ``_$_c_r_y_p_t___r_e_p_l_y_s_i_g_n (section - 6.4.39 , page 89)'' and ``_$_s_m_i_m_e___i_s___d_e_f_a_u_l_t (section 6.4.277 , page 146)''. + 6.4.39 , page 89)'' and ``_$_s_m_i_m_e___i_s___d_e_f_a_u_l_t (section 6.4.277 , page 147)''. _6_._4_._3_8 _c_r_y_p_t___r_e_p_l_y_e_n_c_r_y_p_t @@ -5785,7 +5785,7 @@ Controls the display of wrapped lines in the internal pager. If set, a ``+'' marker is displayed at the beginning of wrapped lines. Also see the - ``_$_s_m_a_r_t___w_r_a_p (section 6.4.263 , page 143)'' variable. + ``_$_s_m_a_r_t___w_r_a_p (section 6.4.263 , page 144)'' variable. _6_._4_._1_2_2 _m_a_s_k @@ -5808,7 +5808,7 @@ When _s_e_t, the maximum line length for displaying ``format = flowed'' messages is limited to this length. A value of 0 (which is also the default) means that the maximum line length is determined by the terminal width and _$_w_r_a_p_m_a_r_g_i_n - (section 6.4.335 , page 161). + (section 6.4.335 , page 162). _6_._4_._1_2_4 _m_b_o_x @@ -7498,7 +7498,7 @@ Default: '.' When the sidebar is displayed and _$_s_i_d_e_b_a_r___s_h_o_r_t_e_n___h_i_e_r_a_r_c_h_y (section - 6.4.254 , page 141) is _s_e_t, this variable specifies the characters at which to + 6.4.254 , page 142) is _s_e_t, this variable specifies the characters at which to split a folder name into ``hierarchy items.'' _6_._4_._2_5_1 _s_i_d_e_b_a_r___d_e_l_i_m @@ -7522,32 +7522,43 @@ Type: string - Default: '%c%?n?(%n)?%?f?[%f]?' + Default: '%m%?n?(%n)?%?f?[%f]?' This variable controls how message counts are printed when the sidebar is enabled. If this variable is _e_m_p_t_y (_a_n_d _o_n_l_y _i_f), no numbers will be printed _a_n_d mutt-ng won't frequently count mail (which may be a great speedup esp. with mbox-style mailboxes.) - The following printf(3)-like sequences are supported: + The following printf(3)-like sequences are supported all of which may be + printed non-zero: - %c - Total number of messages. + %d + Number of deleted messages. 1) - %f + %F Number of flagged messages. + %m + Total number of messages. + + %M + Total number of messages shown, i.e. not hidden by a limit. 1) + + The Mutt Next Generation E-Mail Client 143 + %n Number of new messages. - The %f and %n expandos may optionally be printed non-zero. + %t + Number of tagged messages. 1) + + 1) These expandos only have a non-zero value for the current mailbox and will + always be zero otherwise. _6_._4_._2_5_4 _s_i_d_e_b_a_r___s_h_o_r_t_e_n___h_i_e_r_a_r_c_h_y Type: boolean - The Mutt Next Generation E-Mail Client 143 - Default: no When _s_e_t, the ``hierarchy'' of the sidebar entries will be shortened only if @@ -7584,11 +7595,13 @@ Default: yes If set, a line containing ``-- '' (dash, dash, space) will be inserted before - your ``_$_s_i_g_n_a_t_u_r_e (section 6.4.259 , page 142)''. It is ssttrroonnggllyy recommended + your ``_$_s_i_g_n_a_t_u_r_e (section 6.4.259 , page 143)''. It is ssttrroonnggllyy recommended that you not unset this variable unless your ``signature'' contains just your name. The reason for this is because many software packages use ``-- \n'' to detect your signature. + The Mutt Next Generation E-Mail Client 144 + For example, Mutt-ng has the ability to highlight the signature in a different color in the builtin pager. @@ -7603,8 +7616,6 @@ know what you are doing, and are prepared to take some heat from netiquette guardians. - The Mutt Next Generation E-Mail Client 144 - _6_._4_._2_5_9 _s_i_g_n_a_t_u_r_e Type: path @@ -7644,6 +7655,8 @@ ~f joe | ~s joe + The Mutt Next Generation E-Mail Client 145 + _6_._4_._2_6_2 _s_l_e_e_p___t_i_m_e Type: number @@ -7659,8 +7672,6 @@ Type: boolean - The Mutt Next Generation E-Mail Client 145 - Default: yes Controls the display of lines longer than the screen width in the internal @@ -7701,6 +7712,8 @@ Type: path + The Mutt Next Generation E-Mail Client 146 + Default: '' Since there is no pubring/secring as with PGP, Mutt-ng has to handle storage @@ -7716,8 +7729,6 @@ Default: '' - The Mutt Next Generation E-Mail Client 146 - This format string specifies a command which is used to decrypt application/x- pkcs7-mime attachments. @@ -7757,6 +7768,8 @@ Default: yes + The Mutt Next Generation E-Mail Client 147 + If _s_e_t (default) this tells Mutt-ng to use the default key for decryption. Oth- erwise, if manage multiple certificate-key-pairs, Mutt-ng will try to use the mailbox-address to determine the key to use. It will ask you to supply a key, @@ -7771,8 +7784,6 @@ This is the default key-pair to use for signing. This must be set to the keyid (the hash-value that OpenSSL generates) to work properly (S/MIME only) - The Mutt Next Generation E-Mail Client 147 - _6_._4_._2_7_1 _s_m_i_m_e___e_n_c_r_y_p_t___c_o_m_m_a_n_d Type: string @@ -7813,6 +7824,8 @@ _6_._4_._2_7_5 _s_m_i_m_e___g_e_t___s_i_g_n_e_r___c_e_r_t___c_o_m_m_a_n_d + The Mutt Next Generation E-Mail Client 148 + Type: string Default: '' @@ -7827,8 +7840,6 @@ Default: '' - The Mutt Next Generation E-Mail Client 148 - This command is used to import a certificate via smime_keysng. (S/MIME only) _6_._4_._2_7_7 _s_m_i_m_e___i_s___d_e_f_a_u_l_t @@ -7868,6 +7879,8 @@ This command is used to extract PKCS7 structures of S/MIME signatures, in order to extract the public X509 certificate(s). (S/MIME only) + The Mutt Next Generation E-Mail Client 149 + _6_._4_._2_8_0 _s_m_i_m_e___s_i_g_n___c_o_m_m_a_n_d Type: string @@ -7883,8 +7896,6 @@ Default: '' - The Mutt Next Generation E-Mail Client 149 - This command is used to created S/MIME signatures of type application/x- pkcs7-signature, which can only be handled by mail clients supporting the S/MIME extension. (S/MIME only) @@ -7924,6 +7935,8 @@ Availability: SMTP + The Mutt Next Generation E-Mail Client 150 + Defines the password to use with SMTP AUTH. If ``_$_s_m_t_p___a_u_t_h___u_s_e_r_n_a_m_e (section 6.4.286 , page 148)'' is set, but this variable is not, you will be prompted for a password when sending. @@ -7939,8 +7952,6 @@ Availability: SMTP - The Mutt Next Generation E-Mail Client 150 - Defines the username to use with SMTP AUTH. Setting this variable will cause Mutt-ng to attempt to use SMTP AUTH when sending. @@ -7978,6 +7989,8 @@ Specifies how to sort messages in the _i_n_d_e_x menu. Valid values are: + The Mutt Next Generation E-Mail Client 151 + date or date-sent date-received from @@ -7992,8 +8005,6 @@ You may optionally use the ``reverse-'' prefix to specify reverse sorting order (example: set sort=reverse-date-sent). - The Mutt Next Generation E-Mail Client 151 - _6_._4_._2_9_0 _s_o_r_t___a_l_i_a_s Type: sort order @@ -8030,6 +8041,8 @@ (section 6.4.291 , page 150) is reversed again (which is not the right thing to do, but kept to not break any existing configuration setting). + The Mutt Next Generation E-Mail Client 152 + _6_._4_._2_9_2 _s_o_r_t___b_r_o_w_s_e_r Type: sort order @@ -8044,8 +8057,6 @@ size unsorted - The Mutt Next Generation E-Mail Client 152 - You may optionally use the ``reverse-'' prefix to specify reverse sorting order (example: set sort_browser=reverse-date). @@ -8058,10 +8069,10 @@ This variable is only useful when sorting by threads with ``_$_s_t_r_i_c_t___t_h_r_e_a_d_s (section 6.4.309 , page 156)'' _u_n_s_e_t. In that case, it changes the heuristic Mutt-ng uses to thread messages by subject. With _$_s_o_r_t___r_e (section 6.4.293 , - page 150) _s_e_t, Mutt-ng will only attach a message as the child of another mes- + page 151) _s_e_t, Mutt-ng will only attach a message as the child of another mes- sage by subject if the subject of the child message starts with a substring matching the setting of ``_$_r_e_p_l_y___r_e_g_e_x_p (section 6.4.231 , page 136)''. With - _$_s_o_r_t___r_e (section 6.4.293 , page 150) _u_n_s_e_t, Mutt-ng will attach the message + _$_s_o_r_t___r_e (section 6.4.293 , page 151) _u_n_s_e_t, Mutt-ng will attach the message whether or not this is the case, as long as the non-``_$_r_e_p_l_y___r_e_g_e_x_p (section 6.4.231 , page 136)'' parts of both messages are identical. @@ -8084,6 +8095,9 @@ Default: '' If your spool mailbox is in a non-default place where Mutt-ng cannot find it, + + The Mutt Next Generation E-Mail Client 153 + you can specify its location with this variable. Mutt-ng will automatically set this variable to the value of the environment variable $MAIL if it is not set. @@ -8100,8 +8114,6 @@ Example: set ssl_ca_certificates_file=/etc/ssl/certs/ca-certificates.crt - The Mutt Next Generation E-Mail Client 153 - _6_._4_._2_9_7 _s_s_l___c_l_i_e_n_t___c_e_r_t Type: path @@ -8140,6 +8152,8 @@ Type: boolean + The Mutt Next Generation E-Mail Client 154 + Default: yes Availability: SSL @@ -8155,11 +8169,8 @@ Availability: SSL or GNUTLS - This variables specifies whether to attempt to use SSLv3 in the SSL - - The Mutt Next Generation E-Mail Client 154 - - authentication process. + This variables specifies whether to attempt to use SSLv3 in the SSL authentica- + tion process. _6_._4_._3_0_2 _s_s_l___u_s_e___t_l_s_v_1 @@ -8197,6 +8208,9 @@ whether to write changes to a mailbox with the toggle-write operation, bound by default to ``%''). The fourth is used to indicate that the current folder has been opened in attach-message mode (Certain operations like composing a new + + The Mutt Next Generation E-Mail Client 155 + mail, replying, forwarding, etc. are not permitted in this mode). _6_._4_._3_0_5 _s_t_a_t_u_s___f_o_r_m_a_t @@ -8214,8 +8228,6 @@ %b number of mailboxes with new mail * - The Mutt Next Generation E-Mail Client 155 - %B the short pathname of the current mailbox @@ -8254,6 +8266,8 @@ %p number of postponed messages * + The Mutt Next Generation E-Mail Client 156 + %P percentage of the way through the index @@ -8271,8 +8285,6 @@ %t number of tagged messages * - The Mutt Next Generation E-Mail Client 156 - %u number of unread messages * @@ -8309,8 +8321,11 @@ %?n?%n new messages.? Additionally you can switch between two strings, the first one, if a value is - zero, the second one, if the value is nonzero, by using the following con- - struct: + zero, the second one, if the value is nonzero, by using the following + + The Mutt Next Generation E-Mail Client 157 + + construct: %??&? @@ -8328,8 +8343,6 @@ Type: boolean - The Mutt Next Generation E-Mail Client 157 - Default: no Setting this variable causes the ``status bar'' to be displayed on the first @@ -8365,6 +8378,8 @@ a single space to prevent the display of MIME-encoded ``Subject:'' header field from being devided into multiple lines. + The Mutt Next Generation E-Mail Client 158 + _6_._4_._3_0_9 _s_t_r_i_c_t___t_h_r_e_a_d_s Type: boolean @@ -8384,10 +8399,8 @@ Default: no - The Mutt Next Generation E-Mail Client 158 - When _s_e_t, mutt-ng will remove the trailing part of the ``Subject:'' line which - matches _$_s_t_r_i_p___w_a_s___r_e_g_e_x (section 6.4.311 , page 156) when replying. This is + matches _$_s_t_r_i_p___w_a_s___r_e_g_e_x (section 6.4.311 , page 157) when replying. This is useful to properly react on subject changes and reduce ``subject noise.'' (esp. in Usenet) @@ -8420,6 +8433,8 @@ usually CTRL+Z. This is useful if you run Mutt-ng inside an xterm using a com- mand like ``xterm -e muttng.'' + The Mutt Next Generation E-Mail Client 159 + _6_._4_._3_1_4 _t_e_x_t___f_l_o_w_e_d Type: boolean @@ -8440,8 +8455,6 @@ Default: no - The Mutt Next Generation E-Mail Client 159 - Affects the ~b and ~h search operations described in section ``_p_a_t_t_e_r_n_s (sec- tion 6.2 , page 77)'' above. If _s_e_t, the headers and attachments of messages to be searched are decoded before searching. If _u_n_s_e_t, messages are searched @@ -8475,6 +8488,8 @@ pressed in the main menu before timing out and checking for new mail. A value of zero or less will cause Mutt-ng to never time out. + The Mutt Next Generation E-Mail Client 160 + _6_._4_._3_1_9 _t_m_p_d_i_r Type: path @@ -8496,9 +8511,6 @@ acter is the one used when the mail is NOT addressed to your address (default: space). The second is used when you are the only recipient of the message (default: +). The third is when your address appears in the ``To:'' header - - The Mutt Next Generation E-Mail Client 160 - field, but you are not the only recipient of the message (default: T). The fourth character is used when your address is specified in the ``Cc:'' header field, but you are not the only recipient. The fifth character is used to @@ -8532,6 +8544,8 @@ NNoottee:: For this example to work you must be able to log in to the remote machine without having to enter a password. + The Mutt Next Generation E-Mail Client 161 + _6_._4_._3_2_3 _u_m_a_s_k Type: number @@ -8554,8 +8568,6 @@ Type: boolean - The Mutt Next Generation E-Mail Client 161 - Default: no WWaarrnniinngg:: do not set this variable unless you are using a version of sendmail @@ -8589,6 +8601,8 @@ Type: boolean + The Mutt Next Generation E-Mail Client 162 + Default: yes Availability: IDN @@ -8610,8 +8624,6 @@ _6_._4_._3_3_0 _u_s_e_r___a_g_e_n_t - The Mutt Next Generation E-Mail Client 162 - Type: boolean Default: yes @@ -8644,6 +8656,8 @@ When _s_e_t, Mutt-ng will always ask for a key. When _u_n_s_e_t, Mutt-ng will wait for a key only if the external command returned a non-zero status. + The Mutt Next Generation E-Mail Client 163 + _6_._4_._3_3_3 _w_e_e_d Type: boolean @@ -8666,8 +8680,6 @@ _6_._4_._3_3_5 _w_r_a_p_m_a_r_g_i_n - The Mutt Next Generation E-Mail Client 163 - Type: number Default: 0 @@ -8700,10 +8712,12 @@ Type: string + The Mutt Next Generation E-Mail Client 164 + Default: 'M%?n?AIL&ail?' Controls the format of the X11 icon title, as long as _$_x_t_e_r_m___s_e_t___t_i_t_l_e_s (sec- - tion 6.4.340 , page 162) is _s_e_t. This string is identical in formatting to the + tion 6.4.340 , page 163) is _s_e_t. This string is identical in formatting to the one used by ``_$_s_t_a_t_u_s___f_o_r_m_a_t (section 6.4.305 , page 153)''. _6_._4_._3_3_9 _x_t_e_r_m___l_e_a_v_e @@ -8712,7 +8726,7 @@ Default: '' - If _$_x_t_e_r_m___s_e_t___t_i_t_l_e_s (section 6.4.340 , page 162) is _s_e_t, this string will be + If _$_x_t_e_r_m___s_e_t___t_i_t_l_e_s (section 6.4.340 , page 163) is _s_e_t, this string will be used to set the title when leaving mutt-ng. For terminal-based programs, there's no easy and portable way to read the current title so mutt-ng cannot read it upon startup and restore it when exiting. @@ -8722,8 +8736,6 @@ set xterm_leave = '`test x$DISPLAY != x && xprop -id $WINDOWID | grep WM_NAME | cut -d ''' -f 2`' - The Mutt Next Generation E-Mail Client 164 - _6_._4_._3_4_0 _x_t_e_r_m___s_e_t___t_i_t_l_e_s Type: boolean @@ -8741,7 +8753,7 @@ Default: 'Mutt-ng with %?m?%m messages&no messages?%?n? [%n New]?' Controls the format of the title bar of the xterm provided that - _$_x_t_e_r_m___s_e_t___t_i_t_l_e_s (section 6.4.340 , page 162) has been _s_e_t. This string is + _$_x_t_e_r_m___s_e_t___t_i_t_l_e_s (section 6.4.340 , page 163) has been _s_e_t. This string is identical in formatting to the one used by ``_$_s_t_a_t_u_s___f_o_r_m_a_t (section 6.4.305 , page 153)''. @@ -8755,12 +8767,13 @@ _6_._5_._1 _g_e_n_e_r_i_c The _g_e_n_e_r_i_c menu is not a real menu, but specifies common functions (such as - movement) available in all menus except for _p_a_g_e_r and _e_d_i_t_o_r. Changing set- - tings for this menu will affect the default bindings for all menus (except as - noted). + movement) available in all menus except for _p_a_g_e_r and _e_d_i_t_o_r. Changing The Mutt Next Generation E-Mail Client 165 + settings for this menu will affect the default bindings for all menus (except + as noted). + bottom-page L move to the bottom of the page current-bottom not bound move current entry to bottom of page current-middle not bound move current entry to middle of page @@ -9611,39 +9624,39 @@ 6.4.251 sidebar_delim 142 6.4.252 sidebar_newmail_only 142 6.4.253 sidebar_number_format 142 - 6.4.254 sidebar_shorten_hierarchy 142 + 6.4.254 sidebar_shorten_hierarchy 143 6.4.255 sidebar_visible 143 6.4.256 sidebar_width 143 6.4.257 sig_dashes 143 - 6.4.258 sig_on_top 143 + 6.4.258 sig_on_top 144 6.4.259 signature 144 6.4.260 signoff_string 144 6.4.261 simple_search 144 - 6.4.262 sleep_time 144 - 6.4.263 smart_wrap 144 + 6.4.262 sleep_time 145 + 6.4.263 smart_wrap 145 6.4.264 smileys 145 6.4.265 smime_ask_cert_label 145 6.4.266 smime_ca_location 145 6.4.267 smime_certificates 145 - 6.4.268 smime_decrypt_command 145 + 6.4.268 smime_decrypt_command 146 6.4.269 smime_decrypt_use_default_key 146 - 6.4.270 smime_default_key 146 + 6.4.270 smime_default_key 147 6.4.271 smime_encrypt_command 147 6.4.272 smime_encrypt_with 147 6.4.273 smime_get_cert_command 147 6.4.274 smime_get_cert_email_command 147 6.4.275 smime_get_signer_cert_command 147 - 6.4.276 smime_import_cert_command 147 + 6.4.276 smime_import_cert_command 148 6.4.277 smime_is_default 148 6.4.278 smime_keys 148 6.4.279 smime_pk7out_command 148 - 6.4.280 smime_sign_command 148 - 6.4.281 smime_sign_opaque_command 148 + 6.4.280 smime_sign_command 149 + 6.4.281 smime_sign_opaque_command 149 6.4.282 smime_timeout 149 6.4.283 smime_verify_command 149 6.4.284 smime_verify_opaque_command 149 6.4.285 smtp_auth_password 149 - 6.4.286 smtp_auth_username 149 + 6.4.286 smtp_auth_username 150 6.4.287 smtp_host 150 viii @@ -9652,54 +9665,54 @@ 6.4.289 sort 150 6.4.290 sort_alias 151 6.4.291 sort_aux 151 - 6.4.292 sort_browser 151 + 6.4.292 sort_browser 152 6.4.293 sort_re 152 6.4.294 spam_separator 152 6.4.295 spoolfile 152 - 6.4.296 ssl_ca_certificates_file 152 + 6.4.296 ssl_ca_certificates_file 153 6.4.297 ssl_client_cert 153 6.4.298 ssl_min_dh_prime_bits 153 6.4.299 ssl_starttls 153 6.4.300 ssl_use_sslv2 153 - 6.4.301 ssl_use_sslv3 153 + 6.4.301 ssl_use_sslv3 154 6.4.302 ssl_use_tlsv1 154 6.4.303 ssl_usesystemcerts 154 6.4.304 status_chars 154 - 6.4.305 status_format 154 - 6.4.306 status_on_top 156 + 6.4.305 status_format 155 + 6.4.306 status_on_top 157 6.4.307 strict_mailto 157 6.4.308 strict_mime 157 - 6.4.309 strict_threads 157 - 6.4.310 strip_was 157 + 6.4.309 strict_threads 158 + 6.4.310 strip_was 158 6.4.311 strip_was_regex 158 6.4.312 stuff_quoted 158 6.4.313 suspend 158 - 6.4.314 text_flowed 158 - 6.4.315 thorough_search 158 + 6.4.314 text_flowed 159 + 6.4.315 thorough_search 159 6.4.316 thread_received 159 6.4.317 tilde 159 6.4.318 timeout 159 - 6.4.319 tmpdir 159 - 6.4.320 to_chars 159 + 6.4.319 tmpdir 160 + 6.4.320 to_chars 160 6.4.321 trash 160 6.4.322 tunnel 160 - 6.4.323 umask 160 - 6.4.324 uncollapse_jump 160 - 6.4.325 use_8bitmime 160 + 6.4.323 umask 161 + 6.4.324 uncollapse_jump 161 + 6.4.325 use_8bitmime 161 6.4.326 use_domain 161 6.4.327 use_from 161 6.4.328 use_idn 161 - 6.4.329 use_ipv6 161 - 6.4.330 user_agent 161 + 6.4.329 use_ipv6 162 + 6.4.330 user_agent 162 6.4.331 visual 162 6.4.332 wait_key 162 - 6.4.333 weed 162 - 6.4.334 wrap_search 162 - 6.4.335 wrapmargin 162 + 6.4.333 weed 163 + 6.4.334 wrap_search 163 + 6.4.335 wrapmargin 163 6.4.336 write_bcc 163 6.4.337 write_inc 163 6.4.338 xterm_icon 163 - 6.4.339 xterm_leave 163 + 6.4.339 xterm_leave 164 6.4.340 xterm_set_titles 164 ix diff --git a/init.h b/init.h index 4e78663..de6c9dc 100644 --- a/init.h +++ b/init.h @@ -1400,7 +1400,7 @@ struct option_t MuttVars[] = { ** .pp ** If \fIset\fP, only folders with new mail will be shown in the sidebar. */ - {"sidebar_number_format", DT_STR, R_BOTH, UL &SidebarNumberFormat, UL "%c%?n?(%n)?%?f?[%f]?"}, + {"sidebar_number_format", DT_STR, R_BOTH, UL &SidebarNumberFormat, UL "%m%?n?(%n)?%?f?[%f]?"}, /* ** .pp ** This variable controls how message counts are printed when the sidebar @@ -1408,15 +1408,20 @@ struct option_t MuttVars[] = { ** will be printed \fIand\fP mutt-ng won't frequently count mail (which ** may be a great speedup esp. with mbox-style mailboxes.) ** .pp - ** The following \fTprintf(3)\fP-like sequences are supported: + ** The following \fTprintf(3)\fP-like sequences are supported all of which + ** may be printed non-zero: ** .pp ** .dl - ** .dt %c .dd Total number of messages. - ** .dt %f .dd Number of flagged messages. + ** .dt %d .dd Number of deleted messages. 1) + ** .dt %F .dd Number of flagged messages. + ** .dt %m .dd Total number of messages. + ** .dt %M .dd Total number of messages shown, i.e. not hidden by a limit. 1) ** .dt %n .dd Number of new messages. + ** .dt %t .dd Number of tagged messages. 1) ** .de ** .pp - ** The \fT%f\fP and \fT%n\fP expandos may optionally be printed non-zero. + ** 1) These expandos only have a non-zero value for the current mailbox and + ** will always be zero otherwise. */ {"sidebar_shorten_hierarchy", DT_BOOL, R_NONE, OPTSHORTENHIERARCHY, 0}, /* diff --git a/sidebar.c b/sidebar.c index e2b417e..6fd5ce0 100644 --- a/sidebar.c +++ b/sidebar.c @@ -109,10 +109,41 @@ static const char* sidebar_number_format (char* dest, size_t destlen, char op, int c = Context && str_eq (Context->path, b->path); switch (op) { - case 'c': - snprintf (tmp, sizeof (tmp), "%%%sd", fmt); - snprintf (dest, destlen, tmp, c ? (Context->msgcount - Context->deleted) : b->msgcount); + /* deleted */ + case 'd': + if (!opt) { + snprintf (tmp, sizeof (tmp), "%%%sd", fmt); + snprintf (dest, destlen, tmp, c ? Context->deleted : 0); + } else if ((c && Context->deleted == 0) || !c) + opt = 0; + break; + /* flagged */ + case 'F': + case 'f': /* for compatibility */ + if (!opt) { + snprintf (tmp, sizeof (tmp), "%%%sd", fmt); + snprintf (dest, destlen, tmp, c ? Context->flagged : b->msg_flagged); + } else if ((c && Context->flagged == 0) || (!c && b->msg_flagged == 0)) + opt = 0; break; + /* total */ + case 'c': /* for compatibility */ + case 'm': + if (!opt) { + snprintf (tmp, sizeof (tmp), "%%%sd", fmt); + snprintf (dest, destlen, tmp, c ? Context->msgcount : b->msgcount); + } else if ((c && Context->msgcount == 0) || (!c && b->msgcount == 0)) + opt = 0; + break; + /* total shown, i.e. not hidden by limit */ + case 'M': + if (!opt) { + snprintf (tmp, sizeof (tmp), "%%%sd", fmt); + snprintf (dest, destlen, tmp, c ? Context->vcount : 0); + } else if ((c && Context->vcount == 0) || !c) + opt = 0; + break; + /* new */ case 'n': if (!opt) { snprintf (tmp, sizeof (tmp), "%%%sd", fmt); @@ -120,11 +151,12 @@ static const char* sidebar_number_format (char* dest, size_t destlen, char op, } else if ((c && Context->unread == 0) || (!c && b->msg_unread == 0)) opt = 0; break; - case 'f': + /* tagged */ + case 't': if (!opt) { snprintf (tmp, sizeof (tmp), "%%%sd", fmt); - snprintf (dest, destlen, tmp, c ? Context->flagged : b->msg_flagged); - } else if ((c && Context->flagged == 0) || (!c && b->msg_flagged == 0)) + snprintf (dest, destlen, tmp, c ? Context->tagged : 0); + } else if ((c && Context->tagged == 0) || !c) opt = 0; break; } -- 2.20.1