mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 22:37:58 +01:00
Merge branch 'master' into xulmus
Conflicts: License.txt
This commit is contained in:
@@ -47,11 +47,9 @@
|
||||
</xul:vbox>
|
||||
</xul:stack>
|
||||
<xul:stack class="tab-text-stack">
|
||||
<xul:label xbl:inherits="value=ordinal" class="tab-text-shadow" liberator:highlight="TabNumber"/>
|
||||
<xul:label xbl:inherits="value=ordinal" class="tab-text" liberator:highlight="TabNumber"/>
|
||||
</xul:stack>
|
||||
<xul:stack class="tab-text-stack" flex="1">
|
||||
<xul:label flex="1" xbl:inherits="value=label,crop,accesskey" crop="right" class="tab-text-shadow"/>
|
||||
<xul:label flex="1" xbl:inherits="value=label,crop,accesskey" crop="right" class="tab-text"/>
|
||||
</xul:stack>
|
||||
</xul:hbox>
|
||||
|
||||
@@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@gmx.net>
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
|
||||
|
||||
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
|
||||
@@ -125,6 +125,7 @@ function Buffer() //{{{
|
||||
else
|
||||
v = win.scrollMaxY / 100 * vertical;
|
||||
|
||||
marks.add("'", true);
|
||||
win.scrollTo(h, v);
|
||||
}
|
||||
|
||||
@@ -1303,6 +1304,17 @@ function Buffer() //{{{
|
||||
scrollToPercentiles(-1, percentage);
|
||||
},
|
||||
|
||||
scrollToRatio: function (x, y)
|
||||
{
|
||||
scrollToPercentiles(x * 100, y * 100);
|
||||
},
|
||||
|
||||
scrollTo: function (x, y)
|
||||
{
|
||||
marks.add("'", true);
|
||||
content.scrollTo(x, y);
|
||||
},
|
||||
|
||||
/**
|
||||
* Scrolls the current buffer laterally to its leftmost.
|
||||
*/
|
||||
@@ -1539,12 +1551,11 @@ function Marks() //{{{
|
||||
function onPageLoad(event)
|
||||
{
|
||||
let win = event.originalTarget.defaultView;
|
||||
for (let i = 0, length = pendingJumps.length; i < length; i++)
|
||||
for (let [i, mark] in Iterator(pendingJumps))
|
||||
{
|
||||
let mark = pendingJumps[i];
|
||||
if (win && win.location.href == mark.location)
|
||||
{
|
||||
win.scrollTo(mark.position.x * win.scrollMaxX, mark.position.y * win.scrollMaxY);
|
||||
buffer.scrollToRatio(mark.position.x, mark.position.y);
|
||||
pendingJumps.splice(i, 1);
|
||||
return;
|
||||
}
|
||||
@@ -1589,7 +1600,7 @@ function Marks() //{{{
|
||||
}
|
||||
}
|
||||
|
||||
function isLocalMark(mark) /^[a-z]$/.test(mark);
|
||||
function isLocalMark(mark) /^['`a-z]$/.test(mark);
|
||||
function isURLMark(mark) /^[A-Z0-9]$/.test(mark);
|
||||
|
||||
function localMarkIter()
|
||||
@@ -1750,12 +1761,13 @@ function Marks() //{{{
|
||||
* @param {string} mark
|
||||
*/
|
||||
// TODO: add support for frameset pages
|
||||
add: function (mark)
|
||||
add: function (mark, silent)
|
||||
{
|
||||
let win = window.content;
|
||||
|
||||
if (win.document.body.localName.toLowerCase() == "frameset")
|
||||
{
|
||||
if (!silent)
|
||||
liberator.echoerr("Marks support for frameset pages not implemented yet");
|
||||
return;
|
||||
}
|
||||
@@ -1767,6 +1779,7 @@ function Marks() //{{{
|
||||
if (isURLMark(mark))
|
||||
{
|
||||
urlMarks.set(mark, { location: win.location.href, position: position, tab: tabs.getTab() });
|
||||
if (!silent)
|
||||
liberator.log("Adding URL mark: " + markToString(mark, urlMarks.get(mark)), 5);
|
||||
}
|
||||
else if (isLocalMark(mark))
|
||||
@@ -1777,6 +1790,7 @@ function Marks() //{{{
|
||||
localMarks.set(mark, []);
|
||||
let vals = { location: win.location.href, position: position };
|
||||
localMarks.get(mark).push(vals);
|
||||
if (!silent)
|
||||
liberator.log("Adding local mark: " + markToString(mark, vals), 5);
|
||||
}
|
||||
},
|
||||
@@ -1847,7 +1861,7 @@ function Marks() //{{{
|
||||
return;
|
||||
}
|
||||
liberator.log("Jumping to URL mark: " + markToString(mark, slice), 5);
|
||||
win.scrollTo(slice.position.x * win.scrollMaxX, slice.position.y * win.scrollMaxY);
|
||||
buffer.scrollToRatio(slice.position.x, slice.position.y);
|
||||
ok = true;
|
||||
}
|
||||
}
|
||||
@@ -1862,7 +1876,7 @@ function Marks() //{{{
|
||||
if (win.location.href == lmark.location)
|
||||
{
|
||||
liberator.log("Jumping to local mark: " + markToString(mark, lmark), 5);
|
||||
win.scrollTo(lmark.position.x * win.scrollMaxX, lmark.position.y * win.scrollMaxY);
|
||||
buffer.scrollToRatio(lmark.position.x, lmark.position.y);
|
||||
ok = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@gmx.net>
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
|
||||
|
||||
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
|
||||
|
||||
@@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@gmx.net>
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
|
||||
|
||||
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
|
||||
|
||||
@@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@gmx.net>
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
|
||||
|
||||
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
|
||||
|
||||
@@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@gmx.net>
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
|
||||
|
||||
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
|
||||
|
||||
@@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@gmx.net>
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
|
||||
|
||||
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
|
||||
|
||||
@@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@gmx.net>
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
|
||||
|
||||
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
|
||||
|
||||
@@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@gmx.net>
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
|
||||
|
||||
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
|
||||
|
||||
@@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@gmx.net>
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
|
||||
Code based on venkman
|
||||
|
||||
Alternatively, the contents of this file may be used under the terms of
|
||||
@@ -105,12 +105,7 @@ function IO() //{{{
|
||||
.map(function (dir) dir == "" ? io.getCurrentDirectory().path : dir);
|
||||
}
|
||||
|
||||
function replacePathSep(path)
|
||||
{
|
||||
if (WINDOWS)
|
||||
return path.replace("/", "\\");
|
||||
return path;
|
||||
}
|
||||
function replacePathSep(path) path.replace("/", IO.PATH_SEP, "g");
|
||||
|
||||
function joinPaths(head, tail)
|
||||
{
|
||||
@@ -278,7 +273,7 @@ function IO() //{{{
|
||||
function (args)
|
||||
{
|
||||
// TODO: "E172: Only one file name allowed"
|
||||
let filename = args[0] || "~/" + (WINDOWS ? "_" : ".") + EXTENSION_NAME + "rc";
|
||||
let filename = args[0] || io.getRCFile(null, true).path;
|
||||
let file = io.getFile(filename);
|
||||
|
||||
if (file.exists() && !args.bang)
|
||||
@@ -459,11 +454,6 @@ function IO() //{{{
|
||||
*/
|
||||
sourcing: null,
|
||||
|
||||
/**
|
||||
* @property {string} The OS's path separator.
|
||||
*/
|
||||
pathSeparator: WINDOWS ? "\\" : "/",
|
||||
|
||||
/**
|
||||
* Expands "~" and environment variables in <b>path</b>.
|
||||
*
|
||||
@@ -554,10 +544,12 @@ function IO() //{{{
|
||||
* Returns the first user RC file found in <b>dir</b>.
|
||||
*
|
||||
* @param {string} dir The directory to search.
|
||||
* @param {boolean} always When true, return a path whether
|
||||
* the file exists or not.
|
||||
* @default $HOME.
|
||||
* @returns {nsIFile} The RC file or null if none is found.
|
||||
*/
|
||||
getRCFile: function (dir)
|
||||
getRCFile: function (dir, always)
|
||||
{
|
||||
dir = dir || "~";
|
||||
|
||||
@@ -571,7 +563,8 @@ function IO() //{{{
|
||||
return rcFile1;
|
||||
else if (rcFile2.exists() && rcFile2.isFile())
|
||||
return rcFile2;
|
||||
else
|
||||
else if (always)
|
||||
return rcFile1;
|
||||
return null;
|
||||
},
|
||||
|
||||
@@ -1107,6 +1100,12 @@ lookup:
|
||||
|
||||
}; //}}}
|
||||
|
||||
IO.PATH_SEP = (function () {
|
||||
let file = services.create("file");
|
||||
file.append("foo");
|
||||
return file.path[0];
|
||||
})();
|
||||
|
||||
/**
|
||||
* @property {string} The value of the $VIMPERATOR_RUNTIME environment
|
||||
* variable.
|
||||
@@ -1126,8 +1125,6 @@ IO.expandPath = function (path, relative)
|
||||
{
|
||||
// TODO: proper pathname separator translation like Vim - this should be done elsewhere
|
||||
const WINDOWS = liberator.has("Win32");
|
||||
if (WINDOWS)
|
||||
path = path.replace("/", "\\", "g");
|
||||
|
||||
// expand any $ENV vars - this is naive but so is Vim and we like to be compatible
|
||||
// TODO: Vim does not expand variables set to an empty string (and documents it).
|
||||
@@ -1141,7 +1138,8 @@ IO.expandPath = function (path, relative)
|
||||
path = expand(path);
|
||||
|
||||
// expand ~
|
||||
if (!relative && (WINDOWS ? /^~(?:$|[\\\/])/ : /^~(?:$|\/)/).test(path))
|
||||
// Yuck.
|
||||
if (!relative && RegExp("~(?:$|[/" + util.escapeRegex(IO.PATH_SEP) + "])").test(path))
|
||||
{
|
||||
// Try $HOME first, on all systems
|
||||
let home = services.get("environment").get("HOME");
|
||||
@@ -1157,11 +1155,7 @@ IO.expandPath = function (path, relative)
|
||||
// TODO: Vim expands paths twice, once before checking for ~, once
|
||||
// after, but doesn't document it. Is this just a bug? --Kris
|
||||
path = expand(path);
|
||||
|
||||
if (WINDOWS)
|
||||
path = path.replace("/", "\\", "g");
|
||||
|
||||
return path;
|
||||
return path.replace("/", IO.PATH_SEP, "g");
|
||||
};
|
||||
|
||||
// vim: set fdm=marker sw=4 ts=4 et:
|
||||
|
||||
@@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@gmx.net>
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
|
||||
|
||||
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
|
||||
@@ -1295,11 +1295,12 @@ const liberator = (function () //{{{
|
||||
// TODO: we should have some class where all this guioptions stuff fits well
|
||||
hideGUI();
|
||||
|
||||
// finally, read a ~/.vimperatorrc and plugin/**.{vimp,js}
|
||||
// finally, read the RC file and source plugins
|
||||
// make sourcing asynchronous, otherwise commands that open new tabs won't work
|
||||
setTimeout(function () {
|
||||
|
||||
let init = services.get("environment").get(config.name.toUpperCase() + "_INIT");
|
||||
let extensionName = config.name.toUpperCase();
|
||||
let init = services.get("environment").get(extensionName + "_INIT");
|
||||
let rcFile = io.getRCFile("~");
|
||||
|
||||
if (init)
|
||||
@@ -1307,7 +1308,10 @@ const liberator = (function () //{{{
|
||||
else
|
||||
{
|
||||
if (rcFile)
|
||||
{
|
||||
io.source(rcFile.path, true);
|
||||
services.get("environment").set("MY_" + extensionName + "RC", rcFile.path);
|
||||
}
|
||||
else
|
||||
liberator.log("No user RC file found", 3);
|
||||
}
|
||||
@@ -1324,7 +1328,7 @@ const liberator = (function () //{{{
|
||||
|
||||
// after sourcing the initialization files, this function will set
|
||||
// all gui options to their default values, if they have not been
|
||||
// set before by any rc file
|
||||
// set before by any RC file
|
||||
for (let option in options)
|
||||
{
|
||||
if (option.setter)
|
||||
|
||||
@@ -13,7 +13,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@gmx.net>
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
|
||||
|
||||
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
|
||||
|
||||
@@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@gmx.net>
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
|
||||
|
||||
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
|
||||
|
||||
@@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@gmx.net>
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
|
||||
|
||||
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
|
||||
|
||||
@@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@gmx.net>
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
|
||||
|
||||
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
|
||||
|
||||
@@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@gmx.net>
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
|
||||
|
||||
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
|
||||
|
||||
@@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@gmx.net>
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
|
||||
|
||||
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
|
||||
|
||||
@@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@gmx.net>
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
|
||||
|
||||
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
|
||||
@@ -58,6 +58,11 @@ function CommandLine() //{{{
|
||||
|
||||
get length() this._messages.length,
|
||||
|
||||
clear: function clear()
|
||||
{
|
||||
this._messages = [];
|
||||
},
|
||||
|
||||
add: function add(message)
|
||||
{
|
||||
if (!message)
|
||||
@@ -975,6 +980,22 @@ function CommandLine() //{{{
|
||||
},
|
||||
{ argCount: "0" });
|
||||
|
||||
commands.add(["messc[lear]"],
|
||||
"Clear the message history",
|
||||
function () { messageHistory.clear(); },
|
||||
{ argCount: "0" });
|
||||
|
||||
commands.add(["sil[ent]"],
|
||||
"Run a command silently",
|
||||
function (args)
|
||||
{
|
||||
commandline.runSilently(function () liberator.execute(args[0]));
|
||||
},
|
||||
{
|
||||
completer: function (context) completion.ex(context),
|
||||
literal: 0
|
||||
});
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////}}}
|
||||
////////////////////// PUBLIC SECTION //////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////{{{
|
||||
|
||||
@@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@gmx.net>
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
|
||||
|
||||
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
|
||||
|
||||
@@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@gmx.net>
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
|
||||
|
||||
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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Main developer/Project founder:
|
||||
* Martin Stubenschrott (stubenschrott@gmx.net)
|
||||
* Martin Stubenschrott (stubenschrott@vimperator.org)
|
||||
|
||||
Developers:
|
||||
* Daniel Bainton (dpb .AT. driftaway .DOT. org)
|
||||
|
||||
@@ -10,7 +10,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@gmx.net>
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
|
||||
|
||||
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
|
||||
|
||||
@@ -13,7 +13,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@gmx.net>
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
|
||||
|
||||
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
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
../../../common/content/liberator.xul
|
||||
119
muttator/content/compose/liberator.xul
Normal file
119
muttator/content/compose/liberator.xul
Normal file
@@ -0,0 +1,119 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- ***** 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.
|
||||
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
|
||||
|
||||
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 ***** -->
|
||||
|
||||
<?xml-stylesheet href="chrome://liberator/skin/liberator.css" type="text/css"?>
|
||||
<!DOCTYPE overlay SYSTEM "liberator.dtd" [
|
||||
<!ENTITY liberator.content "chrome://liberator/content/">
|
||||
]>
|
||||
|
||||
<overlay id="liberator"
|
||||
xmlns:liberator="http://vimperator.org/namespaces/liberator"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:nc="http://home.netscape.com/NC-rdf#"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<script type="application/x-javascript;version=1.8" src="&liberator.content;liberator-overlay.js"/>
|
||||
|
||||
<window id="&liberator.mainWindow;">
|
||||
|
||||
<keyset id="mainKeyset">
|
||||
<key id="key_open_vimbar" key=":" oncommand="liberator.modules.commandline.open(':', '', liberator.modules.modes.EX);" modifiers=""/>
|
||||
<key id="key_stop" keycode="VK_ESCAPE" oncommand="liberator.modules.events.onEscape();"/>
|
||||
<!-- other keys are handled inside the event loop in events.js -->
|
||||
</keyset>
|
||||
|
||||
<popupset>
|
||||
<panel id="liberator-visualbell" liberator:highlight="Bell"/>
|
||||
</popupset>
|
||||
|
||||
<!--this notifies us also of focus events in the XUL
|
||||
from: http://developer.mozilla.org/en/docs/XUL_Tutorial:Updating_Commands !-->
|
||||
<commandset id="onVimperatorFocus"
|
||||
commandupdater="true"
|
||||
events="focus"
|
||||
oncommandupdate="if (liberator.modules.events != undefined) liberator.modules.events.onFocusChange(event);"/>
|
||||
<commandset id="onVimperatorSelect"
|
||||
commandupdater="true"
|
||||
events="select"
|
||||
oncommandupdate="if (liberator.modules.events != undefined) liberator.modules.events.onSelectionChange(event);"/>
|
||||
|
||||
<!-- As of Firefox 3.1pre, <iframe>.height changes do not seem to have immediate effect,
|
||||
therefore we need to put them into a <vbox> for which that works just fine -->
|
||||
<vbox class="liberator-container" hidden="false" collapsed="true">
|
||||
<iframe id="liberator-multiline-output" src="chrome://liberator/content/buffer.xhtml"
|
||||
flex="1" hidden="false" collapsed="false"
|
||||
onclick="liberator.modules.commandline.onMultilineOutputEvent(event)"/>
|
||||
</vbox>
|
||||
|
||||
<vbox class="liberator-container" hidden="false" collapsed="true">
|
||||
<iframe id="liberator-completions" src="chrome://liberator/content/buffer.xhtml"
|
||||
flex="1" hidden="false" collapsed="false"
|
||||
onclick="liberator.modules.commandline.onMultilineOutputEvent(event)"/>
|
||||
</vbox>
|
||||
|
||||
<stack orient="horizontal" align="stretch" class="liberator-container" liberator:highlight="CmdLine">
|
||||
<textbox class="plain" id="liberator-message" flex="1" readonly="true" liberator:highlight="Normal"/>
|
||||
<hbox id="liberator-commandline" hidden="false" collapsed="true" class="liberator-container" liberator:highlight="Normal">
|
||||
<label class="plain" id="liberator-commandline-prompt" flex="0" crop="end" value="" collapsed="true"/>
|
||||
<textbox class="plain" id="liberator-commandline-command" flex="1" type="timed" timeout="100"
|
||||
oninput="liberator.modules.commandline.onEvent(event);"
|
||||
onkeyup="liberator.modules.commandline.onEvent(event);"
|
||||
onfocus="liberator.modules.commandline.onEvent(event);"
|
||||
onblur="liberator.modules.commandline.onEvent(event);"/>
|
||||
</hbox>
|
||||
</stack>
|
||||
|
||||
<vbox class="liberator-container" hidden="false" collapsed="false">
|
||||
<textbox id="liberator-multiline-input" class="plain" flex="1" rows="1" hidden="false" collapsed="true" multiline="true"
|
||||
onkeypress="liberator.modules.commandline.onMultilineInputEvent(event);"
|
||||
oninput="liberator.modules.commandline.onMultilineInputEvent(event);"
|
||||
onblur="liberator.modules.commandline.onMultilineInputEvent(event);"/>
|
||||
</vbox>
|
||||
|
||||
</window>
|
||||
|
||||
<statusbar id="status-bar" liberator:highlight="StatusLine">
|
||||
<hbox insertbefore="&liberator.statusBefore;" insertafter="&liberator.statusAfter;"
|
||||
id="liberator-statusline" flex="1" hidden="false" align="center">
|
||||
<textbox class="plain" id="liberator-statusline-field-url" readonly="false" flex="1" crop="end"/>
|
||||
<label class="plain" id="liberator-statusline-field-inputbuffer" flex="0"/>
|
||||
<label class="plain" id="liberator-statusline-field-progress" flex="0"/>
|
||||
<label class="plain" id="liberator-statusline-field-tabcount" flex="0"/>
|
||||
<label class="plain" id="liberator-statusline-field-bufferposition" flex="0"/>
|
||||
</hbox>
|
||||
<!-- just hide them since other elements expect them -->
|
||||
<statusbarpanel id="statusbar-display" hidden="true"/>
|
||||
<statusbarpanel id="statusbar-progresspanel" hidden="true"/>
|
||||
</statusbar>
|
||||
|
||||
</overlay>
|
||||
|
||||
<!-- vim: set fdm=marker sw=4 ts=4 et: -->
|
||||
@@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@gmx.net>
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
|
||||
|
||||
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
|
||||
|
||||
@@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@gmx.net>
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
|
||||
|
||||
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
|
||||
|
||||
@@ -13,7 +13,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@gmx.net>
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
|
||||
|
||||
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
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
[glossary]
|
||||
author=Martin Stubenschrott
|
||||
email=stubenschrott@gmx.net
|
||||
email=stubenschrott@vimperator.org
|
||||
|
||||
# [header]
|
||||
# <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
|
||||
@@ -22,7 +22,7 @@ If you like it, but can't remember the shortcuts, press [m]F1[m] or
|
||||
[c]:help[c] to get this help window back.
|
||||
|
||||
|author| |donation| +
|
||||
Muttator was written by mailto:stubenschrott@gmx.net[Martin Stubenschrott].
|
||||
Muttator was written by mailto:stubenschrott@vimperator.org[Martin Stubenschrott].
|
||||
If you appreciate my work on Muttator and want to encourage me working on it
|
||||
more, you can either send me greetings, patches or make a donation:
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Main developer/Project founder:
|
||||
* Martin Stubenschrott (stubenschrott@gmx.net)
|
||||
* Martin Stubenschrott (stubenschrott@vimperator.org)
|
||||
|
||||
Developers:
|
||||
* Doug Kearns (dougkearns@gmail.com)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#### configuration
|
||||
|
||||
VERSION = 2.0b4pre
|
||||
VERSION = 2.0
|
||||
NAME = vimperator
|
||||
|
||||
include ../common/Makefile.common
|
||||
|
||||
@@ -1,12 +1,20 @@
|
||||
2009-XX-XX:
|
||||
* version 2.0 (probably)
|
||||
* version 2.1 (probably)
|
||||
* add :silent
|
||||
* add $MY_VIMPERATORRC
|
||||
* add ' and " local marks
|
||||
* add "w" and "W" Normal mode mappings for symmetry with o/O and t/T
|
||||
* add :messclear
|
||||
|
||||
2009-03-28:
|
||||
* version 2.0
|
||||
* IMPORTANT: For compatibility with vim, guioptions=b has been renamed
|
||||
'B'. 'b' now represents the bottom scrollbar.
|
||||
* IMPORTANT: :set now sets multiple options, as in Vim. Spaces in values
|
||||
must be quoted or escaped.
|
||||
* IMPORTANT: Due to much improved autocompletion, changed default 'complete' option
|
||||
value to 'sfl', listing intelligent Firefox location bar results. Removed possibility
|
||||
to use 'h' in 'complete'.
|
||||
value to 'sfl', listing intelligent Firefox location bar results. Using 'b' or 'h'
|
||||
might cause problems/massive slowdowns, use with care!
|
||||
* IMPORTANT: AlwaysHint mode with ;F mode changed the semantics slightly.
|
||||
* IMPORTANT: command actions now take an args object, returned from
|
||||
commands.parseArgs, as their first argument. This will break any commands
|
||||
@@ -45,7 +53,7 @@
|
||||
* add 'exrc'
|
||||
* add 'errorbells'
|
||||
* add shell command completion for :!
|
||||
* add :map <silent> to prevent a mapping from being echoed
|
||||
* add :map <silent> to prevent a mapping from being echoed (might be slow currently, however)
|
||||
* add guioptions=nN to number tabs
|
||||
* add :loadplugins command
|
||||
* add . mapping
|
||||
|
||||
@@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@gmx.net>
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
|
||||
|
||||
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
|
||||
|
||||
@@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@gmx.net>
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
|
||||
|
||||
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
|
||||
@@ -210,6 +210,14 @@ const config = { //{{{
|
||||
"Open one or more URLs in a new tab, based on current location",
|
||||
function () { commandline.open(":", "tabopen " + buffer.URL, modes.EX); });
|
||||
|
||||
mappings.add([modes.NORMAL], ["w"],
|
||||
"Open one or more URLs in a new window",
|
||||
function () { commandline.open(":", "winopen ", modes.EX); });
|
||||
|
||||
mappings.add([modes.NORMAL], ["W"],
|
||||
"Open one or more URLs in a new window, based on current location",
|
||||
function () { commandline.open(":", "winopen " + buffer.URL, modes.EX); });
|
||||
|
||||
mappings.add([modes.NORMAL],
|
||||
["<C-a>"], "Increment last number in URL",
|
||||
function (count) { incrementURL(count > 1 ? count : 1); },
|
||||
|
||||
@@ -13,7 +13,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@gmx.net>
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
|
||||
|
||||
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
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
[glossary]
|
||||
author=Martin Stubenschrott
|
||||
email=stubenschrott@gmx.net
|
||||
email=stubenschrott@vimperator.org
|
||||
|
||||
[header]
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
@@ -102,11 +102,20 @@ ________________________________________________________________________________
|
||||
|
||||
|:winopen| |:wopen| |:winedit|
|
||||
||:wino[pen][!] [a][arg1][a], [a][arg2][a], ...|| +
|
||||
||w||
|
||||
________________________________________________________________________________
|
||||
Just like [c]:tabopen[c] but opens the resulting web page(s) in a new window.
|
||||
________________________________________________________________________________
|
||||
|
||||
|
||||
|W| +
|
||||
||W||
|
||||
________________________________________________________________________________
|
||||
Open one or more URLs in a new window based on current location. Works like
|
||||
[m]w[m] but preselects current URL in the [c]:winopen[c] query.
|
||||
________________________________________________________________________________
|
||||
|
||||
|
||||
|<MiddleMouse>| |p| +
|
||||
||p||
|
||||
________________________________________________________________________________
|
||||
|
||||
@@ -203,6 +203,7 @@ section:Ex{nbsp}commands[ex-cmd-index,:index]
|
||||
||[c]:mark[c]|| Mark current location within the web page +
|
||||
||[c]:marks[c]|| Show all location marks of current web page +
|
||||
||[c]:messages[c]|| Display previously given messages +
|
||||
||[c]:messclear[c]|| Clear the message history +
|
||||
||[c]:mkvimperatorrc[c]|| Write current key mappings and changed options to the config file +
|
||||
||[c]:nohlsearch[c]|| Remove the search highlighting +
|
||||
||[c]:noremap[c]|| Map a key sequence without remapping keys +
|
||||
|
||||
@@ -24,7 +24,7 @@ If you like it but can't remember the shortcuts, then press [m]<F1>[m] or
|
||||
[c]:help[c] to get this help window back.
|
||||
|
||||
|author| |donation| +
|
||||
Vimperator was initially written by mailto:stubenschrott@gmx.net[Martin
|
||||
Vimperator was initially written by mailto:stubenschrott@vimperator.org[Martin
|
||||
Stubenschrott] but has found many other
|
||||
http://vimperator.org/trac/wiki/Vimperator/Authors[contributors] in the
|
||||
meanwhile. If you appreciate the work on Vimperator and want to encourage us
|
||||
|
||||
@@ -12,6 +12,13 @@ Display previously given messages.
|
||||
________________________________________________________________________________
|
||||
|
||||
|
||||
|:messc| |:messclear| +
|
||||
||:messc[lear]||
|
||||
________________________________________________________________________________
|
||||
Clear the message history.
|
||||
________________________________________________________________________________
|
||||
|
||||
|
||||
|g<| +
|
||||
||g<||
|
||||
________________________________________________________________________________
|
||||
|
||||
@@ -15,17 +15,17 @@ further locations are tried.
|
||||
_$VIMPERATOR_INIT_ -- May contain a single Ex command (e.g.,
|
||||
"[c]:source {file}[c]").
|
||||
b. [a]\~/_vimperatorrc[a] -- Windows only. If this file exists, its contents
|
||||
are executed.
|
||||
are executed and _$MY_VIMPERATORRC_ set to its path.
|
||||
c. [a]\~/.vimperatorrc[a] -- If this file exists, its contents are executed.
|
||||
|
||||
2. If 'exrc' is set, then any RC file in the current directory is also sourced.
|
||||
|
||||
3. All directories in 'runtimepath' are searched for a "plugin"
|
||||
subdirectory and all yet unloaded plugins are loaded. For each plugin
|
||||
directory, all *.\{js,vimp} files (including those in further
|
||||
subdirectory and all yet unloaded plugins are loaded. For each
|
||||
plugin directory, all *.\{js,vimp} files (including those in further
|
||||
subdirectories) are sourced alphabetically. No plugins will be sourced
|
||||
if 'noloadplugins' is set. Any particular plugin will not be loaded if
|
||||
it has already been loaded (e.g., by an earlier [c]:loadplugins[c]
|
||||
if 'noloadplugins' is set. Any particular plugin will not be loaded
|
||||
if it has already been loaded (e.g., by an earlier [c]:loadplugins[c]
|
||||
command).
|
||||
|
||||
The user's ~ (i.e., "home") directory is determined as follows:
|
||||
|
||||
Reference in New Issue
Block a user