X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-ui%2Fcurs_main.c;h=600932a520aebab3d84b9174d620f8e570007536;hp=e23764e97acf323087008a577a69f769131d49b8;hb=cc707c1e986b60f2c1c1932d0789038d465a7a59;hpb=98cf5779d8184a74541be1bc61d15c5f35efd310 diff --git a/lib-ui/curs_main.c b/lib-ui/curs_main.c index e23764e..600932a 100644 --- a/lib-ui/curs_main.c +++ b/lib-ui/curs_main.c @@ -13,6 +13,8 @@ #include #include +#include +#include #include @@ -20,21 +22,17 @@ #include "menu.h" #include "mutt.h" +#include "pattern.h" #include "alias.h" -#include "mx.h" #include "sort.h" #include "recvattach.h" #include "buffy.h" -#include "mx.h" #include "thread.h" -#include "xterm.h" #include -#include - #ifdef USE_NNTP -#include "nntp/nntp.h" +#include #endif #ifdef USE_SASL @@ -99,12 +97,14 @@ extern size_t UngetCount; void index_make_entry (char *s, ssize_t l, struct menu_t * menu, int num) { - format_flag flag = - M_FORMAT_MAKEPRINT | M_FORMAT_ARROWCURSOR | M_FORMAT_INDEX; + format_flag flag = M_FORMAT_MAKEPRINT | M_FORMAT_INDEX; int edgemsgno, reverse = Sort & SORT_REVERSE; 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) @@ -388,7 +388,7 @@ struct mapping_t IndexNewsHelp[] = { */ int mutt_index_menu (void) { - char buf[LONG_STRING], helpstr[SHORT_STRING]; + char buf[LONG_STRING], helpstr[STRING]; int flags; int op = OP_NULL; int done = 0; /* controls when to exit the "event" loop */ @@ -479,7 +479,7 @@ int mutt_index_menu (void) sidebar_draw (); mutt_message (_("New mail in this mailbox.")); - if (option (OPTBEEPNEW)) + if (ml_core.beep_new) beep (); } else if (check == M_FLAGS) @@ -506,7 +506,7 @@ int mutt_index_menu (void) menu->redraw |= REDRAW_SIDEBAR; } if (do_buffy_notify) { - if (buffy_notify () && option (OPTBEEPNEW)) + if (buffy_notify () && ml_core.beep_new) beep (); } else @@ -550,10 +550,11 @@ int mutt_index_menu (void) sidebar_set_buffystats (Context); menu->redraw &= ~REDRAW_STATUS; if (option (OPTXTERMSETTITLES)) { - menu_status_line (buf, sizeof (buf), menu, NONULL (XtermTitle)); - mutt_xterm_set_title (buf); - menu_status_line (buf, sizeof (buf), menu, NONULL (XtermIcon)); - mutt_xterm_set_icon (buf); + menu_status_line(buf, sizeof(buf), menu, NONULL(XtermTitle)); + printf("\033]2;%s\007", buf); + menu_status_line(buf, sizeof(buf), menu, NONULL(XtermIcon)); + printf("\033]1;%s\007", buf); + fflush(stdout); } } @@ -926,15 +927,14 @@ int mutt_index_menu (void) if (op == OP_TOGGLE_READ) { char buffer[LONG_STRING]; - if (!Context->pattern - || strncmp (Context->pattern, "!~R!~D~s", 8) != 0) { + if (m_strncmp (Context->pattern, "!~R!~D~s", 8) != 0) { snprintf (buffer, sizeof (buffer), "!~R!~D~s%s", Context->pattern ? Context->pattern : ".*"); set_option (OPTHIDEREAD); } else { m_strcpy(buf, sizeof(buf), Context->pattern + 8); - if (!*buf || strncmp (buf, ".*", 2) == 0) + if (m_strncmp (buf, ".*", 2) == 0) snprintf (buf, sizeof (buf), "~A"); unset_option (OPTHIDEREAD); } @@ -974,7 +974,7 @@ int mutt_index_menu (void) break; } - if (query_quadoption (OPT_QUIT, _("Quit Madmutt?")) == M_YES) { + if (query_quadoption2(ml_core.quit, _("Quit Madmutt?")) == M_YES) { int check; oldcount = Context ? Context->msgcount : 0; @@ -1210,7 +1210,7 @@ int mutt_index_menu (void) if (Context) { int check; - if (Context->compressinfo && Context->realpath) + if (Context->cinfo && Context->realpath) m_strreplace(&LastFolder, Context->realpath); else m_strreplace(&LastFolder, Context->path); @@ -1302,7 +1302,7 @@ int mutt_index_menu (void) } if ((menu->menu == MENU_MAIN) - && (query_quadoption (OPT_QUIT, + && (query_quadoption2(ml_core.quit, _("Exit Madmutt without saving?")) == M_YES)) { if (Context) { @@ -2318,9 +2318,6 @@ int mutt_index_menu (void) if (menu->menu == MENU_PAGER) { menu->menu = MENU_MAIN; menu->redraw = REDRAW_FULL; -#if 0 - set_option (OPTWEED); /* turn header weeding back on. */ -#endif } if (done)