Remove lots of useless stupid, and code greedy options.
[apps/madmutt.git] / lib-ui / curs_main.c
index 3fe1cd3..257cd96 100644 (file)
@@ -86,7 +86,6 @@ static const char *No_visible = N_("No visible messages.");
 #define CURHDR Context->hdrs[Context->v2r[menu->current]]
 #define OLDHDR Context->hdrs[Context->v2r[menu->oldcurrent]]
 #define UNREAD(h) mutt_thread_contains_unread (Context, h)
-#define SW              (option(OPTMBOXPANE)?SidebarWidth:0)
 
 extern size_t UngetCount;
 
@@ -498,13 +497,13 @@ int mutt_index_menu (void)
 
       if (menu->redraw & REDRAW_STATUS) {
         menu_status_line (buf, sizeof (buf), menu, NONULL (Status));
-        CLEARLINE (option (OPTSTATUSONTOP) ? 0 : LINES - 2);
-        SETCOLOR (MT_COLOR_STATUS);
-        BKGDSET (MT_COLOR_STATUS);
-        wmove(stdscr, option (OPTSTATUSONTOP) ? 0 : LINES - 2,SW);
-        mutt_paddstr (COLS-SW, buf);
-        SETCOLOR (MT_COLOR_NORMAL);
-        BKGDSET (MT_COLOR_NORMAL);
+        CLEARLINE(main_w, 0);
+        SETCOLOR(main_w, MT_COLOR_STATUS);
+        BKGDSET(main_w, MT_COLOR_STATUS);
+        wmove(main_w, 0, 0);
+        mutt_paddstr (main_w, getmaxx(main_w), buf);
+        SETCOLOR(main_w, MT_COLOR_NORMAL);
+        BKGDSET(main_w, MT_COLOR_NORMAL);
         sidebar_set_buffystats (Context);
         menu->redraw &= ~REDRAW_STATUS;
         if (option (OPTXTERMSETTITLES)) {
@@ -521,11 +520,6 @@ int mutt_index_menu (void)
         menu->oldcurrent = menu->current;
       else
         menu->oldcurrent = -1;
-
-      if (option (OPTBRAILLEFRIENDLY))
-         wmove (stdscr, menu->current - menu->top + menu->offset, 0);
-      else
-        wmove (stdscr, menu->current - menu->top + menu->offset, COLS - 1);
       mutt_refresh ();
 
       if (SigWinch) {
@@ -559,13 +553,13 @@ int mutt_index_menu (void)
         tag = 1;
 
         /* give visual indication that the next command is a tag- command */
-        mvwaddstr (stdscr, LINES - 1, 0, "tag-");
-        wclrtoeol (stdscr);
+        mvwaddstr (main_w, LINES - 1, 0, "tag-");
+        wclrtoeol (main_w);
 
         /* get the real command */
         if ((op = km_dokey (MENU_MAIN)) == OP_TAG_PREFIX) {
           /* abort tag sequence */
-          CLEARLINE (LINES - 1);
+          CLEARLINE(main_w, LINES - 1);
           continue;
         }
       }
@@ -594,13 +588,13 @@ int mutt_index_menu (void)
         tag = 1;
 
         /* give visual indication that the next command is a tag- command */
-        mvwaddstr (stdscr, LINES - 1, 0, "tag-");
-        wclrtoeol (stdscr);
+        mvwaddstr (main_w, LINES - 1, 0, "tag-");
+        wclrtoeol (main_w);
 
         /* get the real command */
         if ((op = km_dokey (MENU_MAIN)) == OP_TAG_PREFIX) {
           /* abort tag sequence */
-          CLEARLINE (LINES - 1);
+          CLEARLINE(main_w, LINES - 1);
           continue;
         }
       }
@@ -940,8 +934,7 @@ int mutt_index_menu (void)
       break;
 
     case OP_REDRAW:
-
-      clearok (stdscr, TRUE);
+      clearok (main_w, TRUE);
       menu->redraw = REDRAW_FULL;
       break;
 
@@ -1089,7 +1082,7 @@ int mutt_index_menu (void)
     case OP_MAIN_CHANGE_GROUP:
     case OP_MAIN_CHANGE_GROUP_READONLY:
 #endif
-      if (attach_msg || option (OPTREADONLY) ||
+      if (attach_msg ||
 #ifdef USE_NNTP
           op == OP_MAIN_CHANGE_GROUP_READONLY ||
 #endif
@@ -1136,7 +1129,7 @@ int mutt_index_menu (void)
           break;
       }
       if (!buf[0]) {
-        CLEARLINE (LINES - 1);
+        CLEARLINE(main_w, LINES - 1);
         break;
       }