* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*/
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include "mutt.h"
#include "mutt_curses.h"
#include "mx.h"
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 = M_FORMAT_MAKEPRINT | M_FORMAT_ARROWCURSOR | M_FORMAT_INDEX;
mutt_error _("Mailbox was externally modified. Flags may be wrong.");
else if (check == M_NEW_MAIL)
{
+ /* on new mail: redraw sidebar */
+ draw_sidebar (CurrentMenu);
mutt_message _("New mail in this mailbox.");
if (option (OPTBEEPNEW))
beep ();
{
/* check for new mail in the incoming folders */
oldcount = newcount;
- if ((newcount = mutt_buffy_check (0)) != oldcount)
+ if ((newcount = mutt_buffy_check (0)) != oldcount){
menu->redraw |= REDRAW_STATUS;
+ menu->redraw |= REDRAW_SIDEBAR;
+ }
if (do_buffy_notify)
{
if (mutt_buffy_notify () && option (OPTBEEPNEW))
if (op != -1)
mutt_curs_set (0);
-
+ if (menu->redraw & REDRAW_SIDEBAR) draw_sidebar(menu->menu);
if (menu->redraw & REDRAW_FULL)
{
menu_redraw_full (menu);
SETCOLOR (MT_COLOR_STATUS);
mutt_paddstr (COLS, buf);
SETCOLOR (MT_COLOR_NORMAL);
+ set_buffystats (Context);
menu->redraw &= ~REDRAW_STATUS;
+ if (option(OPTXTERMSETTITLES))
+ {
+ menu_status_line (buf, sizeof (buf), menu, NONULL (XtermTitle));
+ set_xterm_title_bar(buf);
+ menu_status_line (buf, sizeof (buf), menu, NONULL (XtermIcon));
+ set_xterm_icon_name(buf);
+ }
}
menu->redraw = 0;
#ifdef USE_NNTP
unset_option (OPTNEWS); /* for any case */
#endif
- fprintf(stderr,"%d %d\n",op,OP_SIDEBAR_OPEN);
- fflush(stderr);
+
switch (op)
{
else
{
mutt_set_flag (Context, CURHDR, M_TAG, !CURHDR->tagged);
+ Context->last_tag = CURHDR->tagged ? CURHDR :
+ ((Context->last_tag == CURHDR && !CURHDR->tagged)
+ ? NULL : Context->last_tag);
menu->redraw = REDRAW_STATUS;
if (option (OPTRESOLVE) && menu->current < Context->vcount - 1)
{
case OP_MAIN_SYNC_FOLDER:
+ if (Context && !Context->msgcount)
+ break;
+
CHECK_MSGCOUNT;
CHECK_VISIBLE;
CHECK_READONLY;
{
int check;
+#ifdef USE_COMPRESSED
+ if (Context->compressinfo && Context->realpath)
+ mutt_str_replace (&LastFolder, Context->realpath);
+ else
+#endif
+
mutt_str_replace (&LastFolder, Context->path);
oldcount = Context ? Context->msgcount : 0;
if ((menu->menu == MENU_MAIN)
&& (query_quadoption (OPT_QUIT,
- _("Exit Mutt without saving?")) == M_YES))
+ _("Exit Mutt-ng without saving?")) == M_YES))
{
if (Context)
{
}
#endif
+ if (option (OPTPGPAUTODEC) && (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;
break;
CHECK_MSGCOUNT;
CHECK_VISIBLE;
- mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw);
+ if (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))
+ mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw);
+
if (menu->menu == MENU_PAGER)
{
op = OP_DISPLAY_MESSAGE;
case OP_BUFFY_LIST:
mutt_buffy_list ();
+ menu->redraw = REDRAW_FULL;
break;
case OP_VIEW_ATTACHMENTS:
case OP_SIDEBAR_SCROLL_DOWN:
case OP_SIDEBAR_NEXT:
case OP_SIDEBAR_PREV:
+ case OP_SIDEBAR_NEXT_NEW:
+ case OP_SIDEBAR_PREV_NEW:
scroll_sidebar(op, menu->menu);
break;
default: