]> granicus.if.org Git - neomutt/commitdiff
Display success message when subscription command succeeds.
authorBrendan Cully <brendan@kublai.com>
Mon, 19 Dec 2005 17:11:32 +0000 (17:11 +0000)
committerBrendan Cully <brendan@kublai.com>
Mon, 19 Dec 2005 17:11:32 +0000 (17:11 +0000)
imap/imap.c
imap/imap_private.h

index c2956b2983a886238dcc38a92118f668f54e9678..fe2d7c118f313b19f5581b5362792586e722af7b 100644 (file)
@@ -680,7 +680,7 @@ int imap_open_mailbox (CONTEXT* ctx)
       dprint (2, (debugfile, "Getting mailbox UIDNEXT\n"));
       pc += 3;
       pc = imap_next_word (pc);
-      sscanf (pc, "%lu", &status->uidnext);
+      sscanf (pc, "%u", &status->uidnext);
     }
     else
     {
@@ -1610,7 +1610,7 @@ int imap_subscribe (char *path, int subscribe)
   if (subscribe)
     mutt_message (_("Subscribing to %s..."), buf);
   else
-    mutt_message (_("Unsubscribing to %s..."), buf);
+    mutt_message (_("Unsubscribing from %s..."), buf);
   imap_munge_mbox_name (mbox, sizeof(mbox), buf);
 
   snprintf (buf, sizeof (buf), "%sSUBSCRIBE %s", subscribe ? "" : "UN", mbox);
@@ -1618,6 +1618,11 @@ int imap_subscribe (char *path, int subscribe)
   if (imap_exec (idata, buf, 0) < 0)
     goto fail;
 
+  imap_unmunge_mbox_name(mx.mbox);
+  if (subscribe)
+    mutt_message (_("Subscribed to %s"), mx.mbox);
+  else
+    mutt_message (_("Unsubscribed from %s"), mx.mbox);
   FREE (&mx.mbox);
   return 0;
 
index 3531142425b0b612edc56092b76b44699d7834fa..07be8096800b3935da4d2ccf6bcdd13f0c7482d3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 1996-9 Brandon Long <blong@fiction.net>
- * Copyright (C) 1999-2001 Brendan Cully <brendan@kublai.com>
+ * Copyright (C) 1999-2005 Brendan Cully <brendan@kublai.com>
  * 
  *     This program is free software; you can redistribute it and/or modify
  *     it under the terms of the GNU General Public License as published by