projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rocco Rutte:
[apps/madmutt.git]
/
curs_main.c
diff --git
a/curs_main.c
b/curs_main.c
index
395019b
..
5981766
100644
(file)
--- a/
curs_main.c
+++ b/
curs_main.c
@@
-16,6
+16,10
@@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*/
* 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"
#include "mutt.h"
#include "mutt_curses.h"
#include "mx.h"
@@
-109,6
+113,22
@@
static const char *No_visible = N_("No visible messages.");
extern const char *ReleaseDate;
extern size_t UngetCount;
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;
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;
@@
-589,7
+609,15
@@
int mutt_index_menu (void)
SETCOLOR (MT_COLOR_STATUS);
mutt_paddstr (COLS, buf);
SETCOLOR (MT_COLOR_NORMAL);
SETCOLOR (MT_COLOR_STATUS);
mutt_paddstr (COLS, buf);
SETCOLOR (MT_COLOR_NORMAL);
+ set_buffystats (Context);
menu->redraw &= ~REDRAW_STATUS;
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;
}
menu->redraw = 0;
@@
-711,8
+739,7
@@
int mutt_index_menu (void)
#ifdef USE_NNTP
unset_option (OPTNEWS); /* for any case */
#endif
#ifdef USE_NNTP
unset_option (OPTNEWS); /* for any case */
#endif
- fprintf(stderr,"%d %d\n",op,OP_SIDEBAR_OPEN);
- fflush(stderr);
+
switch (op)
{
switch (op)
{
@@
-1099,6
+1126,9
@@
CHECK_IMAP_ACL(IMAP_ACL_DELETE);
else
{
mutt_set_flag (Context, CURHDR, M_TAG, !CURHDR->tagged);
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)
{
menu->redraw = REDRAW_STATUS;
if (option (OPTRESOLVE) && menu->current < Context->vcount - 1)
{
@@
-1153,6
+1183,9
@@
CHECK_IMAP_ACL(IMAP_ACL_DELETE);
case OP_MAIN_SYNC_FOLDER:
case OP_MAIN_SYNC_FOLDER:
+ if (Context && !Context->msgcount)
+ break;
+
CHECK_MSGCOUNT;
CHECK_VISIBLE;
CHECK_READONLY;
CHECK_MSGCOUNT;
CHECK_VISIBLE;
CHECK_READONLY;
@@
-1274,6
+1307,12
@@
CHECK_IMAP_ACL(IMAP_ACL_DELETE);
{
int check;
{
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;
mutt_str_replace (&LastFolder, Context->path);
oldcount = Context ? Context->msgcount : 0;
@@
-2049,6
+2088,8
@@
CHECK_IMAP_ACL(IMAP_ACL_INSERT);
}
#endif
}
#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;
mutt_edit_message (Context, tag ? NULL : CURHDR);
menu->redraw = REDRAW_FULL;
@@
-2117,7
+2158,9
@@
CHECK_IMAP_ACL(IMAP_ACL_INSERT);
break;
CHECK_MSGCOUNT;
CHECK_VISIBLE;
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;
if (menu->menu == MENU_PAGER)
{
op = OP_DISPLAY_MESSAGE;