From: Brendan Cully Date: Mon, 19 Dec 2005 17:11:32 +0000 (+0000) Subject: Display success message when subscription command succeeds. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=49374d925c6d8b34515b210d06d9d5383a4f4b8f;p=neomutt Display success message when subscription command succeeds. --- diff --git a/imap/imap.c b/imap/imap.c index c2956b298..fe2d7c118 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -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; diff --git a/imap/imap_private.h b/imap/imap_private.h index 353114242..07be80968 100644 --- a/imap/imap_private.h +++ b/imap/imap_private.h @@ -1,6 +1,6 @@ /* * Copyright (C) 1996-9 Brandon Long - * Copyright (C) 1999-2001 Brendan Cully + * Copyright (C) 1999-2005 Brendan Cully * * 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