[geary/mjog/prefer-special-use: 2/2] console: Support issuing SPECIAL-USE with LIST commands
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/mjog/prefer-special-use: 2/2] console: Support issuing SPECIAL-USE with LIST commands
- Date: Tue, 17 Mar 2020 11:11:41 +0000 (UTC)
commit 4ed46c72fc4eb7f91e2f344c7e31ebe35c787ff5
Author: Michael Gratton <mike vee net>
Date: Tue Mar 17 22:10:23 2020 +1100
console: Support issuing SPECIAL-USE with LIST commands
src/console/main.vala | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
---
diff --git a/src/console/main.vala b/src/console/main.vala
index b6fbcb0d..fcb6a320 100644
--- a/src/console/main.vala
+++ b/src/console/main.vala
@@ -423,11 +423,22 @@ class ImapConsole : Gtk.Window {
}
private void list(string cmd, string[] args) throws Error {
- check_connected(cmd, args, 2, "<reference> <mailbox>");
+ check_min_connected(cmd, args, 2, "<reference> <mailbox> [special-use]");
status("Listing...");
- this.cx.send_command(new Geary.Imap.ListCommand.wildcarded(args[0],
- new Geary.Imap.MailboxSpecifier(args[1]), (cmd.down() == "xlist"), null));
+ Geary.Imap.ListReturnParameter? return_param = null;
+ if (args.length >= 3 && args[2] == "special-use") {
+ return_param = new Geary.Imap.ListReturnParameter();
+ return_param.add_special_use();
+ }
+ this.cx.send_command(
+ new Geary.Imap.ListCommand.wildcarded(
+ args[0],
+ new Geary.Imap.MailboxSpecifier(args[1]),
+ (cmd.down() == "xlist"),
+ return_param
+ )
+ );
}
private void examine(string cmd, string[] args) throws Error {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]