Nico Golde:
[apps/madmutt.git] / curs_main.c
index c58b71a..7a01bad 100644 (file)
  *     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"
@@ -385,7 +389,7 @@ static void update_index (MUTTMENU *menu, CONTEXT *ctx, int check,
   
   if (menu->current < 0)
     menu->current = ci_first_message ();
-
+  
 }
 
 static void resort_index (MUTTMENU *menu)
@@ -1178,6 +1182,9 @@ CHECK_IMAP_ACL(IMAP_ACL_DELETE);
       
       case OP_MAIN_SYNC_FOLDER:
 
+       if (Context && !Context->msgcount)
+         break;
+
         CHECK_MSGCOUNT;
         CHECK_VISIBLE;
         CHECK_READONLY;
@@ -2080,6 +2087,8 @@ CHECK_IMAP_ACL(IMAP_ACL_INSERT);
         }
 #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;
 
@@ -2148,7 +2157,9 @@ CHECK_IMAP_ACL(IMAP_ACL_INSERT);
           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;