int beep;
int snippets;
int show_flagged;
+ int sender_personal;
+ int sender_mbox;
};
struct option_node {
};
static clist options, patterns;
-static struct options global_options;
+static struct options global_options = {
+ .sender_personal = 1
+};
struct mbox {
cnode n;
o->highlight = -1;
o->snippets = -1;
o->show_flagged = -1;
+ o->sender_personal = -1;
+ o->sender_mbox = -1;
}
static void
MERGE(beep);
MERGE(snippets);
MERGE(show_flagged);
+ MERGE(sender_personal);
+ MERGE(sender_mbox);
}
}
char *pos = b->snippet;
char *term = b->snippet + sizeof(b->snippet) - 1;
- if (sender[0])
+ if (sender[0] && (b->o.sender_mbox || b->o.sender_personal))
{
- add_snippet(&pos, term, sender);
+ add_addr_snippet(&pos, term, sender, b->o.sender_mbox, b->o.sender_personal);
add_snippet(&pos, term, ": ");
}
if (subject[0])
- add_snippet(&pos, term, subject);
+ add_subject_snippet(&pos, term, subject);
else
add_snippet(&pos, term, "No subject");
}
printw("%6d ", b->flagged);
attrset(attrs[cc][hi][M_IDLE]);
printw(" ");
+ attrset(attrs[cc][0][M_FLAG]); /* We avoid the highlight intentionally */
snip = b->o.show_flagged;
}
if (snip && b->o.snippets && b->snippet[0])
e\t\t\tHide from display if empty\n\
f\t\t\tShow flagged messages if there are no new ones\n\
h\t\t\tHide from display\n\
+m\t\t\tShow mailbox name of the sender\n\
+p\t\t\tShow personal info (full name) of the sender\n\
s\t\t\tShow message snippets\n\
t\t\t\tHighlight the entry\n\
\n\
case 'h':
o->hide = value;
break;
+ case 'm':
+ o->sender_mbox = value;
+ break;
+ case 'p':
+ o->sender_personal = value;
+ break;
case 's':
o->snippets = value;
break;