#include <lib-ui/sidebar.h>
#include <lib-mx/mx.h>
-#include <lib-crypt/crypt.h>
-
-#include <pop/pop.h>
+#include "pop.h"
#include "curses.h"
#include "menu.h"
#include "mutt.h"
+#include "crypt.h"
#include "pattern.h"
#include "alias.h"
#include "sort.h"
#include "recvattach.h"
#include "buffy.h"
#include "thread.h"
+#include "score.h"
#include <imap/imap_private.h>
#ifdef USE_NNTP
-#include <nntp/nntp.h>
-#endif
-
-#ifdef USE_SASL
-#include "mutt_sasl.h"
+#include "nntp.h"
#endif
static const char *No_mailbox_is_open = N_("No mailbox is open.");
HEADER *h = Context->hdrs[Context->v2r[num]];
THREAD *tmp;
- if (option(OPTARROWCURSOR))
- flag |= M_FORMAT_ARROWCURSOR;
-
if ((Sort & SORT_MASK) == SORT_THREADS && h->tree) {
flag |= M_FORMAT_TREE; /* display the thread tree */
if (h->display_subject)
int oldcount = -1;
int rc = -1;
MUTTMENU *menu;
- char *cp; /* temporary variable. */
+ const char *cp; /* temporary variable. */
int index_hint; /* used to restore cursor position */
int do_buffy_notify = 1;
- int closed = 0; /* did we OP_QUIT or OP_EXIT out of this menu? */
+ int closed = 0; /* did we OP_QUIT or OP_EXIT out of this menu? */
int attach_msg = option (OPTATTACHMSG);
menu = mutt_new_menu ();
sidebar_draw ();
mutt_message (_("New mail in this mailbox."));
- if (ml_core.beep_new)
+ if (mod_core.beep_new)
beep ();
}
else if (check == M_FLAGS)
menu->redraw |= REDRAW_SIDEBAR;
}
if (do_buffy_notify) {
- if (buffy_notify () && ml_core.beep_new)
+ if (buffy_notify () && mod_core.beep_new)
beep ();
}
else
else
menu->oldcurrent = -1;
- if (option (OPTARROWCURSOR))
- move (menu->current - menu->top + menu->offset, 2);
- else if (option (OPTBRAILLEFRIENDLY))
+ if (option (OPTBRAILLEFRIENDLY))
move (menu->current - menu->top + menu->offset, 0);
else
move (menu->current - menu->top + menu->offset, COLS - 1);
break;
}
- if (query_quadoption2(ml_core.quit, _("Quit Madmutt?")) == M_YES) {
+ if (query_quadoption2(mod_core.quit, _("Quit Madmutt?")) == M_YES) {
int check;
oldcount = Context ? Context->msgcount : 0;
menu->current = mutt_thread_next_unread (Context, CURHDR);
}
- if (option (OPTPGPAUTODEC) &&
- (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
+ if (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))
mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw);
if ((op = mutt_display_message (CURHDR)) == -1) {
}
if ((menu->menu == MENU_MAIN)
- && (query_quadoption2(ml_core.quit,
+ && (query_quadoption2(mod_core.quit,
_("Exit Madmutt without saving?")) == M_YES))
{
if (Context) {
CHECK_VISIBLE;
CHECK_READONLY;
- if (mutt_change_flag (tag ? NULL : CURHDR, (op == OP_MAIN_SET_FLAG)) ==
- 0) {
+ if (mutt_change_flag (tag ? NULL : CURHDR, (op == OP_MAIN_SET_FLAG)) == 0) {
menu->redraw = REDRAW_STATUS;
if (tag)
menu->redraw |= REDRAW_INDEX;
case OP_CATCHUP:
if (Context && Context->magic == M_NNTP) {
if (mutt_newsgroup_catchup (CurrentNewsSrv,
- ((NNTP_DATA *) Context->data)->group))
+ ((nntp_data_t *) Context->data)->group))
menu->redraw = REDRAW_INDEX | REDRAW_STATUS;
}
break;
CHECK_MX_ACL (Context, ACL_INSERT, _("Editing"));
- if (option (OPTPGPAUTODEC)
- && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
+ if (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))
mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw);
mutt_edit_message (Context, tag ? NULL : CURHDR);
menu->redraw = REDRAW_FULL;
CHECK_VISIBLE;
CHECK_ATTACH;
- if (option (OPTPGPAUTODEC) &&
- (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
+ if (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))
mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw);
ci_send_message (SENDFORWARD, NULL, NULL, Context, tag ? NULL : CURHDR);
menu->redraw = REDRAW_FULL;
break;
-
- case OP_FORGET_PASSPHRASE:
- crypt_forget_passphrase ();
- break;
-
case OP_GROUP_REPLY:
CHECK_MSGCOUNT;
CHECK_VISIBLE;
CHECK_ATTACH;
- if (option (OPTPGPAUTODEC) &&
- (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
+ if (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))
mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw);
ci_send_message (SENDREPLY | SENDGROUPREPLY, NULL, NULL, Context,
CHECK_MSGCOUNT;
CHECK_VISIBLE;
- if (option (OPTPGPAUTODEC) &&
- (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
+ if (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))
mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw);
ci_send_message (SENDREPLY | SENDLISTREPLY, NULL, NULL, Context,
menu->redraw = REDRAW_FULL;
break;
- case OP_MAIL_KEY:
- CHECK_ATTACH;
- ci_send_message (SENDKEY, NULL, NULL, NULL, NULL);
- menu->redraw = REDRAW_FULL;
- break;
-
-
case OP_EXTRACT_KEYS:
CHECK_MSGCOUNT;
CHECK_VISIBLE;
break;
case OP_PIPE:
-
CHECK_MSGCOUNT;
CHECK_VISIBLE;
mutt_pipe_message (tag ? NULL : CURHDR);
- /* in an IMAP folder index with imap_peek=no, piping could change
- * * new or old messages status to read. Redraw what's needed.
- */
- if (Context->magic == M_IMAP && !option (OPTIMAPPEEK)) {
- menu->redraw = (tag ? REDRAW_INDEX : REDRAW_CURRENT) | REDRAW_STATUS;
- }
MAYBE_REDRAW (menu->redraw);
break;
case OP_PRINT:
-
CHECK_MSGCOUNT;
CHECK_VISIBLE;
mutt_print_message (tag ? NULL : CURHDR);
- /* in an IMAP folder index with imap_peek=no, piping could change
- * * new or old messages status to read. Redraw what's needed.
- */
- if (Context->magic == M_IMAP && !option (OPTIMAPPEEK)) {
- menu->redraw = (tag ? REDRAW_INDEX : REDRAW_CURRENT) | REDRAW_STATUS;
- }
break;
case OP_MAIN_READ_THREAD:
case OP_MAIN_READ_SUBTHREAD:
-
CHECK_MSGCOUNT;
CHECK_VISIBLE;
CHECK_READONLY;
_("Reply by mail as poster prefers?")) !=
M_YES) {
if (Context && Context->magic == M_NNTP
- && !((NNTP_DATA *) Context->data)->allowed
+ && !((nntp_data_t *) Context->data)->allowed
&& query_quadoption (OPT_TOMODERATED,
_
("Posting to this group not allowed, may be moderated. Continue?"))
CHECK_MSGCOUNT;
CHECK_VISIBLE;
- if (option (OPTPGPAUTODEC) &&
- (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
+ if (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))
mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw);
ci_send_message (SENDREPLY, NULL, NULL, Context, tag ? NULL : CURHDR);
mutt_what_key ();
break;
- case OP_REBUILD_CACHE:
- mx_rebuild_cache ();
- break;
-
case OP_SIDEBAR_SCROLL_UP:
case OP_SIDEBAR_SCROLL_DOWN:
case OP_SIDEBAR_NEXT:
#ifdef USE_NNTP
/* Close all open NNTP connections */
nntp_logout_all ();
-#endif
-#ifdef USE_SASL
- mutt_sasl_done ();
#endif
}