summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
161e810)
implemented feature request #643
git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@87
e385b8ad-14ed-0310-8656-
cc95a2468c6d
2005-02-24:
* Integrated another sidebar fix and a build fix from Rocco Rutte.
2005-02-24:
* Integrated another sidebar fix and a build fix from Rocco Rutte.
+ * Implemented feature request that the number of tagged messages is shown in the sidebar
2005-02-23:
* Integrated assume_charset patch from http://www.emaillab.org/mutt/download15.html.en
2005-02-23:
* Integrated assume_charset patch from http://www.emaillab.org/mutt/download15.html.en
}
tmp->msgcount = 0;
tmp->msg_unread = 0;
}
tmp->msgcount = 0;
tmp->msg_unread = 0;
while ((de = readdir (dirp)) != NULL)
{
char *p;
while ((de = readdir (dirp)) != NULL)
{
char *p;
short has_new; /* set it new if new and not read */
int msgcount; /* total number of messages */
int msg_unread; /* number of unread messages */
short has_new; /* set it new if new and not read */
int msgcount; /* total number of messages */
int msg_unread; /* number of unread messages */
+ int msg_tagged; /* number of tagged messages */
short notified; /* user has been notified */
short magic; /* mailbox type */
short newly_created; /* mbox or mmdf just popped into existence */
short notified; /* user has been notified */
short magic; /* mailbox type */
short newly_created; /* mbox or mmdf just popped into existence */
return safe_strdup(box);
}
return safe_strdup(box);
}
-char *make_sidebar_entry(char *box, int size, int new)
+char *make_sidebar_entry(char *box, int size, int new, int tagged)
{
char *c;
int i = 0, dlen = mutt_strlen (SidebarDelim);
{
char *c;
int i = 0, dlen = mutt_strlen (SidebarDelim);
i = strlen(box);
strncpy( entry, box, i < SidebarWidth - dlen ? i :SidebarWidth - dlen);
i = strlen(box);
strncpy( entry, box, i < SidebarWidth - dlen ? i :SidebarWidth - dlen);
- if ( new )
- sprintf(entry + SidebarWidth - 3 - quick_log10(size) - dlen - quick_log10(new),
- "% d(%d)", size, new);
- else
- sprintf( entry + SidebarWidth - 1 - quick_log10(size) - dlen, "% d", size);
+ if ( new ) {
+ if (tagged>0) {
+ sprintf(entry + SidebarWidth - 5 - quick_log10(size) - dlen - quick_log10(new) - quick_log10(tagged),
+ "% d(%d)[%d]", size, new, tagged);
+ } else {
+ sprintf(entry + SidebarWidth - 3 - quick_log10(size) - dlen - quick_log10(new),
+ "% d(%d)", size, new);
+ }
+ } else {
+ if (tagged>0) {
+ sprintf( entry + SidebarWidth - 3 - quick_log10(size) - dlen - quick_log10(tagged), "% d[%d]", size,tagged);
+ } else {
+ sprintf( entry + SidebarWidth - 1 - quick_log10(size) - dlen, "% d", size);
+ }
+
+ }
if (option(OPTSHORTENHIERARCHY)) {
free(box);
}
if (option(OPTSHORTENHIERARCHY)) {
free(box);
}
{
tmp->msg_unread = Context->unread;
tmp->msgcount = Context->msgcount;
{
tmp->msg_unread = Context->unread;
tmp->msgcount = Context->msgcount;
+ tmp->msg_tagged = Context->flagged;
break;
}
tmp = tmp->next;
break;
}
tmp = tmp->next;
if ( Context && !strcmp( tmp->path, Context->path ) ) {
printw( "%.*s", SidebarWidth - delim_len,
make_sidebar_entry(basename(tmp->path),
if ( Context && !strcmp( tmp->path, Context->path ) ) {
printw( "%.*s", SidebarWidth - delim_len,
make_sidebar_entry(basename(tmp->path),
- Context->msgcount, Context->unread));
+ Context->msgcount, Context->unread, Context->tagged));
tmp->msg_unread = Context->unread;
tmp->msgcount = Context->msgcount;
tmp->msg_unread = Context->unread;
tmp->msgcount = Context->msgcount;
+ tmp->msg_tagged = Context->tagged;
}
else
printw( "%.*s", SidebarWidth - delim_len,
make_sidebar_entry(basename(tmp->path),
}
else
printw( "%.*s", SidebarWidth - delim_len,
make_sidebar_entry(basename(tmp->path),
- tmp->msgcount,tmp->msg_unread));
+ tmp->msgcount,tmp->msg_unread, tmp->msg_tagged));
lines++;
}
SETCOLOR(MT_COLOR_NORMAL);
lines++;
}
SETCOLOR(MT_COLOR_NORMAL);