From 286feedfc7a35099b2df6e699b96847585872469 Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Tue, 5 Feb 2008 01:31:06 +0000 Subject: [PATCH] initial small changes, so muttator loads at least fully --- content/commands.js | 2 +- content/events.js | 3 +- content/mappings.js | 4 +- content/muttator.js | 33 +++ content/muttator.xul | 4 +- content/ui.js | 26 +- content/vim.js | 583 +++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 638 insertions(+), 17 deletions(-) create mode 100644 content/muttator.js create mode 100644 content/vim.js diff --git a/content/commands.js b/content/commands.js index 27c13f3f..455132e6 100644 --- a/content/commands.js +++ b/content/commands.js @@ -2089,7 +2089,7 @@ vimperator.Commands = function () //{{{ } )); commandManager.add(new vimperator.Command(["st[op]"], - BrowserStop, + function() { BrowserStop(); }, { shortHelp: "Stop loading" } )); commandManager.add(new vimperator.Command(["tab"], diff --git a/content/events.js b/content/events.js index e0278ad0..4a8e8eb8 100644 --- a/content/events.js +++ b/content/events.js @@ -380,7 +380,8 @@ vimperator.Events = function () //{{{ var title = vimperator.buffer.title; //update history - vimperator.history.add(url, title); + if (vimperator.history) + vimperator.history.add(url, title); vimperator.buffer.updateBufferList(); vimperator.autocommands.trigger("PageLoad", url); diff --git a/content/mappings.js b/content/mappings.js index 7550338e..87c147c0 100644 --- a/content/mappings.js +++ b/content/mappings.js @@ -409,7 +409,7 @@ vimperator.Mappings = function () //{{{ { shortHelp: "Pass through next key" } )); addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], [""], - BrowserStop, + function() { BrowserStop(); }, { shortHelp: "Stop loading" } )); addDefaultMap(new vimperator.Map(allModes, [""], @@ -508,7 +508,7 @@ vimperator.Mappings = function () //{{{ { shortHelp: "View source with an external editor" } )); addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["gh"], - BrowserHome, + function() { BrowserHome(); }, { shortHelp: "Go home" } )); addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["gH"], diff --git a/content/muttator.js b/content/muttator.js new file mode 100644 index 00000000..6bd489fb --- /dev/null +++ b/content/muttator.js @@ -0,0 +1,33 @@ +/***** BEGIN LICENSE BLOCK ***** {{{ +Version: MPL 1.1/GPL 2.0/LGPL 2.1 + +The contents of this file are subject to the Mozilla Public License Version +1.1 (the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at +http://www.mozilla.org/MPL/ + +Software distributed under the License is distributed on an "AS IS" basis, +WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +for the specific language governing rights and limitations under the +License. + +(c) 2006-2008: Martin Stubenschrott + +Alternatively, the contents of this file may be used under the terms of +either the GNU General Public License Version 2 or later (the "GPL"), or +the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +in which case the provisions of the GPL or the LGPL are applicable instead +of those above. If you wish to allow use of your version of this file only +under the terms of either the GPL or the LGPL, and not to allow others to +use your version of this file under the terms of the MPL, indicate your +decision by deleting the provisions above and replace them with the notice +and other provisions required by the GPL or the LGPL. If you do not delete +the provisions above, a recipient may use your version of this file under +the terms of any one of the MPL, the GPL or the LGPL. +}}} ***** END LICENSE BLOCK *****/ + +vimperator.config = { + name: "Muttator", + hostApplication: "Thunderbird", + dialogs: [] +} diff --git a/content/muttator.xul b/content/muttator.xul index d61136f4..fb81e25b 100644 --- a/content/muttator.xul +++ b/content/muttator.xul @@ -40,7 +40,7 @@ the terms of any one of the MPL, the GPL or the LGPL.