From bd211940fc97d26d889476b9af50ab55de29183f Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Wed, 5 Mar 2008 14:14:05 +0000 Subject: [PATCH] added :set layout option --- content/mail.js | 20 +++++++++++++++++--- content/muttator.xul | 40 ---------------------------------------- 2 files changed, 17 insertions(+), 43 deletions(-) diff --git a/content/mail.js b/content/mail.js index 5e888363..f140bfbb 100644 --- a/content/mail.js +++ b/content/mail.js @@ -97,9 +97,23 @@ vimperator.Mail = function () // vimperator.options.add(["editor"], // "Set the external text editor", // "string", "gvim -f"); -// vimperator.options.add(["insertmode", "im"], -// "Use Insert mode as the default for text areas", -// "boolean", true); + + vimperator.options.add(["layout"], + "Set the layout of the mail window", + "string", "inherit", + { + validator: function (value) { return /^(classic|wide|vertical|inherit)$/.test(value); }, + setter: function (value) + { + switch (value) + { + case "classic": ChangeMailLayout(0); break; + case "wide": ChangeMailLayout(1); break; + case "vertical": ChangeMailLayout(2); break; + // case "inherit" just does nothing + } + } + }); /////////////////////////////////////////////////////////////////////////////}}} ////////////////////// MAPPINGS //////////////////////////////////////////////// diff --git a/content/muttator.xul b/content/muttator.xul index b280be23..b8d5831f 100644 --- a/content/muttator.xul +++ b/content/muttator.xul @@ -132,46 +132,6 @@ the terms of any one of the MPL, the GPL or the LGPL. oninput="vimperator.commandline.onMultilineInputEvent(event);" onblur="vimperator.commandline.onMultilineInputEvent(event);"/> - - - - - - - - - - - - - - - -