Use m_tempfile and better errors msg
[apps/madmutt.git] / lib-ui / curs_main.c
index 6e20d66..ddb5be5 100644 (file)
@@ -14,6 +14,7 @@
 
 #include <lib-ui/sidebar.h>
 #include <lib-mx/mx.h>
+#include <lib-crypt/crypt.h>
 
 #include <pop/pop.h>
 
 #include "recvattach.h"
 #include "buffy.h"
 #include "thread.h"
-#include "xterm.h"
 
 #include <imap/imap_private.h>
 
-#include <lib-crypt/crypt.h>
-
 #ifdef USE_NNTP
-#include "nntp/nntp.h"
+#include <nntp/nntp.h>
 #endif
 
 #ifdef USE_SASL
@@ -549,10 +547,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);
         }
       }