From 50d6d5de050c176df18cf2c6cf3b5e59927ac083 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Thu, 11 Jun 2009 02:07:58 +1000 Subject: [PATCH] Fix 'display' validation and add completion. Also added completion and validation for 'archivefolder'. --- muttator/content/mail.js | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/muttator/content/mail.js b/muttator/content/mail.js index 9dff9461..911d375f 100644 --- a/muttator/content/mail.js +++ b/muttator/content/mail.js @@ -200,14 +200,17 @@ function Mail() //{{{ ////////////////////// OPTIONS ///////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////{{{ -// options.add(["editor"], -// "Set the external text editor", -// "string", "gvim -f"); - + // FIXME: why does this default to "Archive", I don't have one? The default + // value won't validate now. mst please fix. --djk options.add(["archivefolder"], "Set the archive folder", - "string", "Archive"); + "string", "Archive", + { + completer: function (context) [[f.prettiestName, ""] for ([,f] in Iterator(mail.getFolders()))], + validator: Option.validateCompleter + }); + // TODO: generate the possible values dynamically from the menu options.add(["layout"], "Set the layout of the mail window", "string", "inherit", @@ -224,6 +227,12 @@ function Mail() //{{{ return value; }, + completer: function (context) [ + ["inherit", "Default View"], // FIXME: correct description? + ["classic", "Classic View"], + ["wide", "Wide View"], + ["vertical", "Vertical View"] + ], validator: Option.validateCompleter });