return rc;
}
-/**
- * nm_get_description - Get the folder's description
- * @param mailbox Mailbox
- * @retval ptr Description
- * @retval NULL No description
- */
-char *nm_get_description(struct Mailbox *mailbox)
-{
- struct MailboxNode *np = NULL;
- STAILQ_FOREACH(np, &AllMailboxes, entries)
- {
- if (np->m->desc && (strcmp(np->m->path, mailbox->path) == 0))
- return np->m->desc;
- }
-
- return NULL;
-}
-
/**
* nm_description_to_path - Find a path from a folder's description
* @param desc Description
void nm_debug_check (struct Mailbox *mailbox);
int nm_description_to_path (const char *desc, char *buf, size_t buflen);
int nm_get_all_tags (struct Mailbox *mailbox, char **tag_list, int *tag_count);
-char *nm_get_description (struct Mailbox *mailbox);
char *nm_email_get_folder (struct Email *e);
void nm_longrun_done (struct Mailbox *mailbox);
void nm_longrun_init (struct Mailbox *mailbox, bool writable);
case 'f':
{
+ struct Mailbox *m = Context ? Context->mailbox : NULL;
#ifdef USE_NOTMUCH
- char *p = NULL;
- if (Context && Context->mailbox->magic == MUTT_NOTMUCH &&
- (p = nm_get_description(Context->mailbox)))
- mutt_str_strfcpy(tmp, p, sizeof(tmp));
+ if (m && (m->magic == MUTT_NOTMUCH) && m->desc)
+ mutt_str_strfcpy(tmp, m->desc, sizeof(tmp));
else
#endif
#ifdef USE_COMPRESSED
- if (Context && Context->mailbox->compress_info &&
- (Context->mailbox->realpath[0] != '\0'))
+ if (m && m->compress_info && (m->realpath[0] != '\0'))
{
- mutt_str_strfcpy(tmp, Context->mailbox->realpath, sizeof(tmp));
+ mutt_str_strfcpy(tmp, m->realpath, sizeof(tmp));
mutt_pretty_mailbox(tmp, sizeof(tmp));
}
else
#endif
- if (Context && (Context->mailbox->path[0] != '\0'))
+ if (m && (m->path[0] != '\0'))
{
- mutt_str_strfcpy(tmp, Context->mailbox->path, sizeof(tmp));
+ mutt_str_strfcpy(tmp, m->path, sizeof(tmp));
mutt_pretty_mailbox(tmp, sizeof(tmp));
}
else