Remove support for antiquated ncurses libraries. Assume we have at least ncurses...
[apps/madmutt.git] / lib-ui / curs_main.c
index d83f1bf..3fbe0e9 100644 (file)
@@ -32,7 +32,7 @@
 #include <imap/imap_private.h>
 
 #ifdef USE_NNTP
-#include <nntp/nntp.h>
+#include "nntp.h"
 #endif
 
 static const char *No_mailbox_is_open = N_("No mailbox is open.");
@@ -98,9 +98,6 @@ void index_make_entry (char *s, ssize_t l, struct menu_t * menu, int num)
   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)
@@ -560,15 +557,12 @@ int mutt_index_menu (void)
       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);
       mutt_refresh ();
 
-#if defined (USE_SLANG_CURSES) || defined (HAVE_RESIZETERM)
       if (SigWinch) {
         mutt_flushinp ();
         mutt_resize_screen ();
@@ -583,10 +577,8 @@ int mutt_index_menu (void)
         clearok (stdscr, TRUE);
         continue;
       }
-#endif
 
       op = km_dokey (MENU_MAIN);
-
       if (op == -1)
         continue;               /* either user abort or timeout */
 
@@ -1276,8 +1268,7 @@ int mutt_index_menu (void)
           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) {
@@ -1935,7 +1926,7 @@ int mutt_index_menu (void)
     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;
@@ -1968,8 +1959,7 @@ int mutt_index_menu (void)
 
       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;
@@ -1982,8 +1972,7 @@ int mutt_index_menu (void)
       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;
@@ -1995,8 +1984,7 @@ int mutt_index_menu (void)
       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,
@@ -2010,8 +1998,7 @@ int mutt_index_menu (void)
       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,
@@ -2047,35 +2034,20 @@ int mutt_index_menu (void)
       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;
@@ -2139,7 +2111,7 @@ int mutt_index_menu (void)
                                  _("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?"))
@@ -2167,8 +2139,7 @@ int mutt_index_menu (void)
       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);