From cb5a311f6fed90f61073b1b4d153cd688719c64e Mon Sep 17 00:00:00 2001 From: Brendan Cully Date: Mon, 19 Dec 2005 17:11:32 +0000 Subject: [PATCH] Display success message when subscription command succeeds. --- imap/imap.c | 9 +++++++-- imap/imap_private.h | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/imap/imap.c b/imap/imap.c index c2956b29..fe2d7c11 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 35311424..07be8096 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 -- 2.40.0