Merge branch 'master' into nohook
[apps/madmutt.git] / lib-mx / mx.c
index 6693d27..0ed8bad 100644 (file)
@@ -15,7 +15,7 @@
 #include <lib-lua/lib-lua.h>
 #include <lib-sys/unix.h>
 #include <lib-mime/mime.h>
 #include <lib-lua/lib-lua.h>
 #include <lib-sys/unix.h>
 #include <lib-mime/mime.h>
-#include <lib-ui/sidebar.h>
+#include <lib-ui/lib-ui.h>
 
 #include "mutt.h"
 #include "crypt.h"
 
 #include "mutt.h"
 #include "crypt.h"
@@ -139,7 +139,7 @@ int mx_lock_file (const char *path, int fd, int excl, int dot, int time_out)
         prev_sb = sb;
 
         mutt_message (_("Waiting for fcntl lock... %d"), ++attempt);
         prev_sb = sb;
 
         mutt_message (_("Waiting for fcntl lock... %d"), ++attempt);
-        sleep (1);
+        mutt_sleep (1);
     }
 #endif /* USE_FCNTL */
 
     }
 #endif /* USE_FCNTL */
 
@@ -174,7 +174,7 @@ int mx_lock_file (const char *path, int fd, int excl, int dot, int time_out)
         prev_sb = sb;
 
         mutt_message (_("Waiting for flock attempt... %d"), ++attempt);
         prev_sb = sb;
 
         mutt_message (_("Waiting for flock attempt... %d"), ++attempt);
-        sleep (1);
+        mutt_sleep (1);
     }
 #endif /* USE_FLOCK */
 
     }
 #endif /* USE_FLOCK */
 
@@ -600,14 +600,8 @@ static int _mx_close_mailbox (CONTEXT * ctx, int *index_hint)
   if (read_msgs && quadoption (OPT_MOVE) != M_NO) {
     char *p;
 
   if (read_msgs && quadoption (OPT_MOVE) != M_NO) {
     char *p;
 
-    if ((p = mutt_find_hook (M_MBOXHOOK, ctx->path))) {
-      isSpool = 1;
-      m_strcpy(mbox, sizeof(mbox), p);
-    }
-    else {
-      m_strcpy(mbox, sizeof(mbox), NONULL(Inbox));
-      isSpool = mutt_is_spool (ctx->path) && !mutt_is_spool (mbox);
-    }
+    m_strcpy(mbox, sizeof(mbox), NONULL(Inbox));
+    isSpool = mutt_is_spool (ctx->path) && !mutt_is_spool (mbox);
     mutt_expand_path (mbox, sizeof (mbox));
 
     if (isSpool) {
     mutt_expand_path (mbox, sizeof (mbox));
 
     if (isSpool) {