X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=curs_main.c;h=3fe1af9e126b73744285284a7dc9ad316a28c8c8;hp=8cf1dff18bec90e83f2dd2d26c3f6f75154edff7;hb=c36aba5f86a5001a110d21ba9766426f4806b17e;hpb=9a1805afc94b21d8766e6e67ef57f92aaf966e84 diff --git a/curs_main.c b/curs_main.c index 8cf1dff..3fe1af9 100644 --- a/curs_main.c +++ b/curs_main.c @@ -23,6 +23,7 @@ #include "buffy.h" #include "mx.h" #include "sidebar.h" +#include "xterm.h" #ifdef USE_POP #include "pop.h" @@ -41,6 +42,7 @@ #include "lib/mem.h" #include "lib/intl.h" #include "lib/str.h" +#include "lib/debug.h" #include #include @@ -99,22 +101,6 @@ static const char *No_visible = N_("No visible messages."); extern const char *ReleaseDate; extern size_t UngetCount; -static void set_xterm_title_bar (char *title) -{ - fputs ("\033]2;", stdout); - fputs (title, stdout); - fputs ("\007", stdout); - fflush (stdout); -} - -static void set_xterm_icon_name (char *name) -{ - fputs ("\033]1;", stdout); - fputs (name, stdout); - fputs ("\007", stdout); - fflush (stdout); -} - void index_make_entry (char *s, size_t l, MUTTMENU * menu, int num) { format_flag flag = @@ -577,9 +563,9 @@ int mutt_index_menu (void) menu->redraw &= ~REDRAW_STATUS; if (option (OPTXTERMSETTITLES)) { menu_status_line (buf, sizeof (buf), menu, NONULL (XtermTitle)); - set_xterm_title_bar (buf); + mutt_xterm_set_title (buf); menu_status_line (buf, sizeof (buf), menu, NONULL (XtermIcon)); - set_xterm_icon_name (buf); + mutt_xterm_set_icon (buf); } } @@ -591,14 +577,15 @@ int mutt_index_menu (void) if (option (OPTARROWCURSOR)) move (menu->current - menu->top + menu->offset, 2); + else if (option (OPTBRAILLEFRIENDLY)) + move (menu->current - menu->top + menu->offset, 0); else move (menu->current - menu->top + menu->offset, COLS - 1); mutt_refresh (); op = km_dokey (MENU_MAIN); - dprint (4, - (debugfile, "mutt_index_menu[%d]: Got op %d\n", __LINE__, op)); + debug_print (4, ("Got op %d\n", op)); #if defined (USE_SLANG_CURSES) || defined (HAVE_RESIZETERM) if (SigWinch) { @@ -1203,7 +1190,8 @@ int mutt_index_menu (void) { if (Context && Context->path) strncpy (buf, Context->path, sizeof (buf)); - buffy_next (buf, sizeof (buf)); + if (op != OP_SIDEBAR_OPEN) + buffy_next (buf, sizeof (buf)); } if (op == OP_SIDEBAR_OPEN) { @@ -1225,7 +1213,6 @@ int mutt_index_menu (void) else #endif mutt_expand_path (buf, sizeof (buf)); - sidebar_set_current (buf); if (mx_get_magic (buf) <= 0) { mutt_error (_("%s is not a mailbox."), buf); break; @@ -1270,6 +1257,7 @@ int mutt_index_menu (void) } else menu->current = 0; + sidebar_set_current (buf); #ifdef USE_NNTP /* buffy_check() must be done with mail-reader mode! */ @@ -1307,6 +1295,10 @@ int mutt_index_menu (void) menu->current = mutt_thread_next_unread (Context, CURHDR); } + if (option (OPTPGPAUTODEC) && + (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))) + mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw); + if ((op = mutt_display_message (CURHDR)) == -1) { unset_option (OPTNEEDRESORT); break; @@ -2012,6 +2004,10 @@ int mutt_index_menu (void) CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_ATTACH; + + if (option (OPTPGPAUTODEC) && + (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; @@ -2026,6 +2022,11 @@ int mutt_index_menu (void) CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_ATTACH; + + if (option (OPTPGPAUTODEC) && + (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))) + mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw); + ci_send_message (SENDREPLY | SENDGROUPREPLY, NULL, NULL, Context, tag ? NULL : CURHDR); menu->redraw = REDRAW_FULL; @@ -2036,6 +2037,11 @@ int mutt_index_menu (void) CHECK_ATTACH; CHECK_MSGCOUNT; CHECK_VISIBLE; + + if (option (OPTPGPAUTODEC) && + (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))) + mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw); + ci_send_message (SENDREPLY | SENDLISTREPLY, NULL, NULL, Context, tag ? NULL : CURHDR); menu->redraw = REDRAW_FULL; @@ -2189,6 +2195,11 @@ int mutt_index_menu (void) CHECK_ATTACH; CHECK_MSGCOUNT; CHECK_VISIBLE; + + if (option (OPTPGPAUTODEC) && + (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); menu->redraw = REDRAW_FULL; break;