1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 16:47:58 +01:00
This commit is contained in:
Kris Maglione
2009-03-30 01:14:46 -04:00
113 changed files with 1839 additions and 712 deletions

View File

@@ -10,8 +10,8 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the for the specific language governing rights and limitations under the
License. License.
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@gmx.net> Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
Copyright (c) 2009 by Prathyush Thota <prathyushthota@gmail.com> and the authors of the specific projects inside (see the AUTHORS file in each).
Alternatively, the contents of this file may be used under the terms of 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 either the GNU General Public License Version 2 or later (the "GPL"), or

View File

@@ -9,7 +9,7 @@ LOCALEDIR = locale
DOC_SRC_FILES = $(wildcard $(LOCALEDIR)/*/*.txt) DOC_SRC_FILES = $(wildcard $(LOCALEDIR)/*/*.txt)
LOCALES = $(foreach locale,$(wildcard $(LOCALEDIR)/*),$(word 2,$(subst /, ,$(locale)))) LOCALES = $(foreach locale,$(wildcard $(LOCALEDIR)/*),$(word 2,$(subst /, ,$(locale))))
MAKE_JAR = VERSION="$(VERSION)" DATE="$(BUILD_DATE)" bash $(BASE)/make_jar.sh MAKE_JAR = VERSION="$(VERSION)" DATE="$(BUILD_DATE)" sh $(BASE)/make_jar.sh
# TODO: specify source files manually? # TODO: specify source files manually?
JAR_BASES = $(TOP) $(BASE) JAR_BASES = $(TOP) $(BASE)
@@ -45,7 +45,7 @@ TARGETS = all help info doc jar xpi install clean distclean $(JAR)
$(TARGETS:%=\%.%): $(TARGETS:%=\%.%):
echo MAKE $* $(@:$*.%=%) echo MAKE $* $(@:$*.%=%)
$(MAKE) -C $* $(@:$*.%=%) $(MAKE) -C $* $(@:$*.%=%)
echo $$SHELL
.PHONY: $(TARGETS) .PHONY: $(TARGETS)
all: help all: help

View File

@@ -47,11 +47,9 @@
</xul:vbox> </xul:vbox>
</xul:stack> </xul:stack>
<xul:stack class="tab-text-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:label xbl:inherits="value=ordinal" class="tab-text" liberator:highlight="TabNumber"/>
</xul:stack> </xul:stack>
<xul:stack class="tab-text-stack" flex="1"> <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:label flex="1" xbl:inherits="value=label,crop,accesskey" crop="right" class="tab-text"/>
</xul:stack> </xul:stack>
</xul:hbox> </xul:hbox>

View File

@@ -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 for the specific language governing rights and limitations under the
License. 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 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 either the GNU General Public License Version 2 or later (the "GPL"), or
@@ -44,7 +44,6 @@ function Buffer() //{{{
// FIXME: This doesn't belong here. // FIXME: This doesn't belong here.
let mainWindowID = config.mainWindowID || "main-window"; let mainWindowID = config.mainWindowID || "main-window";
let fontSize = util.computedStyle(document.getElementById(mainWindowID)).fontSize; let fontSize = util.computedStyle(document.getElementById(mainWindowID)).fontSize;
styles.registerSheet("chrome://liberator/skin/liberator.css"); styles.registerSheet("chrome://liberator/skin/liberator.css");
@@ -125,6 +124,7 @@ function Buffer() //{{{
else else
v = win.scrollMaxY / 100 * vertical; v = win.scrollMaxY / 100 * vertical;
marks.add("'", true);
win.scrollTo(h, v); win.scrollTo(h, v);
} }
@@ -147,13 +147,13 @@ function Buffer() //{{{
getter: function () window.fullScreen getter: function () window.fullScreen
}); });
options.add(["nextpattern"], options.add(["nextpattern"], // \u00BB is » (>> in a single char)
"Patterns to use when guessing the 'next' page in a document sequence", "Patterns to use when guessing the 'next' page in a document sequence",
"stringlist", "\\bnext\\b,^>$,^(>>|»)$,^(>|»),(>|»)$,\\bmore\\b"); "stringlist", "\\bnext\\b,^>$,^(>>|\u00BB)$,^(>|\u00BB),(>|\u00BB)$,\\bmore\\b");
options.add(["previouspattern"], options.add(["previouspattern"], // \u00AB is « (<< in a single char)
"Patterns to use when guessing the 'previous' page in a document sequence", "Patterns to use when guessing the 'previous' page in a document sequence",
"stringlist", "\\bprev|previous\\b,^<$,^(<<|«)$,^(<|«),(<|«)$"); "stringlist", "\\bprev|previous\\b,^<$,^(<<|\u00AB)$,^(<|\u00AB),(<|\u00AB)$");
options.add(["pageinfo", "pa"], "Desired info on :pa[geinfo]", "charlist", "gfm", options.add(["pageinfo", "pa"], "Desired info on :pa[geinfo]", "charlist", "gfm",
{ {
@@ -603,6 +603,7 @@ function Buffer() //{{{
commands.add(["st[op]"], commands.add(["st[op]"],
"Stop loading", "Stop loading",
<<<<<<< HEAD:common/content/buffer.js
function () function ()
{ {
if (config.stop) if (config.stop)
@@ -610,6 +611,9 @@ function Buffer() //{{{
else else
window.BrowserStop(); window.BrowserStop();
}, },
=======
function () { window.BrowserStop(); },
>>>>>>> a9f04ee3d00b282e7a91b37eb23168fb39e9de5b:common/content/buffer.js
{ argCount: "0" }); { argCount: "0" });
commands.add(["vie[wsource]"], commands.add(["vie[wsource]"],
@@ -1034,7 +1038,16 @@ function Buffer() //{{{
} }
else if (elemTagName == "input" && elem.getAttribute('type').toLowerCase() == "file") else if (elemTagName == "input" && elem.getAttribute('type').toLowerCase() == "file")
{ {
commandline.input("Upload file: ", function (file) elem.value = file, {completer: completion.file, default: elem.value}); commandline.input("Upload file: ", function (path)
{
let file = io.getFile(path);
if (!file.exists())
return liberator.beep();
elem.value = file.path;
}
, {completer: completion.file, default: elem.value});
return; return;
} }
@@ -1144,7 +1157,16 @@ function Buffer() //{{{
} }
else if (localName == "input" && elem.getAttribute('type').toLowerCase() == "file") else if (localName == "input" && elem.getAttribute('type').toLowerCase() == "file")
{ {
commandline.input("Upload file: ", function (file) elem.value = file, {completer: completion.file, default: elem.value}); commandline.input("Upload file: ", function (path)
{
let file = io.getFile(path);
if (!file.exists())
return liberator.beep();
elem.value = file.path;
}
, {completer: completion.file, default: elem.value});
return; return;
} }
@@ -1297,6 +1319,17 @@ function Buffer() //{{{
scrollToPercentiles(-1, percentage); 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. * Scrolls the current buffer laterally to its leftmost.
*/ */
@@ -1533,12 +1566,11 @@ function Marks() //{{{
function onPageLoad(event) function onPageLoad(event)
{ {
let win = event.originalTarget.defaultView; 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) 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); pendingJumps.splice(i, 1);
return; return;
} }
@@ -1583,7 +1615,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 isURLMark(mark) /^[A-Z0-9]$/.test(mark);
function localMarkIter() function localMarkIter()
@@ -1744,13 +1776,14 @@ function Marks() //{{{
* @param {string} mark * @param {string} mark
*/ */
// TODO: add support for frameset pages // TODO: add support for frameset pages
add: function (mark) add: function (mark, silent)
{ {
let win = window.content; let win = window.content;
if (win.document.body.localName.toLowerCase() == "frameset") if (win.document.body.localName.toLowerCase() == "frameset")
{ {
liberator.echoerr("Marks support for frameset pages not implemented yet"); if (!silent)
liberator.echoerr("Marks support for frameset pages not implemented yet");
return; return;
} }
@@ -1761,7 +1794,8 @@ function Marks() //{{{
if (isURLMark(mark)) if (isURLMark(mark))
{ {
urlMarks.set(mark, { location: win.location.href, position: position, tab: tabs.getTab() }); urlMarks.set(mark, { location: win.location.href, position: position, tab: tabs.getTab() });
liberator.log("Adding URL mark: " + markToString(mark, urlMarks.get(mark)), 5); if (!silent)
liberator.log("Adding URL mark: " + markToString(mark, urlMarks.get(mark)), 5);
} }
else if (isLocalMark(mark)) else if (isLocalMark(mark))
{ {
@@ -1771,7 +1805,8 @@ function Marks() //{{{
localMarks.set(mark, []); localMarks.set(mark, []);
let vals = { location: win.location.href, position: position }; let vals = { location: win.location.href, position: position };
localMarks.get(mark).push(vals); localMarks.get(mark).push(vals);
liberator.log("Adding local mark: " + markToString(mark, vals), 5); if (!silent)
liberator.log("Adding local mark: " + markToString(mark, vals), 5);
} }
}, },
@@ -1841,7 +1876,7 @@ function Marks() //{{{
return; return;
} }
liberator.log("Jumping to URL mark: " + markToString(mark, slice), 5); 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; ok = true;
} }
} }
@@ -1856,7 +1891,7 @@ function Marks() //{{{
if (win.location.href == lmark.location) if (win.location.href == lmark.location)
{ {
liberator.log("Jumping to local mark: " + markToString(mark, lmark), 5); 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; ok = true;
break; break;
} }

View File

@@ -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 for the specific language governing rights and limitations under the
License. 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 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 either the GNU General Public License Version 2 or later (the "GPL"), or

View File

@@ -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 for the specific language governing rights and limitations under the
License. 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 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 either the GNU General Public License Version 2 or later (the "GPL"), or
@@ -1393,11 +1393,27 @@ function Completion() //{{{
song: function song(context, args) song: function song(context, args)
{ {
if (args.completeArg == 0) if (args.completeArg == 0)
context.completions = getArtists(); {
context.title = ["Artists"];
context.completions = player.getArtists();
}
else if (args.completeArg == 1) else if (args.completeArg == 1)
context.completions = getAlbums(args[0]); {
context.title = ["Albums by " + args[0]];
context.completions = player.getAlbums(args[0]);
}
else if (args.completeArg == 2) else if (args.completeArg == 2)
context.completions = getTracks(args[0],args[1]); {
context.title = ["Tracks from " + args[1] + " by " + args[0]];
context.completions = player.getTracks(args[0], args[1]);
}
},
playlist: function playlist(context, args)
{
context.title = ["Playlist", "Type"];
context.keys = { text: "name", description: "type" };
context.completions = player.getPlaylists();
}, },
buffer: function buffer(context) buffer: function buffer(context)
@@ -1648,6 +1664,14 @@ function Completion() //{{{
context.completions = marks.all; context.completions = marks.all;
}, },
mediaView: function mediaView(context)
{
context.title = ["Media View", "URL"];
context.anchored = false;
context.keys = { text: "contentTitle", description: "contentUrl" };
context.completions = player.getMediaPages();
},
menuItem: function menuItem(context) menuItem: function menuItem(context)
{ {
context.title = ["Menu Path", "Label"]; context.title = ["Menu Path", "Label"];

View File

@@ -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 for the specific language governing rights and limitations under the
License. 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 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 either the GNU General Public License Version 2 or later (the "GPL"), or

View File

@@ -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 for the specific language governing rights and limitations under the
License. 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 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 either the GNU General Public License Version 2 or later (the "GPL"), or
@@ -687,7 +687,7 @@ function Events() //{{{
["<Tab>"], "Advance keyboard focus", ["<Tab>"], "Advance keyboard focus",
function () { document.commandDispatcher.advanceFocus(); }); function () { document.commandDispatcher.advanceFocus(); });
mappings.add([modes.NORMAL, modes.PLAYER,modes.VISUAL, modes.CARET, modes.INSERT, modes.TEXTAREA], mappings.add([modes.NORMAL, modes.PLAYER, modes.VISUAL, modes.CARET, modes.INSERT, modes.TEXTAREA],
["<S-Tab>"], "Rewind keyboard focus", ["<S-Tab>"], "Rewind keyboard focus",
function () { document.commandDispatcher.rewindFocus(); }); function () { document.commandDispatcher.rewindFocus(); });
@@ -898,6 +898,7 @@ function Events() //{{{
let wasFeeding = this.feedingKeys; let wasFeeding = this.feedingKeys;
this.feedingKeys = true; this.feedingKeys = true;
this.duringFeed = this.duringFeed || "";
let wasSilent = commandline.silent; let wasSilent = commandline.silent;
if (silent) if (silent)
commandline.silent = silent; commandline.silent = silent;
@@ -993,6 +994,15 @@ function Events() //{{{
this.feedingKeys = wasFeeding; this.feedingKeys = wasFeeding;
if (silent) if (silent)
commandline.silent = wasSilent; commandline.silent = wasSilent;
if (this.duringFeed != "")
{
//Create a scalar constant for closure.
let duringFeed = this.duringFeed;
this.duringFeed = "";
setTimeout(function () events.feedkeys(duringFeed, false, false, true), 0);
}
} }
return i == keys.length; return i == keys.length;
}, },
@@ -1357,9 +1367,9 @@ function Events() //{{{
// we can differentiate between a recorded <C-c> // we can differentiate between a recorded <C-c>
// interrupting whatever it's started and a real <C-c> // interrupting whatever it's started and a real <C-c>
// interrupting our playback. // interrupting our playback.
if (events.feedingKeys) if (events.feedingKeys && !event.isMacro)
{ {
if (key == "<C-c>" && !event.isMacro) if (key == "<C-c>")
{ {
events.feedingKeys = false; events.feedingKeys = false;
if (modes.isReplaying) if (modes.isReplaying)
@@ -1371,6 +1381,13 @@ function Events() //{{{
event.stopPropagation(); event.stopPropagation();
return true; return true;
} }
else
{
events.duringFeed += key;
event.preventDefault();
event.stopPropagation();
return true;
}
} }
let stop = true; // set to false if we should NOT consume this event but let Firefox handle it let stop = true; // set to false if we should NOT consume this event but let Firefox handle it
@@ -1653,13 +1670,16 @@ function Events() //{{{
} }
}, },
// for notifying the user about secure web pages // for notifying the user about secure web pages
onSecurityChange: function (webProgress, aRequest, aState) onSecurityChange: function (webProgress, request, state)
{ {
if (aState & Ci.nsIWebProgressListener.STATE_IS_INSECURE) // TODO: do something useful with STATE_SECURE_MED and STATE_SECURE_LOW
if (state & Ci.nsIWebProgressListener.STATE_IS_INSECURE)
statusline.setClass("insecure"); statusline.setClass("insecure");
else if (aState & Ci.nsIWebProgressListener.STATE_IS_BROKEN) else if (state & Ci.nsIWebProgressListener.STATE_IS_BROKEN)
statusline.setClass("broken"); statusline.setClass("broken");
else if (aState & Ci.nsIWebProgressListener.STATE_IS_SECURE) else if (state & Ci.nsIWebProgressListener.STATE_IDENTITY_EV_TOPLEVEL)
statusline.setClass("extended");
else if (state & Ci.nsIWebProgressListener.STATE_SECURE_HIGH)
statusline.setClass("secure"); statusline.setClass("secure");
}, },
onStatusChange: function (webProgress, request, status, message) onStatusChange: function (webProgress, request, status, message)

View File

@@ -1,4 +1,4 @@
/***** B/GIN LICENSE BLOCK ***** {{{ /***** BEGIN LICENSE BLOCK ***** {{{
Version: MPL 1.1/GPL 2.0/LGPL 2.1 Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Version The contents of this file are subject to the Mozilla Public License Version
@@ -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 for the specific language governing rights and limitations under the
License. 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 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 either the GNU General Public License Version 2 or later (the "GPL"), or

View File

@@ -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 for the specific language governing rights and limitations under the
License. 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 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 either the GNU General Public License Version 2 or later (the "GPL"), or

View File

@@ -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 for the specific language governing rights and limitations under the
License. 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 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 either the GNU General Public License Version 2 or later (the "GPL"), or

View File

@@ -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 for the specific language governing rights and limitations under the
License. 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 Code based on venkman
Alternatively, the contents of this file may be used under the terms of 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); .map(function (dir) dir == "" ? io.getCurrentDirectory().path : dir);
} }
function replacePathSep(path) function replacePathSep(path) path.replace("/", IO.PATH_SEP, "g");
{
if (WINDOWS)
return path.replace("/", "\\");
return path;
}
function joinPaths(head, tail) function joinPaths(head, tail)
{ {
@@ -278,7 +273,7 @@ function IO() //{{{
function (args) function (args)
{ {
// TODO: "E172: Only one file name allowed" // 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); let file = io.getFile(filename);
if (file.exists() && !args.bang) if (file.exists() && !args.bang)
@@ -459,11 +454,6 @@ function IO() //{{{
*/ */
sourcing: null, sourcing: null,
/**
* @property {string} The OS's path separator.
*/
pathSeparator: WINDOWS ? "\\" : "/",
/** /**
* Expands "~" and environment variables in <b>path</b>. * 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>. * Returns the first user RC file found in <b>dir</b>.
* *
* @param {string} dir The directory to search. * @param {string} dir The directory to search.
* @param {boolean} always When true, return a path whether
* the file exists or not.
* @default $HOME. * @default $HOME.
* @returns {nsIFile} The RC file or null if none is found. * @returns {nsIFile} The RC file or null if none is found.
*/ */
getRCFile: function (dir) getRCFile: function (dir, always)
{ {
dir = dir || "~"; dir = dir || "~";
@@ -571,8 +563,9 @@ function IO() //{{{
return rcFile1; return rcFile1;
else if (rcFile2.exists() && rcFile2.isFile()) else if (rcFile2.exists() && rcFile2.isFile())
return rcFile2; return rcFile2;
else else if (always)
return null; return rcFile1;
return null;
}, },
// return a nsILocalFile for path where you can call isDirectory(), etc. on // return a nsILocalFile for path where you can call isDirectory(), etc. on
@@ -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 * @property {string} The value of the $VIMPERATOR_RUNTIME environment
* variable. * variable.
@@ -1126,8 +1125,6 @@ IO.expandPath = function (path, relative)
{ {
// TODO: proper pathname separator translation like Vim - this should be done elsewhere // TODO: proper pathname separator translation like Vim - this should be done elsewhere
const WINDOWS = liberator.has("Win32"); 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 // 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). // 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); path = expand(path);
// expand ~ // expand ~
if (!relative && (WINDOWS ? /^~(?:$|[\\\/])/ : /^~(?:$|\/)/).test(path)) // Yuck.
if (!relative && RegExp("~(?:$|[/" + util.escapeRegex(IO.PATH_SEP) + "])").test(path))
{ {
// Try $HOME first, on all systems // Try $HOME first, on all systems
let home = services.get("environment").get("HOME"); 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 // TODO: Vim expands paths twice, once before checking for ~, once
// after, but doesn't document it. Is this just a bug? --Kris // after, but doesn't document it. Is this just a bug? --Kris
path = expand(path); path = expand(path);
return path.replace("/", IO.PATH_SEP, "g");
if (WINDOWS)
path = path.replace("/", "\\", "g");
return path;
}; };
// vim: set fdm=marker sw=4 ts=4 et: // vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -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 for the specific language governing rights and limitations under the
License. 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 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 either the GNU General Public License Version 2 or later (the "GPL"), or
@@ -83,9 +83,6 @@ const liberator = (function () //{{{
{ {
if (nError++ == 0) if (nError++ == 0)
window.toJavaScriptConsole(); window.toJavaScriptConsole();
liberator.dump("Error loading module - "+ name + "..");
liberator.dump(e);
liberator.dump(e.stack);
liberator.reportError(e); liberator.reportError(e);
} }
} }
@@ -1229,7 +1226,12 @@ const liberator = (function () //{{{
config.features.push(getPlatformFeature()); config.features.push(getPlatformFeature());
config.defaults = config.defaults || {}; config.defaults = config.defaults || {};
config.guioptions = config.guioptions || {}; config.guioptions = config.guioptions || {};
config.browserModes = config.browserModes || [modes.NORMAL];
// -> we can't use this, since config.browserModes might already be defined as a getter-only
// TODO: also change the other config.* defaults?
// config.browserModes = config.browserModes || [modes.NORMAL];
if (!config.browserModes)
config.browserModes = [modes.NORMAL];
config.mailModes = config.mailModes || [modes.NORMAL]; config.mailModes = config.mailModes || [modes.NORMAL];
// TODO: suitable defaults? // TODO: suitable defaults?
//config.mainWidget //config.mainWidget
@@ -1290,11 +1292,12 @@ const liberator = (function () //{{{
// TODO: we should have some class where all this guioptions stuff fits well // TODO: we should have some class where all this guioptions stuff fits well
hideGUI(); 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 // make sourcing asynchronous, otherwise commands that open new tabs won't work
setTimeout(function () { 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("~"); let rcFile = io.getRCFile("~");
if (init) if (init)
@@ -1302,7 +1305,10 @@ const liberator = (function () //{{{
else else
{ {
if (rcFile) if (rcFile)
{
io.source(rcFile.path, true); io.source(rcFile.path, true);
services.get("environment").set("MY_" + extensionName + "RC", rcFile.path);
}
else else
liberator.log("No user RC file found", 3); liberator.log("No user RC file found", 3);
} }
@@ -1319,7 +1325,7 @@ const liberator = (function () //{{{
// after sourcing the initialization files, this function will set // after sourcing the initialization files, this function will set
// all gui options to their default values, if they have not been // 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) for (let option in options)
{ {
if (option.setter) if (option.setter)

View File

@@ -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 for the specific language governing rights and limitations under the
License. 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 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 either the GNU General Public License Version 2 or later (the "GPL"), or

View File

@@ -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 for the specific language governing rights and limitations under the
License. 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 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 either the GNU General Public License Version 2 or later (the "GPL"), or
@@ -257,8 +257,11 @@ function Mappings() //{{{
addMapCommands("", [modes.NORMAL], ""); addMapCommands("", [modes.NORMAL], "");
addMapCommands("c", [modes.COMMAND_LINE], "command line"); addMapCommands("c", [modes.COMMAND_LINE], "command line");
addMapCommands("i", [modes.INSERT, modes.TEXTAREA], "insert"); addMapCommands("i", [modes.INSERT, modes.TEXTAREA], "insert");
// FIXME
if (liberator.has("mail")) if (liberator.has("mail"))
addMapCommands("m", [modes.MESSAGE], "message"); addMapCommands("m", [modes.MESSAGE], "message");
if (liberator.has("player"))
addMapCommands("p", [modes.PLAYER], "player");
/////////////////////////////////////////////////////////////////////////////}}} /////////////////////////////////////////////////////////////////////////////}}}
////////////////////// PUBLIC SECTION ////////////////////////////////////////// ////////////////////// PUBLIC SECTION //////////////////////////////////////////

View File

@@ -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 for the specific language governing rights and limitations under the
License. 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 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 either the GNU General Public License Version 2 or later (the "GPL"), or
@@ -277,6 +277,8 @@ const modes = (function () //{{{
self.addMode("OUTPUT_MULTILINE", true); self.addMode("OUTPUT_MULTILINE", true);
self.addMode("SEARCH_FORWARD", true); self.addMode("SEARCH_FORWARD", true);
self.addMode("SEARCH_BACKWARD", true); self.addMode("SEARCH_BACKWARD", true);
self.addMode("SEARCH_VIEW_FORWARD", true);
self.addMode("SEARCH_VIEW_BACKWARD", true);
self.addMode("MENU", true); // a popupmenu is active self.addMode("MENU", true); // a popupmenu is active
self.addMode("LINE", true); // linewise visual mode self.addMode("LINE", true); // linewise visual mode
self.addMode("PROMPT", true); self.addMode("PROMPT", true);

View File

@@ -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 for the specific language governing rights and limitations under the
License. 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 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 either the GNU General Public License Version 2 or later (the "GPL"), or

View File

@@ -71,9 +71,10 @@ Highlights.prototype.CSS = <![CDATA[
LineNr color: orange; background: white; LineNr color: orange; background: white;
Question color: green; background: white; font-weight: bold; Question color: green; background: white; font-weight: bold;
StatusLine color: white; background: black; StatusLine color: white; background: black;
StatusLineBroken color: black; background: #FF6060 /* light-red */ StatusLineBroken color: black; background: #FFa0a0 /* light-red */
StatusLineSecure color: black; background: #B0FF00 /* light-green */ StatusLineSecure color: black; background: #a0a0FF /* light-blue */
StatusLineExtended color: black; background: #a0FFa0 /* light-green */
TabClose TabClose
TabIcon TabIcon

View File

@@ -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 for the specific language governing rights and limitations under the
License. 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 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 either the GNU General Public License Version 2 or later (the "GPL"), or
@@ -49,7 +49,7 @@ function Tabs() //{{{
tabmail.__defineGetter__("mTabs", function () this.tabContainer.childNodes); tabmail.__defineGetter__("mTabs", function () this.tabContainer.childNodes);
tabmail.__defineGetter__("mCurrentTab", function () this.tabContainer.selectedItem); tabmail.__defineGetter__("mCurrentTab", function () this.tabContainer.selectedItem);
tabmail.__defineGetter__("mStrip", function () this.tabStrip); tabmail.__defineGetter__("mStrip", function () this.tabStrip);
tabmail.__defineGetter__("browsers", function () [browser for (browser in Iterator(this.mTabs))] ); tabmail.__defineGetter__("browsers", function () [browser for (browser in Iterator(this.mTabs))]);
} }
return tabmail; return tabmail;
}; };
@@ -687,9 +687,10 @@ function Tabs() //{{{
{ {
let tabStrip = null; let tabStrip = null;
// FIXME: why is this app specific conditional code here?
if (config.hostApplication == "Firefox") if (config.hostApplication == "Firefox")
tabStrip = getBrowser().mStrip.getElementsByClassName("tabbrowser-tabs")[0]; tabStrip = getBrowser().mStrip.getElementsByClassName("tabbrowser-tabs")[0];
else if (config.hostApplication == "Thunderbird") else if (/^(Thunderbird|Songbird)$/.test(config.hostApplication))
tabStrip = getBrowser().mStrip; tabStrip = getBrowser().mStrip;
return tabStrip; return tabStrip;

View File

@@ -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 for the specific language governing rights and limitations under the
License. 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 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 either the GNU General Public License Version 2 or later (the "GPL"), or

View File

@@ -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 for the specific language governing rights and limitations under the
License. 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 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 either the GNU General Public License Version 2 or later (the "GPL"), or
@@ -58,6 +58,11 @@ function CommandLine() //{{{
get length() this._messages.length, get length() this._messages.length,
clear: function clear()
{
this._messages = [];
},
add: function add(message) add: function add(message)
{ {
if (!message) if (!message)
@@ -772,6 +777,11 @@ function CommandLine() //{{{
"number", 500, "number", 500,
{ validator: function (value) value >= 0 }); { validator: function (value) value >= 0 });
options.add(["maxitems"],
"Maximum number of items to display at once",
"number", 20,
{ validator: function (value) value >= 0 });
options.add(["messages", "msgs"], options.add(["messages", "msgs"],
"Number of messages to store in the message history", "Number of messages to store in the message history",
"number", 100, "number", 100,
@@ -975,6 +985,22 @@ function CommandLine() //{{{
}, },
{ argCount: "0" }); { 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 ////////////////////////////////////////// ////////////////////// PUBLIC SECTION //////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{ /////////////////////////////////////////////////////////////////////////////{{{
@@ -1704,8 +1730,6 @@ function ItemList(id) //{{{
////////////////////// PRIVATE SECTION ///////////////////////////////////////// ////////////////////// PRIVATE SECTION /////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{ /////////////////////////////////////////////////////////////////////////////{{{
const CONTEXT_LINES = 3;
var maxItems = 20;
var completionElements = []; var completionElements = [];
var iframe = document.getElementById(id); var iframe = document.getElementById(id);
@@ -1761,7 +1785,7 @@ function ItemList(id) //{{{
<div key="completions"/> <div key="completions"/>
<div highlight="Completions"> <div highlight="Completions">
{ {
template.map(util.range(0, maxItems * 2), function (i) template.map(util.range(0, options["maxitems"] * 2), function (i)
<span highlight="CompItem"> <span highlight="CompItem">
<li highlight="NonText">~</li> <li highlight="NonText">~</li>
</span>) </span>)
@@ -1797,7 +1821,7 @@ function ItemList(id) //{{{
* Uses the entries in "items" to fill the listbox and does incremental * Uses the entries in "items" to fill the listbox and does incremental
* filling to speed up things. * filling to speed up things.
* *
* @param {number} offset Start at this index and show maxItems. * @param {number} offset Start at this index and show options["maxitems"].
*/ */
function fill(offset) function fill(offset)
{ {
@@ -1807,11 +1831,11 @@ function ItemList(id) //{{{
return false; return false;
startIndex = offset; startIndex = offset;
endIndex = Math.min(startIndex + maxItems, items.allItems.items.length); endIndex = Math.min(startIndex + options["maxitems"], items.allItems.items.length);
let haveCompletions = false; let haveCompletions = false;
let off = 0; let off = 0;
let end = startIndex + maxItems; let end = startIndex + options["maxitems"];
function getRows(context) function getRows(context)
{ {
function fix(n) Math.max(0, Math.min(len, n)); function fix(n) Math.max(0, Math.min(len, n));
@@ -1925,6 +1949,8 @@ function ItemList(id) //{{{
let sel = selIndex; let sel = selIndex;
let len = items.allItems.items.length; let len = items.allItems.items.length;
let newOffset = startIndex; let newOffset = startIndex;
let maxItems = options["maxitems"];
let contextLines = (maxItems > 3)? 3 : Math.max(0, maxItems - 1);
if (index == -1 || index == null || index == len) // wrapped around if (index == -1 || index == null || index == len) // wrapped around
{ {
@@ -1935,10 +1961,10 @@ function ItemList(id) //{{{
} }
else else
{ {
if (index <= startIndex + CONTEXT_LINES) if (index <= startIndex + contextLines)
newOffset = index - CONTEXT_LINES; newOffset = index - contextLines;
if (index >= endIndex - CONTEXT_LINES) if (index >= endIndex - contextLines)
newOffset = index + CONTEXT_LINES - maxItems + 1; newOffset = index + contextLines - maxItems + 1;
newOffset = Math.min(newOffset, len - maxItems); newOffset = Math.min(newOffset, len - maxItems);
newOffset = Math.max(newOffset, 0); newOffset = Math.max(newOffset, 0);
@@ -2018,16 +2044,18 @@ function StatusLine() //{{{
/** /**
* Update the status bar to indicate how secure the website is: * Update the status bar to indicate how secure the website is:
* extended - Secure connection with Extended Validation(EV) certificate.
* secure - Secure connection with valid certificate. * secure - Secure connection with valid certificate.
* broken - Secure connection with invalid certificate, or * broken - Secure connection with invalid certificate, or
* mixed content. * mixed content.
* insecure - Insecure connection. * insecure - Insecure connection.
* *
* @param {'secure'|'broken'|'insecure'} type * @param {'extended'|'secure'|'broken'|'insecure'} type
*/ */
setClass: function setClass(type) setClass: function setClass(type)
{ {
const highlightGroup = { const highlightGroup = {
extended: "StatusLineExtended",
secure: "StatusLineSecure", secure: "StatusLineSecure",
broken: "StatusLineBroken", broken: "StatusLineBroken",
insecure: "StatusLine" insecure: "StatusLine"

View File

@@ -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 for the specific language governing rights and limitations under the
License. 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 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 either the GNU General Public License Version 2 or later (the "GPL"), or
@@ -249,6 +249,40 @@ const util = { //{{{
return delimiter + str.replace(/([\\'"])/g, "\\$1").replace("\n", "\\n", "g").replace("\t", "\\t", "g") + delimiter; return delimiter + str.replace(/([\\'"])/g, "\\$1").replace("\n", "\\n", "g").replace("\t", "\\t", "g") + delimiter;
}, },
/**
* Split a string on literal occurances of a marker.
*
* Specifically this ignores occurences preceded by a backslash, or
* contained within 'single' or "double" quotes.
*
* It assumes backslash escaping on strings, and will thus not count quotes
* that are preceded by a backslash or within other quotes as starting or
* ending quoted sections of the string.
*
* @param {string} str
* @param {RegExp} marker
*/
splitLiteral: function splitLiteral(str, marker)
{
let results = [];
let resep = RegExp(/^(([^\\'"]|\\.|'([^\\']|\\.)*'|"([^\\"]|\\.)*")*?)/.source + marker.source);
let cont = true;
while (cont)
{
cont = false;
str = str.replace(resep, function (match, before)
{
results.push(before);
cont = true;
return "";
});
}
results.push(str);
return results;
},
/** /**
* Converts <b>bytes</b> to a pretty printed data size string. * Converts <b>bytes</b> to a pretty printed data size string.
* *
@@ -618,7 +652,7 @@ const util = { //{{{
*/ */
stringToURLArray: function stringToURLArray(str) stringToURLArray: function stringToURLArray(str)
{ {
let urls = str.split(RegExp("\\s*" + options["urlseparator"] + "\\s*")); let urls = util.splitLiteral(str, RegExp("\\s*" + options["urlseparator"] + "\\s*"));
return urls.map(function (url) { return urls.map(function (url) {
try try
@@ -641,7 +675,7 @@ const util = { //{{{
// Ok, not a valid proto. If it looks like URL-ish (foo.com/bar), // Ok, not a valid proto. If it looks like URL-ish (foo.com/bar),
// let Gecko figure it out. // let Gecko figure it out.
if (/[.]/.test(url) && !/\s/.test(url) || /^[\w-.]+:\d+(?:\/|$)/.test(url)) if (/[.\/]/.test(url) && !/\s/.test(url) || /^[\w-.]+:\d+(?:\/|$)/.test(url))
return url; return url;
// TODO: it would be clearer if the appropriate call to // TODO: it would be clearer if the appropriate call to

View File

@@ -51,8 +51,6 @@ do
) )
done done
cd $stage (cd $stage; zip -r "$top/$jar" *)
zip -r "$top/$jar" *
cd -
rm -rf "$stage" rm -rf "$stage"

View File

@@ -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 for the specific language governing rights and limitations under the
License. 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 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 either the GNU General Public License Version 2 or later (the "GPL"), or
@@ -141,13 +141,17 @@ statusbarpanel {
} }
#liberator-commandline-prompt { #liberator-commandline-prompt {
background-color: inherit;
margin: 0px; margin: 0px;
padding: 0px; padding: 0px;
background-color: inherit;
} }
#liberator-commandline-command { #liberator-commandline-command {
background-color: inherit; background-color: inherit;
color: inherit; color: inherit;
margin: 0px;
}
#liberator-message {
margin: 0px;
} }
#sidebar { #sidebar {

View File

@@ -1,5 +1,5 @@
Main developer/Project founder: Main developer/Project founder:
* Martin Stubenschrott (stubenschrott@gmx.net) * Martin Stubenschrott (stubenschrott@vimperator.org)
Developers: Developers:
* Daniel Bainton (dpb .AT. driftaway .DOT. org) * Daniel Bainton (dpb .AT. driftaway .DOT. org)

View File

@@ -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 for the specific language governing rights and limitations under the
License. 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 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 either the GNU General Public License Version 2 or later (the "GPL"), or

View File

@@ -1,6 +1,6 @@
#### configuration #### configuration
VERSION = 0.5pre VERSION = 0.5
NAME = muttator NAME = muttator
include ../common/Makefile.common include ../common/Makefile.common

View File

@@ -1,7 +1,9 @@
2008-xx-xx: 2008-03-29
* version 0.5 * version 0.5
* fixes for recent TB nightly changes
* new "threads" option (non-functional for now) * new "threads" option (non-functional for now)
* new "archivefolder" option * new "archivefolder" option
* small bug fixes
2008-08-03: 2008-08-03:
* version 0.4 * version 0.4

View File

@@ -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 for the specific language governing rights and limitations under the
License. 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 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 either the GNU General Public License Version 2 or later (the "GPL"), or

View File

@@ -1 +0,0 @@
../../../common/content/liberator.xul

View 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: -->

View File

@@ -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 for the specific language governing rights and limitations under the
License. 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 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 either the GNU General Public License Version 2 or later (the "GPL"), or

View File

@@ -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 for the specific language governing rights and limitations under the
License. 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 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 either the GNU General Public License Version 2 or later (the "GPL"), or

View File

@@ -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 for the specific language governing rights and limitations under the
License. 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 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 either the GNU General Public License Version 2 or later (the "GPL"), or

View File

@@ -19,8 +19,8 @@
<em:targetApplication> <em:targetApplication>
<Description> <Description>
<em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id> <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
<em:minVersion>3.0b2pre</em:minVersion> <em:minVersion>3.0b3pre</em:minVersion>
<em:maxVersion>3.0b2</em:maxVersion> <em:maxVersion>3.0b3</em:maxVersion>
</Description> </Description>
</em:targetApplication> </em:targetApplication>

View File

@@ -2,7 +2,7 @@
[glossary] [glossary]
author=Martin Stubenschrott author=Martin Stubenschrott
email=stubenschrott@gmx.net email=stubenschrott@vimperator.org
# [header] # [header]
# <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" # <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

View File

@@ -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. [c]:help[c] to get this help window back.
|author| |donation| + |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 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: more, you can either send me greetings, patches or make a donation:

View File

@@ -1,5 +1,5 @@
Main developer/Project founder: Main developer/Project founder:
* Martin Stubenschrott (stubenschrott@gmx.net) * Martin Stubenschrott (stubenschrott@vimperator.org)
Developers: Developers:
* Doug Kearns (dougkearns@gmail.com) * Doug Kearns (dougkearns@gmail.com)
@@ -19,7 +19,7 @@ Inactive/former developers:
Patches (in no special order): Patches (in no special order):
* Ruud Grosmann ('followhints' option) * Ruud Grosmann ('followhints' option)
* Xie&Tian (multibyte support for hints) * Xie&Tian (multibyte support for hints, doc fixes)
* Juergen Descher * Juergen Descher
* Kazuo (count support for ctrl-^) * Kazuo (count support for ctrl-^)
* Daniel Schaffrath (;b support) * Daniel Schaffrath (;b support)
@@ -39,3 +39,4 @@ Patches (in no special order):
* Ryan Zheng (ctrl-x/a support) * Ryan Zheng (ctrl-x/a support)
* Dan Boger (:set online support) * Dan Boger (:set online support)
* Štěpán Němec (help copy-editing and favicon support) * Štěpán Němec (help copy-editing and favicon support)
* Jarkko Oranen ('maxitems' option)

View File

@@ -2,6 +2,13 @@ Continuous donations:
* Daniel Bainton (web hosting) * Daniel Bainton (web hosting)
2009: 2009:
* Christoph Petzold
* Bjoern Steinbrink
* Erlend Hamberg
* Fabien Benetou
* Arvin Moezzi
* Calogero Lo Leggio
* Sapan Bhatia
* Gavin Sinclair * Gavin Sinclair
* Stephen Borchert * Stephen Borchert
* Convolution * Convolution

View File

@@ -1,6 +1,6 @@
#### configuration #### configuration
VERSION = 2.0b4pre VERSION = 2.1a1pre
NAME = vimperator NAME = vimperator
include ../common/Makefile.common include ../common/Makefile.common

View File

@@ -1,12 +1,21 @@
2009-XX-XX: 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
* add 'maxitems' configuration variable
2009-03-28:
* version 2.0
* IMPORTANT: For compatibility with vim, guioptions=b has been renamed * IMPORTANT: For compatibility with vim, guioptions=b has been renamed
'B'. 'b' now represents the bottom scrollbar. 'B'. 'b' now represents the bottom scrollbar.
* IMPORTANT: :set now sets multiple options, as in Vim. Spaces in values * IMPORTANT: :set now sets multiple options, as in Vim. Spaces in values
must be quoted or escaped. must be quoted or escaped.
* IMPORTANT: Due to much improved autocompletion, changed default 'complete' option * IMPORTANT: Due to much improved autocompletion, changed default 'complete' option
value to 'sfl', listing intelligent Firefox location bar results. Removed possibility value to 'sfl', listing intelligent Firefox location bar results. Using 'b' or 'h'
to use 'h' in 'complete'. might cause problems/massive slowdowns, use with care!
* IMPORTANT: AlwaysHint mode with ;F mode changed the semantics slightly. * IMPORTANT: AlwaysHint mode with ;F mode changed the semantics slightly.
* IMPORTANT: command actions now take an args object, returned from * IMPORTANT: command actions now take an args object, returned from
commands.parseArgs, as their first argument. This will break any commands commands.parseArgs, as their first argument. This will break any commands
@@ -45,7 +54,7 @@
* add 'exrc' * add 'exrc'
* add 'errorbells' * add 'errorbells'
* add shell command completion for :! * 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 guioptions=nN to number tabs
* add :loadplugins command * add :loadplugins command
* add . mapping * add . mapping

View File

@@ -1,6 +1,9 @@
Priority list: Priority list:
1-9 as in Vim (9 = required for next release, 5 = would be nice, 1 = probably not) 1-9 as in Vim (9 = required for next release, 5 = would be nice, 1 = probably not)
ARCHITECTURE:
- modular help system
BUGS: BUGS:
- add window resize support to hints - add window resize support to hints
- searching backwards incrementally does not work i.e. with 'incsearch' set - searching backwards incrementally does not work i.e. with 'incsearch' set

View File

@@ -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 for the specific language governing rights and limitations under the
License. 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 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 either the GNU General Public License Version 2 or later (the "GPL"), or

View File

@@ -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 for the specific language governing rights and limitations under the
License. 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 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 either the GNU General Public License Version 2 or later (the "GPL"), or
@@ -49,7 +49,7 @@ const config = { //{{{
["DOMLoad", "Triggered when a page's DOM content has fully loaded"], ["DOMLoad", "Triggered when a page's DOM content has fully loaded"],
["DownloadPost", "Triggered when a download has completed"], ["DownloadPost", "Triggered when a download has completed"],
["Fullscreen", "Triggered when the browser's fullscreen state changes"], ["Fullscreen", "Triggered when the browser's fullscreen state changes"],
["LocationChange", "Triggered when changing tabs or when naviagtion to a new location"], ["LocationChange", "Triggered when changing tabs or when navigation to a new location"],
["PageLoadPre", "Triggered after a page load is initiated"], ["PageLoadPre", "Triggered after a page load is initiated"],
["PageLoad", "Triggered when a page gets (re)loaded/opened"], ["PageLoad", "Triggered when a page gets (re)loaded/opened"],
["ShellCmdPost", "Triggered after executing a shell command with :!cmd"], ["ShellCmdPost", "Triggered after executing a shell command with :!cmd"],
@@ -216,6 +216,14 @@ const config = { //{{{
"Open one or more URLs in a new tab, based on current location", "Open one or more URLs in a new tab, based on current location",
function () { commandline.open(":", "tabopen " + buffer.URL, modes.EX); }); 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], mappings.add([modes.NORMAL],
["<C-a>"], "Increment last number in URL", ["<C-a>"], "Increment last number in URL",
function (count) { incrementURL(count > 1 ? count : 1); }, function (count) { incrementURL(count > 1 ? count : 1); },

View File

@@ -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 for the specific language governing rights and limitations under the
License. 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 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 either the GNU General Public License Version 2 or later (the "GPL"), or

View File

@@ -20,7 +20,7 @@
<Description> <Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>3.0</em:minVersion> <em:minVersion>3.0</em:minVersion>
<em:maxVersion>3.2a1pre</em:maxVersion> <em:maxVersion>3.6a1pre</em:maxVersion>
</Description> </Description>
</em:targetApplication> </em:targetApplication>
</Description> </Description>

View File

@@ -2,7 +2,7 @@
[glossary] [glossary]
author=Martin Stubenschrott author=Martin Stubenschrott
email=stubenschrott@gmx.net email=stubenschrott@vimperator.org
[header] [header]
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>

View File

@@ -51,7 +51,7 @@ Each token is analyzed and in this order:
to set a custom name, you can change it with [c]:dialog searchengines[c]. to set a custom name, you can change it with [c]:dialog searchengines[c].
3. Opened with the default search engine or keyword (specified with the 3. Opened with the default search engine or keyword (specified with the
'defsearch' option) if the first word is no search engine ([c]:open linus 'defsearch' option) if the first word is no search engine ([c]:open linus
torvalds[c] opens a Google search for linux torvalds). torvalds[c] opens a Google search for linus torvalds).
4. Passed directly to Firefox in all other cases ([c]:open www.osnews.com, 4. Passed directly to Firefox in all other cases ([c]:open www.osnews.com,
www.slashdot.org[c] opens OSNews in the current, and Slashdot in a new www.slashdot.org[c] opens OSNews in the current, and Slashdot in a new
background tab). background tab).
@@ -102,11 +102,20 @@ ________________________________________________________________________________
|:winopen| |:wopen| |:winedit| |:winopen| |:wopen| |:winedit|
||:wino[pen][!] [a][arg1][a], [a][arg2][a], ...|| + ||: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. 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| + |<MiddleMouse>| |p| +
||p|| ||p||
________________________________________________________________________________ ________________________________________________________________________________
@@ -160,7 +169,7 @@ ________________________________________________________________________________
section:Navigating[navigating] section:Navigating[navigating]
|H| |<C-o>| |CTRL-O| |:ba| |:back| |H| |<C-o>| |CTRL-O| |:ba| |:back|
||:[count]ba[ck] [url]|| + ||:[count]ba[ck] [a][url][a]|| +
||:ba[ck]!|| + ||:ba[ck]!|| +
||CTRL-o|| ||CTRL-o||
________________________________________________________________________________ ________________________________________________________________________________
@@ -171,7 +180,7 @@ ________________________________________________________________________________
|L| |<C-i>| |CTRL-i| |:fo| |:fw| |:forward| |L| |<C-i>| |CTRL-i| |:fo| |:fw| |:forward|
||:[count]fo[rward] [url]|| + ||:[count]fo[rward] [a][url][a]|| +
||:fo[rward]!|| + ||:fo[rward]!|| +
||CTRL-i|| ||CTRL-i||
________________________________________________________________________________ ________________________________________________________________________________

View File

@@ -123,6 +123,16 @@ set).
________________________________________________________________________________ ________________________________________________________________________________
|<Right>| |l| +
||[count]l||
________________________________________________________________________________
Scroll document to the right. If [count] is specified then move [count] times
as much to the right. +
If the document cannot scroll more, a beep is emitted (unless 'visualbell' is
set).
________________________________________________________________________________
|<C-d>| + |<C-d>| +
||[count]<C-d>|| ||[count]<C-d>||
________________________________________________________________________________ ________________________________________________________________________________
@@ -141,16 +151,6 @@ first set to this value.
________________________________________________________________________________ ________________________________________________________________________________
|<Right>| |l| +
||[count]l||
________________________________________________________________________________
Scroll document to the right. If [count] is specified then move [count] times
as much to the right. +
If the document cannot scroll more, a beep is emitted (unless 'visualbell' is
set).
________________________________________________________________________________
|<S-Space>| |<PageUp>| |<C-b>| + |<S-Space>| |<PageUp>| |<C-b>| +
||[count]<C-b>|| ||[count]<C-b>||
________________________________________________________________________________ ________________________________________________________________________________
@@ -235,7 +235,7 @@ default zoom levels are 30%, 50%, 67%, 80%, 90%, 100%, 110%, 120%, 133%, 150%,
The available zoom range can be changed by setting the The available zoom range can be changed by setting the
\'http://kb.mozillazine.org/Zoom.minPercent[zoom.minPercent]' and \'http://kb.mozillazine.org/Zoom.minPercent[zoom.minPercent]' and
\'http://kb.mozillazine.org/Zoom.minPercent[zoom.maxPercent]' Firefox \'http://kb.mozillazine.org/Zoom.maxPercent[zoom.maxPercent]' Firefox
preferences. The zoom levels can be changed using the preferences. The zoom levels can be changed using the
\'http://kb.mozillazine.org/Toolkit.zoomManager.zoomValues[toolkit.ZoomManager.zoomLevels]' \'http://kb.mozillazine.org/Toolkit.zoomManager.zoomValues[toolkit.ZoomManager.zoomLevels]'
preference. preference.
@@ -274,7 +274,7 @@ ________________________________________________________________________________
|zz| + |zz| +
||[count]zz|| ||[count]zz||
________________________________________________________________________________ ________________________________________________________________________________
Set text zoom value of current web page. Zoom value can be between 30 and 300%. Set text zoom value of current web page. Zoom value can be between 30% and 300%.
If it is omitted, text zoom is reset to 100%. If it is omitted, text zoom is reset to 100%.
________________________________________________________________________________ ________________________________________________________________________________
@@ -320,7 +320,7 @@ ________________________________________________________________________________
||:zo[om][!] +{value} | -{value}|| + ||:zo[om][!] +{value} | -{value}|| +
________________________________________________________________________________ ________________________________________________________________________________
Set zoom value of current web page. [a][value][a] can be an absolute value Set zoom value of current web page. [a][value][a] can be an absolute value
between 30 and 300% or a relative value if prefixed with "-" or "+". If between 30% and 300% or a relative value if prefixed with "-" or "+". If
[a][value][a] is omitted, zoom is reset to 100%. [a][value][a] is omitted, zoom is reset to 100%.
Normally this command operates on the text zoom, if used with [!] it operates Normally this command operates on the text zoom, if used with [!] it operates

View File

@@ -70,7 +70,7 @@ ________________________________________________________________________________
________________________________________________________________________________ ________________________________________________________________________________
Sets or lists a variable. Sets the variable {var-name} to the value of the Sets or lists a variable. Sets the variable {var-name} to the value of the
expression {expr1}. If no expression is given, the value of the variable is expression {expr1}. If no expression is given, the value of the variable is
displayed.Without arguments, displays a list of all variables. displayed. Without arguments, displays a list of all variables.
________________________________________________________________________________ ________________________________________________________________________________

View File

@@ -20,7 +20,7 @@ ________________________________________________________________________________
|:addo| |:addons| + |:addo| |:addons| +
||:addo[ns]|| ||:addo[ns]||
________________________________________________________________________________ ________________________________________________________________________________
Show available Browser Extensions and Themes. Show available browser Extensions and Themes.
You can add/remove/disable browser extensions from this dialog. You can add/remove/disable browser extensions from this dialog.
Be aware that not all Firefox extensions work, because Vimperator overrides Be aware that not all Firefox extensions work, because Vimperator overrides
some key bindings and changes Firefox's GUI. some key bindings and changes Firefox's GUI.
@@ -34,7 +34,7 @@ Open a Firefox dialog.
Available dialogs: Available dialogs:
`------------------`----------------------------------- `------------------`-----------------------------------
*about* About Firefox *about* About Mozilla Firefox
*addbookmark* Add bookmark for the current page *addbookmark* Add bookmark for the current page
*addons* Manage Add-ons *addons* Manage Add-ons
*bookmarks* List your bookmarks *bookmarks* List your bookmarks

View File

@@ -50,6 +50,7 @@ section:Normal{nbsp}mode[normal-index]
||[m]R[m]|| Reload while skipping the cache + ||[m]R[m]|| Reload while skipping the cache +
||[m]T[m]|| Open one or more URLs in a new tab, based on current location + ||[m]T[m]|| Open one or more URLs in a new tab, based on current location +
||[m]Y[m]|| Copy selected text or current word + ||[m]Y[m]|| Copy selected text or current word +
||[m]W[m]|| Open one or more URLs in a new window, based on current location +
||[m]a[m]|| Open a prompt to bookmark the current URL + ||[m]a[m]|| Open a prompt to bookmark the current URL +
||[m]b[m]|| Open a prompt to switch buffers + ||[m]b[m]|| Open a prompt to switch buffers +
@@ -69,6 +70,7 @@ section:Normal{nbsp}mode[normal-index]
||[m]t[m]|| Open one or more URLs in a new tab + ||[m]t[m]|| Open one or more URLs in a new tab +
||[m]u[m]|| Undo closing of a tab + ||[m]u[m]|| Undo closing of a tab +
||[m]y[m]|| Yank current location to the clipboard + ||[m]y[m]|| Yank current location to the clipboard +
||[m]w[m]|| Open one or more URLs in a new window +
||[m];[m]|| Start an extended hint mode + ||[m];[m]|| Start an extended hint mode +
@@ -170,7 +172,7 @@ section:Ex{nbsp}commands[ex-cmd-index,:index]
||[c]:delmarks[c]|| Delete the specified marks + ||[c]:delmarks[c]|| Delete the specified marks +
||[c]:delqmarks[c]|| Delete the specified QuickMarks + ||[c]:delqmarks[c]|| Delete the specified QuickMarks +
||[c]:delstyle[c]|| Delete any matching styles + ||[c]:delstyle[c]|| Delete any matching styles +
||[c]:dialog[c]|| Open a undefined dialog + ||[c]:dialog[c]|| Open a Firefox dialog +
||[c]:doautoall[c]|| Apply the autocommands matching the specified URL to all buffers + ||[c]:doautoall[c]|| Apply the autocommands matching the specified URL to all buffers +
||[c]:doautocmd[c]|| Apply the autocommands matching the specified URL to the current buffer + ||[c]:doautocmd[c]|| Apply the autocommands matching the specified URL to the current buffer +
||[c]:downloads[c]|| Show progress of current downloads + ||[c]:downloads[c]|| Show progress of current downloads +
@@ -203,6 +205,7 @@ section:Ex{nbsp}commands[ex-cmd-index,:index]
||[c]:mark[c]|| Mark current location within the web page + ||[c]:mark[c]|| Mark current location within the web page +
||[c]:marks[c]|| Show all location marks of current web page + ||[c]:marks[c]|| Show all location marks of current web page +
||[c]:messages[c]|| Display previously given messages + ||[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]:mkvimperatorrc[c]|| Write current key mappings and changed options to the config file +
||[c]:nohlsearch[c]|| Remove the search highlighting + ||[c]:nohlsearch[c]|| Remove the search highlighting +
||[c]:noremap[c]|| Map a key sequence without remapping keys + ||[c]:noremap[c]|| Map a key sequence without remapping keys +
@@ -217,11 +220,11 @@ section:Ex{nbsp}commands[ex-cmd-index,:index]
||[c]:qmark[c]|| Mark a URL with a letter for quick access + ||[c]:qmark[c]|| Mark a URL with a letter for quick access +
||[c]:qmarks[c]|| Show all QuickMarks + ||[c]:qmarks[c]|| Show all QuickMarks +
||[c]:quit[c]|| Quit current tab + ||[c]:quit[c]|| Quit current tab +
||[c]:quitall[c]|| Quit undefined + ||[c]:quitall[c]|| Quit Vimperator +
||[c]:redraw[c]|| Redraw the screen + ||[c]:redraw[c]|| Redraw the screen +
||[c]:reload[c]|| Reload current page + ||[c]:reload[c]|| Reload current page +
||[c]:reloadall[c]|| Reload all tab pages + ||[c]:reloadall[c]|| Reload all tab pages +
||[c]:restart[c]|| Force undefined to restart + ||[c]:restart[c]|| Force the browser to restart +
||[c]:runtime[c]|| Source the specified file from each directory in 'runtimepath' + ||[c]:runtime[c]|| Source the specified file from each directory in 'runtimepath' +
||[c]:saveas[c]|| Save current document to disk + ||[c]:saveas[c]|| Save current document to disk +
||[c]:sbclose[c]|| Close the sidebar window + ||[c]:sbclose[c]|| Close the sidebar window +
@@ -261,7 +264,7 @@ section:Options[option-index]
||'activate'|| Define when tabs are automatically activated + ||'activate'|| Define when tabs are automatically activated +
||'cdpath'|| List of directories searched when executing [c]:cd[c] + ||'cdpath'|| List of directories searched when executing [c]:cd[c] +
||'complete'|| Items which are completed at the [c]:[tab]open prompt[c] + ||'complete'|| Items which are completed at the [c]:[tab]open[c] prompt +
||'defsearch'|| Set the default search engine + ||'defsearch'|| Set the default search engine +
||'editor'|| Set the external text editor + ||'editor'|| Set the external text editor +
||'errorbells'|| Ring the bell when an error message is displayed + ||'errorbells'|| Ring the bell when an error message is displayed +
@@ -284,6 +287,7 @@ section:Options[option-index]
||'laststatus'|| Show the status line + ||'laststatus'|| Show the status line +
||'linksearch'|| Limit the search to hyperlink text + ||'linksearch'|| Limit the search to hyperlink text +
||'loadplugins'|| Load plugin scripts when starting up + ||'loadplugins'|| Load plugin scripts when starting up +
||'maxitems'|| Maximum number of items to display at once in a listing +
||'messages'|| Number of messages to store in the message history + ||'messages'|| Number of messages to store in the message history +
||'more'|| Pause the message list window when more than one screen of listings is displayed + ||'more'|| Pause the message list window when more than one screen of listings is displayed +
||'newtab'|| Define which commands should output in a new tab by default + ||'newtab'|| Define which commands should output in a new tab by default +

View File

@@ -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. [c]:help[c] to get this help window back.
|author| |donation| + |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 Stubenschrott] but has found many other
http://vimperator.org/trac/wiki/Vimperator/Authors[contributors] in the http://vimperator.org/trac/wiki/Vimperator/Authors[contributors] in the
meanwhile. If you appreciate the work on Vimperator and want to encourage us meanwhile. If you appreciate the work on Vimperator and want to encourage us

View File

@@ -346,7 +346,7 @@ Custom completion
Custom completion can be provided by specifying the "custom,{func}" argument to Custom completion can be provided by specifying the "custom,{func}" argument to
-complete. The {func} is called with two arguments, a completion context, and -complete. The {func} is called with two arguments, a completion context, and
an object describing the command's arguments. It should set the context's an object describing the command's arguments. It should set the context's
\'completions' property, or return an object, with \'start' and \'items' \'completions' property, or return an object, with \'items' and \'start'
properties, describing the completions and where the replacement is to start. properties, describing the completions and where the replacement is to start.
*start* is the index into the word being completed at which the returned values *start* is the index into the word being completed at which the returned values

View File

@@ -80,7 +80,7 @@ section:History[history]
||[count]<C-o>|| ||[count]<C-o>||
________________________________________________________________________________ ________________________________________________________________________________
Go to an older position in the jump list. The jump list is just the browser Go to an older position in the jump list. The jump list is just the browser
history for now. history for now. If [count] is specified go back [count] pages.
________________________________________________________________________________ ________________________________________________________________________________
@@ -88,7 +88,7 @@ ________________________________________________________________________________
||[count]<C-i>|| ||[count]<C-i>||
________________________________________________________________________________ ________________________________________________________________________________
Go to a newer position in the jump list. The jump list is just the browser Go to a newer position in the jump list. The jump list is just the browser
history for now. history for now. If [count] is specified go forward [count] pages.
________________________________________________________________________________ ________________________________________________________________________________

View File

@@ -12,6 +12,13 @@ Display previously given messages.
________________________________________________________________________________ ________________________________________________________________________________
|:messc| |:messclear| +
||:messc[lear]||
________________________________________________________________________________
Clear the message history.
________________________________________________________________________________
|g<| + |g<| +
||g<|| ||g<||
________________________________________________________________________________ ________________________________________________________________________________

View File

@@ -252,7 +252,7 @@ Sets the default search engine. The default search engine name is used in the
[c]:[tab]open [arg][c] command if [a][arg][a] neither looks like a URL or like [c]:[tab]open [arg][c] command if [a][arg][a] neither looks like a URL or like
a specified search engine/keyword. a specified search engine/keyword.
This means, it you set 'defsearch' to "youtube", then [c]:open arnold This means, if you set 'defsearch' to "youtube", then [c]:open arnold
schwarzenegger[c] will be exactly the same as [c]:open youtube arnold schwarzenegger[c] will be exactly the same as [c]:open youtube arnold
schwarzenegger[c]. Therefore, you need to add a keyword or search engine schwarzenegger[c]. Therefore, you need to add a keyword or search engine
"youtube" first. "youtube" first.
@@ -472,7 +472,7 @@ ____
|\'nolpl'| |\'lpl'| |\'noloadplugins'| |\'loadplugins'| |\'nolpl'| |\'lpl'| |\'noloadplugins'| |\'loadplugins'|
||'loadplugins' 'lpl'|| boolean (default on) ||'loadplugins' 'lpl'|| boolean (default: on)
____ ____
Load plugin scripts when starting up. When on, yet unloaded plugins are Load plugin scripts when starting up. When on, yet unloaded plugins are
automatically loaded after the vimperatorrc file has been sourced. To automatically loaded after the vimperatorrc file has been sourced. To
@@ -481,6 +481,13 @@ vimperatorrc.
____ ____
|\'maxitems'|
||'maxitems'|| number (default: 20)
____
Maximum number of items to display at once in a listing.
____
|\'msgs'| |\'messages'| |\'msgs'| |\'messages'|
||'messages' 'msgs'|| number (default: 100) ||'messages' 'msgs'|| number (default: 100)
____ ____
@@ -527,7 +534,7 @@ ____
|\'noonline'| |\'online'| |\'noonline'| |\'online'|
||'online'|| boolean (default on) ||'online'|| boolean (default: on)
____ ____
Show and set the \'work offline' behavior. Show and set the \'work offline' behavior.
____ ____
@@ -571,7 +578,7 @@ ____
|\'nopreload'| |\'preload'| |\'nopreload'| |\'preload'|
||'preload' 'nopreload'|| boolean (default: on) ||'preload' 'nopreload'|| boolean (default: on)
____ ____
Speed up first time history/bookmark completion Speed up first time history/bookmark completion.
History access can be quite slow for a large history. History access can be quite slow for a large history.
Vimperator maintains a cache to speed it up significantly on subsequent access. Vimperator maintains a cache to speed it up significantly on subsequent access.
@@ -751,7 +758,7 @@ ____
|\'wildcase'| |\'wic'| |\'wildcase'| |\'wic'|
||'wildcase' 'wic'|| string (default: "smart") ||'wildcase' 'wic'|| string (default: "smart")
____ ____
Defines how completions are matched with regard to character case. Defines how completions are matched with regard to character case. Possible values:
`---------------`------------------------ `---------------`------------------------
"smart" Case is significant when capital letters are typed "smart" Case is significant when capital letters are typed

View File

@@ -132,7 +132,7 @@ section:Profiling[profile,profiling]
|:time| |:time|
||:[count]time[!] {code|:command}|| + ||:[count]time[!] {code|:command}|| +
________________________________________________________________________________ ________________________________________________________________________________
Profile a piece of code or a command. Run {code} [count] times (default 1) Profile a piece of code or a command. Run {code} [count] times (default: 1)
and returns the elapsed time. {code} is always passed to JavaScript's eval(), and returns the elapsed time. {code} is always passed to JavaScript's eval(),
which might be slow, so take the results with a grain of salt. which might be slow, so take the results with a grain of salt.

View File

@@ -15,17 +15,17 @@ further locations are tried.
_$VIMPERATOR_INIT_ -- May contain a single Ex command (e.g., _$VIMPERATOR_INIT_ -- May contain a single Ex command (e.g.,
"[c]:source {file}[c]"). "[c]:source {file}[c]").
b. [a]\~/_vimperatorrc[a] -- Windows only. If this file exists, its contents 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. 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. 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" 3. All directories in 'runtimepath' are searched for a "plugin"
subdirectory and all yet unloaded plugins are loaded. For each plugin subdirectory and all yet unloaded plugins are loaded. For each
directory, all *.\{js,vimp} files (including those in further plugin directory, all *.\{js,vimp} files (including those in further
subdirectories) are sourced alphabetically. No plugins will be sourced subdirectories) are sourced alphabetically. No plugins will be sourced
if 'noloadplugins' is set. Any particular plugin will not be loaded if if 'noloadplugins' is set. Any particular plugin will not be loaded
it has already been loaded (e.g., by an earlier [c]:loadplugins[c] if it has already been loaded (e.g., by an earlier [c]:loadplugins[c]
command). command).
The user's ~ (i.e., "home") directory is determined as follows: The user's ~ (i.e., "home") directory is determined as follows:

View File

@@ -73,6 +73,7 @@ Valid groups are:
*StatusLine* The status bar *StatusLine* The status bar
*StatusLineBroken* The status bar for a broken web page *StatusLineBroken* The status bar for a broken web page
*StatusLineSecure* The status bar for a secure web page *StatusLineSecure* The status bar for a secure web page
*StatusLineExtended* The status bar for a secure web page with an Extended Validation(EV) certificate
*String* A JavaScript String object *String* A JavaScript String object
*TabClose* The close button of a browser tab *TabClose* The close button of a browser tab
*TabIcon* The icon of a browser tab *TabIcon* The icon of a browser tab

View File

@@ -57,7 +57,7 @@ Similarly, help on configurable options is available with [c]:help
'{option_name}'[c]. (Note the single quotes around the option name as in Vim.) '{option_name}'[c]. (Note the single quotes around the option name as in Vim.)
Information on all available options is, predictably, [c]:help options[c]. Information on all available options is, predictably, [c]:help options[c].
and you can find out about the [m]gt[m] and [m]gT[m] mapping with And you can find out about the [m]gt[m] and [m]gT[m] mapping with
\{nbsp}[c]:help gt<CR>[c] + \{nbsp}[c]:help gt<CR>[c] +
\{nbsp}[c]:help gT<CR>[c] \{nbsp}[c]:help gT<CR>[c]

View File

@@ -11,9 +11,9 @@ ________________________________________________________________________________
|<C-l>| |CTRL-L| |:redr| |:redraw| + |<C-l>| |CTRL-L| |:redr| |:redraw| +
||:redr[aw]|| ||:redr[aw]||
____ ________________________________________________________________________________
Redraws the screen. Useful to update the screen halfway executing a script or function. Redraws the screen. Useful to update the screen halfway executing a script or function.
____ ________________________________________________________________________________
|:norm| |:normal| |:norm| |:normal|
||:norm[al][!] {commands}|| + ||:norm[al][!] {commands}|| +
@@ -54,7 +54,7 @@ ________________________________________________________________________________
Open help window. The default page, as specified by 'helpfile' is shown unless Open help window. The default page, as specified by 'helpfile' is shown unless
[a][subject][a] is specified. If you need help for a specific topic, try [a][subject][a] is specified. If you need help for a specific topic, try
[c]:help overview[c]. [c]:help overview[c].
____________________________________________________________________________ ________________________________________________________________________________
|:exu| |:exusage| + |:exu| |:exusage| +

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

View File

@@ -2,5 +2,5 @@ Main developer/Project founder:
* Prathyush Thota <prathyushthota@gmail.com> * Prathyush Thota <prathyushthota@gmail.com>
Developers: Developers:
* Martin Stubenschrott (stubenschrott@gmx.net) * Martin Stubenschrott (stubenschrott@vimperator.org)
* Doug Kearns (dougkearns@gmail.com) * Doug Kearns (dougkearns@gmail.com)

2
xulmus/Makefile Executable file → Normal file
View File

@@ -1,6 +1,6 @@
#### configuration #### configuration
VERSION = 0.1pre VERSION = 0.2pre
NAME = xulmus NAME = xulmus
include ../common/Makefile.common include ../common/Makefile.common

5
xulmus/NEWS Executable file → Normal file
View File

@@ -1,2 +1,3 @@
2009-XX-XX: 2009-03-28:
* version 0.1 (probably) * version 0.1
* first public release

View File

@@ -2,5 +2,20 @@ Priority list:
1-9 as in Vim (9 = required for next release, 5 = would be nice, 1 = probably not) 1-9 as in Vim (9 = required for next release, 5 = would be nice, 1 = probably not)
BUGS: BUGS:
- broken commands:
- SB doesn't support tab-undo yet so :undo and "u" etc don't work
- :tabduplicate
- :back/H, :forward,L
- :open songbird-internal-search searchString
Is this workable anyway? --djk
- <C-^> is off by one when alternating with the media tab
- numbered tabs
FEATURES: FEATURES:
9 '?' - Reusing '/'.
8 Playlist/SmartPlaylist operations & meta-data operations.
7 extended hint mode for opening links in FF.
6 :tqueue, :lqueue etc.
5 make Player mode commands work in the Mini-Player.
5 Check for default extensions and add commands for them. Ex. Last.fm, Seeqpod e.t.c
Wouldn't these be provided as Xulmus plugins like Vimperator does? --djk

0
xulmus/chrome.manifest Executable file → Normal file
View File

0
xulmus/components/chrome-data.js Executable file → Normal file
View File

143
xulmus/content/bookmarks.js Executable file → Normal file
View File

@@ -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 for the specific language governing rights and limitations under the
License. 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 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 either the GNU General Public License Version 2 or later (the "GPL"), or
@@ -57,7 +57,7 @@ function Bookmarks() //{{{
/////////////////////////////////////////////////////////////////////////////{{{ /////////////////////////////////////////////////////////////////////////////{{{
const historyService = PlacesUtils.history; //Cc["@mozilla.org/browser/global-history;1"].getService(Ci.nsIGlobalHistory); const historyService = PlacesUtils.history; //Cc["@mozilla.org/browser/global-history;1"].getService(Ci.nsIGlobalHistory);
const bookmarksService = PlacesUtils.bookmarks //Cc["@songbirdnest.com/servicepane/bookmarks;1"].getService(Ci.sbIBookmarks); const bookmarksService = PlacesUtils.bookmarks //Cc["@songbirdnest.com/servicepane/bookmarks;1"].getService(Ci.sbIBookmarks);
const taggingService = PlacesUtils.tagging //Cc["@mozilla.org/browser/tagging-service;1"].getService(Ci.nsITaggingService); const taggingService = PlacesUtils.tagging //Cc["@mozilla.org/browser/tagging-service;1"].getService(Ci.nsITaggingService);
const faviconService = Cc["@mozilla.org/browser/favicon-service;1"].getService(Ci.nsIFaviconService); const faviconService = Cc["@mozilla.org/browser/favicon-service;1"].getService(Ci.nsIFaviconService);
@@ -571,14 +571,14 @@ function Bookmarks() //{{{
getSuggestions: function getSuggestions(engineName, query, callback) getSuggestions: function getSuggestions(engineName, query, callback)
{ {
const responseType = "application/x-suggestions+json"; const responseType = "application/x-suggestions+json";
let engine = services.get("browserSearch").getEngineByAlias(engineName); let engine = services.get("browserSearch").getEngineByAlias(engineName);
if (engine && engine.supportsResponseType(responseType)) if (engine && engine.supportsResponseType(responseType))
var queryURI = engine.getSubmission(query, responseType).uri.spec; var queryURI = engine.getSubmission(query, responseType).uri.spec;
if (!queryURI) if (!queryURI)
return []; return [];
function process(resp) function process(resp)
{ {
let results = []; let results = [];
@@ -594,7 +594,7 @@ function Bookmarks() //{{{
} }
let resp = util.httpGet(queryURI, callback && process); let resp = util.httpGet(queryURI, callback && process);
if (!callback) if (!callback)
return process(resp); return process(resp);
}, },
@@ -620,76 +620,77 @@ function Bookmarks() //{{{
// we need to make sure our custom alias have been set, even if the user // we need to make sure our custom alias have been set, even if the user
// did not :open <tab> once before // did not :open <tab> once before
this.getSearchEngines(); this.getSearchEngines();
function getShortcutOrURI(aURL, aPostDataRef) function getShortcutOrURI(aURL, aPostDataRef)
{ {
var shortcutURL = null; var shortcutURL = null;
var keyword = aURL; var keyword = aURL;
var param = ""; var param = "";
var searchService = Cc['@mozilla.org/browser/search-service;1'].getService(Ci.nsIBrowserSearchService); var searchService = Cc['@mozilla.org/browser/search-service;1'].getService(Ci.nsIBrowserSearchService);
var offset = aURL.indexOf(" "); var offset = aURL.indexOf(" ");
if (offset > 0) if (offset > 0)
{ {
keyword = aURL.substr(0, offset); keyword = aURL.substr(0, offset);
param = aURL.substr(offset + 1); param = aURL.substr(offset + 1);
}
if (!aPostDataRef)
{
aPostDataRef = {};
} }
var engine = searchService.getEngineByAlias(keyword); if (!aPostDataRef)
if (engine) {
{ aPostDataRef = {};
var submission = engine.getSubmission(param, null);
aPostDataRef.value = submission.postData;
return submission.uri.spec;
}
[shortcutURL, aPostDataRef.value] = PlacesUtils.getURLAndPostDataForKeyword(keyword);
if (!shortcutURL)
{
return aURL;
}
var postData = "";
if (aPostDataRef.value)
{
postData = unescape(aPostDataRef.value);
}
if (/%s/i.test(shortcutURL) || /%s/i.test(postData))
{
var charset = "";
const re = /^(.*)\&mozcharset=([a-zA-Z][_\-a-zA-Z0-9]+)\s*$/;
var matches = shortcutURL.match(re);
if (matches)
{
[, shortcutURL, charset] = matches;
}
else
{
try
{
charset = PlacesUtils.history.getCharsetForURI(makeURI(shortcutURL));
} catch (e) { }
}
var encodedParam = "";
if (charset)
{
encodedParam = escape(convertFromUnicode(charset, param));
} else {
encodedParam = encodeURIComponent(param);
}
shortcutURL = shortcutURL.replace(/%s/g, encodedParam).replace(/%S/g, param);
if (/%s/i.test(postData))
{
aPostDataRef.value = getPostDataStream(postData, param, encodedParam, "application/x-www-form-urlencoded");
}
} else if (param) {
aPostDataRef.value = null;
return aURL;
} }
return shortcutURL; var engine = searchService.getEngineByAlias(keyword);
if (engine)
{
var submission = engine.getSubmission(param, null);
aPostDataRef.value = submission.postData;
return submission.uri.spec;
}
[shortcutURL, aPostDataRef.value] = PlacesUtils.getURLAndPostDataForKeyword(keyword);
if (!shortcutURL)
{
return aURL;
}
var postData = "";
if (aPostDataRef.value)
{
postData = unescape(aPostDataRef.value);
}
if (/%s/i.test(shortcutURL) || /%s/i.test(postData))
{
var charset = "";
const re = /^(.*)\&mozcharset=([a-zA-Z][_\-a-zA-Z0-9]+)\s*$/;
var matches = shortcutURL.match(re);
if (matches)
{
[, shortcutURL, charset] = matches;
}
else
{
try
{
charset = PlacesUtils.history.getCharsetForURI(makeURI(shortcutURL));
} catch (e) { }
}
var encodedParam = "";
if (charset)
{
encodedParam = escape(convertFromUnicode(charset, param));
} else {
encodedParam = encodeURIComponent(param);
}
shortcutURL = shortcutURL.replace(/%s/g, encodedParam).replace(/%S/g, param);
if (/%s/i.test(postData))
{
aPostDataRef.value = getPostDataStream(postData, param, encodedParam, "application/x-www-form-urlencoded");
}
} else if (param) {
aPostDataRef.value = null;
return aURL;
}
return shortcutURL;
} }
url = getShortcutOrURI(searchString, aPostDataRef); url = getShortcutOrURI(searchString, aPostDataRef);
if (url == searchString) if (url == searchString)
url = null; url = null;

172
xulmus/content/config.js Executable file → Normal file
View File

@@ -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 for the specific language governing rights and limitations under the
License. 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 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 either the GNU General Public License Version 2 or later (the "GPL"), or
@@ -33,12 +33,12 @@ const config = { //{{{
//mainWindowID: "mainplayer", //mainWindowID: "mainplayer",
/*** optional options, there are checked for existence and a fallback provided ***/ /*** optional options, there are checked for existence and a fallback provided ***/
features: ["bookmarks", "hints", "marks", "history", "quickmarks", "session", "tabs", "windows", "player"], features: ["bookmarks", "hints", "marks", "history", "quickmarks", "session", "tabs", "windows", "player"],
defaults: { guioptions: "rb" }, defaults: { guioptions: "mprb" },
guioptions: { guioptions: {
m: ["Menubar", ["main-menubar"]], m: ["Menubar", ["main-menubar"]],
T: ["Toolbar", ["nav-bar"]], T: ["Toolbar", ["nav-bar"]],
B: ["Bookmark bar", ["PersonalToolbar"]] p: ["Player controls", ["player_wrapper"]]
}, },
//get visualbellWindow() getBrowser().mPanelContainer, //get visualbellWindow() getBrowser().mPanelContainer,
@@ -54,53 +54,74 @@ const config = { //{{{
["DOMLoad", "Triggered when a page's DOM content has fully loaded"], ["DOMLoad", "Triggered when a page's DOM content has fully loaded"],
["DownloadPost", "Triggered when a download has completed"], ["DownloadPost", "Triggered when a download has completed"],
["Fullscreen", "Triggered when the browser's fullscreen state changes"], ["Fullscreen", "Triggered when the browser's fullscreen state changes"],
["LocationChange", "Triggered when changing tabs or when naviagtion to a new location"], ["LocationChange", "Triggered when changing tabs or when navigation to a new location"],
["PageLoadPre", "Triggered after a page load is initiated"], ["PageLoadPre", "Triggered after a page load is initiated"],
["PageLoad", "Triggered when a page gets (re)loaded/opened"], ["PageLoad", "Triggered when a page gets (re)loaded/opened"],
["ShellCmdPost", "Triggered after executing a shell command with :!cmd"], ["ShellCmdPost", "Triggered after executing a shell command with :!cmd"],
["XulmusEnter", "Triggered after Xulmus starts"], ["TrackChangePre", "Triggered before a playing track is changed"],
["XulmusLeavePre", "Triggered before exiting Xulmus, just before destroying each module"], ["TrackChange", "Triggered after a playing track has changed"],
["XulmusLeave", "Triggered before exiting Xulmus"]], ["ViewChangePre", "Triggered before a sequencer view is changed"],
["ViewChange", "Triggered after a sequencer view is changed"],
["StreamStart", "Triggered after a stream has started"],
["StreamPause", "Triggered after a stream has paused"],
["StreamEnd", "Triggered after a stream has ended"],
["StreamStop", "Triggered after a stream has stopped"],
["XulmusEnter", "Triggered after Songbird starts"],
["XulmusLeavePre", "Triggered before exiting Songbird, just before destroying each module"],
["XulmusLeave", "Triggered before exiting Songbird"]],
// TODO: remove those which don't make sense, can't be provided.
dialogs: [ dialogs: [
["about", "About Songbird", ["about", "About Songbird",
function () { window.openDialog("chrome://browser/content/aboutDialog.xul", "_blank", "chrome,dialog,modal,centerscreen"); }], function () { window.openDialog("chrome://songbird/content/xul/about.xul", "_blank", "chrome,dialog,modal,centerscreen"); }],
/*
["addbookmark", "Add bookmark for the current page", ["addbookmark", "Add bookmark for the current page",
function () { PlacesCommandHook.bookmarkCurrentPage(true, PlacesUtils.bookmarksRootId); }], function () { PlacesCommandHook.bookmarkCurrentPage(true, PlacesUtils.bookmarksRootId); }],
*/
["addons", "Manage Add-ons", ["addons", "Manage Add-ons",
function () { window.BrowserOpenAddonsMgr(); }], function () { SBOpenPreferences("paneAddons"); }],
/*
["bookmarks", "List your bookmarks", ["bookmarks", "List your bookmarks",
function () { window.openDialog("chrome://browser/content/bookmarks/bookmarksPanel.xul", "Bookmarks", "dialog,centerscreen,width=600,height=600"); }], function () { window.openDialog("chrome://browser/content/bookmarks/bookmarksPanel.xul", "Bookmarks", "dialog,centerscreen,width=600,height=600"); }],
*/
["checkupdates", "Check for updates", ["checkupdates", "Check for updates",
function () { window.checkForUpdates(); }], function () { window.checkForUpdates(); }],
["cleardata", "Clear private data", ["cleardata", "Clear private data",
function () { Cc[GLUE_CID].getService(Ci.nsIBrowserGlue).sanitize(window || null); }], function () { Sanitizer.showUI(); }],
["cookies", "List your cookies", ["cookies", "List your cookies",
function () { window.toOpenWindowByType("Browser:Cookies", "chrome://browser/content/preferences/cookies.xul", "chrome,dialog=no,resizable"); }], function () { window.toOpenWindowByType("Browser:Cookies", "chrome://browser/content/preferences/cookies.xul", "chrome,dialog=no,resizable"); }],
["console", "JavaScript console", ["console", "JavaScript console",
function () { window.toJavaScriptConsole(); }], function () { window.toJavaScriptConsole(); }],
/*
["customizetoolbar", "Customize the Toolbar", ["customizetoolbar", "Customize the Toolbar",
function () { window.BrowserCustomizeToolbar(); }], function () { window.BrowserCustomizeToolbar(); }],
*/
["dominspector", "DOM Inspector", ["dominspector", "DOM Inspector",
function () { try { window.inspectDOMDocument(content.document); } catch (e) { liberator.echoerr("DOM Inspector extension not installed"); } }], function () { try { window.inspectDOMDocument(content.document); } catch (e) { liberator.echoerr("DOM Inspector extension not installed"); } }],
["downloads", "Manage Downloads", ["downloads", "Manage Downloads",
function () { window.toOpenWindowByType("Download:Manager", "chrome://mozapps/content/downloads/downloads.xul", "chrome,dialog=no,resizable"); }], function () { window.toOpenWindowByType("Download:Manager", "chrome://mozapps/content/downloads/downloads.xul", "chrome,dialog=no,resizable"); }],
/*
["history", "List your history", ["history", "List your history",
function () { window.openDialog("chrome://browser/content/history/history-panel.xul", "History", "dialog,centerscreen,width=600,height=600"); }], function () { window.openDialog("chrome://browser/content/history/history-panel.xul", "History", "dialog,centerscreen,width=600,height=600"); }],
["import", "Import Preferences, Bookmarks, History, etc. from other browsers", ["import", "Import Preferences, Bookmarks, History, etc. from other browsers",
function () { window.BrowserImport(); }], function () { window.BrowserImport(); }],
*/
["openfile", "Open the file selector dialog", ["openfile", "Open the file selector dialog",
function () { window.BrowserOpenFileWindow(); }], function () { SBFileOpen(); }],
/*
["pageinfo", "Show information about the current page", ["pageinfo", "Show information about the current page",
function () { window.BrowserPageInfo(); }], function () { window.BrowserPageInfo(); }],
*/
["pagesource", "View page source", ["pagesource", "View page source",
function () { window.BrowserViewSourceOfDocument(content.document); }], function () { window.BrowserViewSourceOfDocument(content.document); }],
["places", "Places Organizer: Manage your bookmarks and history", ["places", "Places Organizer: Manage your bookmarks and history",
function () { PlacesCommandHook.showPlacesOrganizer(ORGANIZER_ROOT_BOOKMARKS); }], function () { PlacesCommandHook.showPlacesOrganizer(ORGANIZER_ROOT_BOOKMARKS); }],
["preferences", "Show Firefox preferences dialog", ["preferences", "Show Songbird preferences dialog",
function () { window.openPreferences(); }], function () { window.openPreferences(); }],
/*
["printpreview", "Preview the page before printing", ["printpreview", "Preview the page before printing",
function () { PrintUtils.printPreview(onEnterPrintPreview, onExitPrintPreview); }], function () { PrintUtils.printPreview(onEnterPrintPreview, onExitPrintPreview); }],
*/
["printsetup", "Setup the page size and orientation before printing", ["printsetup", "Setup the page size and orientation before printing",
function () { PrintUtils.showPageSetup(); }], function () { PrintUtils.showPageSetup(); }],
["print", "Show print dialog", ["print", "Show print dialog",
@@ -112,7 +133,9 @@ const config = { //{{{
["searchengines", "Manage installed search engines", ["searchengines", "Manage installed search engines",
function () { window.openDialog("chrome://browser/content/search/engineManager.xul", "_blank", "chrome,dialog,modal,centerscreen"); }], function () { window.openDialog("chrome://browser/content/search/engineManager.xul", "_blank", "chrome,dialog,modal,centerscreen"); }],
["selectionsource", "View selection source", ["selectionsource", "View selection source",
function () { buffer.viewSelectionSource(); }] function () { buffer.viewSelectionSource(); }],
["subscribe", "Add a new subscription",
function () { SBSubscribe(); }]
], ],
focusChange: function() { focusChange: function() {
@@ -127,14 +150,14 @@ const config = { //{{{
//TODO : Write intro.html and tutorial.html //TODO : Write intro.html and tutorial.html
// they are sorted by relevance, not alphabetically // they are sorted by relevance, not alphabetically
//helpFiles: [ "intro.html" ], helpFiles: [
/* "intro.html", "tutorial.html", "starting.html", "browsing.html", "intro.html", /*"tutorial.html",*/ "starting.html", "player.html",
"buffer.html", "cmdline.html", "insert.html", "options.html", "browsing.html", "buffer.html", "cmdline.html", "insert.html",
"pattern.html", "tabs.html", "hints.html", "map.html", "eval.html", "options.html", "pattern.html", "tabs.html", "hints.html", "map.html",
"marks.html", "repeat.html", "autocommands.html", "print.html", "eval.html", "marks.html", "repeat.html", "autocommands.html",
"gui.html", "styling.html", "message.html", "developer.html", "print.html", "gui.html", "styling.html", "message.html",
"various.html", "index.html", "version.html" "developer.html", "various.html", "index.html", "version.html"
], */ ],
optionDefaults: { optionDefaults: {
stal: 0, stal: 0,
@@ -179,6 +202,31 @@ const config = { //{{{
liberator.open(pre + newNumberStr + post); liberator.open(pre + newNumberStr + post);
} }
function openDisplayPane(id)
{
let pane = document.getElementById(id);
let manager = Components.classes['@songbirdnest.com/Songbird/DisplayPane/Manager;1']
.getService(Components.interfaces.sbIDisplayPaneManager);
let paneinfo = manager.getPaneInfo(pane._lastURL.stringValue);
if (!paneinfo)
paneinfo = manager.defaultPaneInfo;
pane.loadContent(paneinfo);
}
// FIXME: best way to format these args? Hyphenated? One word like :dialog?
let displayPanes = {
"content pane bottom": "displaypane_contentpane_bottom",
"service pane bottom": "displaypane_servicepane_bottom",
"right sidebar": "displaypane_right_sidebar"
};
completion.displayPane = function (context) {
context.title = ["Display Pane"];
context.completions = displayPanes; // FIXME: useful description etc
};
// load Xulmus specific modules // load Xulmus specific modules
// FIXME: Why aren't these listed in config.scripts? // FIXME: Why aren't these listed in config.scripts?
// FIXME: Why isn't this automatic? -> how would one know which classes to load where? --mst // FIXME: Why isn't this automatic? -> how would one know which classes to load where? --mst
@@ -198,6 +246,7 @@ const config = { //{{{
liberator.loadModule("hints", Hints); liberator.loadModule("hints", Hints);
// Load the Player module // Load the Player module
liberator.loadModule("player", Player); liberator.loadModule("player", Player);
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
////////////////////// STYLES ////////////////////////////////////////////////// ////////////////////// STYLES //////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{ /////////////////////////////////////////////////////////////////////////////{{{
@@ -369,7 +418,7 @@ const config = { //{{{
"Show " + config.hostApplication + " preferences", "Show " + config.hostApplication + " preferences",
function (args) function (args)
{ {
if (args.bang) // open Firefox settings GUI dialog if (args.bang) // open Songbird settings GUI dialog
{ {
liberator.open("about:config", liberator.open("about:config",
(options["newtab"] && options.get("newtab").has("all", "prefs")) (options["newtab"] && options.get("newtab").has("all", "prefs"))
@@ -396,66 +445,40 @@ const config = { //{{{
}, },
{ argCount: "0" }); { argCount: "0" });
// TODO: move sidebar commands to ui.js? commands.add(["dpcl[ose]"],
commands.add(["sbcl[ose]"], "Close a display pane",
"Close the sidebar window",
function ()
{
if (!document.getElementById("sidebar-box").hidden)
toggleSidebar();
},
{ argCount: "0" });
commands.add(["sideb[ar]", "sb[ar]", "sbope[n]"],
"Open the sidebar window",
function (args) function (args)
{ {
let arg = args.literalArg; let arg = args.literalArg;
// focus if the requested sidebar is already open if (arg in displayPanes)
if (document.getElementById("sidebar-title").value == arg) document.getElementById(displayPanes[arg]).hide();
{ else
document.getElementById("sidebar-box").focus(); liberator.echoerr("E475: Invalid argument: " + arg);
return;
}
let menu = document.getElementById("viewSidebarMenu");
for (let [,panel] in Iterator(menu.childNodes))
{
if (panel.label == arg)
{
panel.doCommand();
return;
}
}
liberator.echoerr("No sidebar " + arg + " found");
}, },
{ {
argCount: "1", argCount: "1",
completer: function (context) completion.sidebar(context), completer: function (context) completion.displayPane(context),
literal: 0 literal: 0
}); });
commands.add(["winc[lose]", "wc[lose]"], // TODO: this should accept a second arg to specify content
"Close window", commands.add(["displayp[ane]", "dp[ane]", "dpope[n]"],
function () { window.close(); }, "Open a display pane",
{ argCount: "0" });
commands.add(["wino[pen]", "wo[pen]", "wine[dit]"],
"Open one or more URLs in a new window",
function (args) function (args)
{ {
args = args.string; let arg = args.literalArg;
if (args) if (arg in displayPanes)
liberator.open(args, liberator.NEW_WINDOW); openDisplayPane(displayPanes[arg])
// TODO: focus when we have better key handling of these extended modes
else else
liberator.open("about:blank", liberator.NEW_WINDOW); liberator.echoerr("E475: Invalid argument: " + arg);
}, },
{ {
completer: function (context) completion.url(context), argCount: "1",
completer: function (context) completion.displayPane(context),
literal: 0 literal: 0
}); });
@@ -463,6 +486,9 @@ const config = { //{{{
////////////////////// OPTIONS ///////////////////////////////////////////////// ////////////////////// OPTIONS /////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{ /////////////////////////////////////////////////////////////////////////////{{{
let stal = options.get("showtabline");
stal.value = stal.defaultValue = 2;
options.add(["online"], options.add(["online"],
"Set the 'work offline' option", "Set the 'work offline' option",
"boolean", true, "boolean", true,
@@ -505,8 +531,18 @@ const config = { //{{{
options.add(["urlseparator"], options.add(["urlseparator"],
"Set the separator regexp used to separate multiple URL args", "Set the separator regexp used to separate multiple URL args",
"string", ",\\s"); "string", ",\\s");
//}}}
// TODO: mention this to SB devs, they seem keen to provide these
// functions to make porting from FF as simple as possible.
window.toJavaScriptConsole = function () {
toOpenWindowByType("global:console", "chrome://global/content/console.xul");
}
window.BrowserStop = function () {
getBrowser().mCurrentBrowser.stop();
}
} }
//}}}
}; //}}} }; //}}}
// vim: set fdm=marker sw=4 ts=4 et: // vim: set fdm=marker sw=4 ts=4 et:

0
xulmus/content/liberator.dtd Executable file → Normal file
View File

851
xulmus/content/player.js Executable file → Normal file
View File

@@ -1,75 +1,490 @@
//Import Artist List as this can be huge
var artists = getArtistsArray();
function Player() // {{{ function Player() // {{{
{ {
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
////////////////////// PRIVATE SECTION ///////////////////////////////////////// ////////////////////// PRIVATE SECTION /////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{ /////////////////////////////////////////////////////////////////////////////{{{
let lastSearchString = "";
let lastSearchIndex = 0;
let lastSearchView = _SBGetCurrentView();
// Get the focus to the visible playlist first // Get the focus to the visible playlist first
//window._SBShowMainLibrary(); //window._SBShowMainLibrary();
function getArtistsArray()
{
var list = LibraryUtils.mainLibrary;
// Create an enumeration listener to count each item
var listener = {
count: 0,
onEnumerationBegin: function (aMediaList) {
this.count = 0;
},
onEnumeratedItem: function (aMediaList, aMediaItem) {
this.count++;
},
onEnumerationEnd: function (aMediaList, aStatusCode) {}
};
var artistCounts = {};
var artists = list.getDistinctValuesForProperty(SBProperties.artistName);
var artist;
var artistArray = [];
var i = 0;
// Count the number of media items for each distinct artist
while (artists.hasMore())
{
artist = artists.getNext();
artistArray[i] = [artist, artist];
list.enumerateItemsByProperty(SBProperties.artistName,
artist,
listener,
Ci.sbIMediaList.ENUMERATIONTYPE_LOCKING);
artistCounts[artist] = listener.count;
i++;
}
//liberator.dump("Count : "+artistCounts.toSource());
return artistArray;
}
// Get the artist names before hand.
let artists = getArtistsArray();
const pageService = Components.classes["@songbirdnest.com/Songbird/MediaPageManager;1"]
.getService(Components.interfaces.sbIMediaPageManager);
// Register Callbacks for searching.
liberator.registerCallback("change", modes.SEARCH_VIEW_FORWARD, function (str) { player.onSearchKeyPress(str); });
liberator.registerCallback("submit", modes.SEARCH_VIEW_FORWARD, function (str) { player.onSearchSubmit(str); });
//liberator.registerCallback("cancel", modes.SEARCH_VIEW_FORWARD, function (command) { player.searchView(command);});
// interval (milliseconds)
function seek(interval, direction)
{
let position = gMM.playbackControl ? gMM.playbackControl.position : 0;
player.seekTo(position + (direction ? interval : -interval));
}
function focusTrack(mediaItem)
{
SBGetBrowser().mediaTab.mediaPage.highlightItem(_SBGetCurrentView().getIndexForItem(mediaItem));
}
var mediaCoreListener = {
onMediacoreEvent: function (event)
{
switch (event.type)
{
case Ci.sbIMediacoreEvent.BEFORE_TRACK_CHANGE:
liberator.log("Before track changed: " + event.data);
autocommands.trigger("TrackChangePre", { track: event.data });
break;
case Ci.sbIMediacoreEvent.TRACK_CHANGE:
autocommands.trigger("TrackChange", { track: event.data });
break;
case Ci.sbIMediacoreEvent.BEFORE_VIEW_CHANGE:
liberator.log("Before view changed: " + event.data);
autocommands.trigger("ViewChangePre", { view: event.data });
break;
case Ci.sbIMediacoreEvent.VIEW_CHANGE:
liberator.log("View changed: " + event.data);
autocommands.trigger("ViewChange", { view: event.data });
break;
case Ci.sbIMediacoreEvent.STREAM_START:
liberator.log("Track started: " + gMM.sequencer.currentItem);
autocommands.trigger("StreamStart", { track: gMM.sequencer.currentItem });
break;
case Ci.sbIMediacoreEvent.STREAM_PAUSE:
liberator.log("Track paused: " + gMM.sequencer.currentItem);
autocommands.trigger("StreamPause", { track: gMM.sequencer.currentItem });
break;
case Ci.sbIMediacoreEvent.STREAM_END:
liberator.log("Track ended: " + gMM.sequencer.currentItem);
autocommands.trigger("StreamEnd", { track: gMM.sequencer.currentItem });
break;
case Ci.sbIMediacoreEvent.STREAM_STOP:
liberator.log("Track stopped: " + gMM.sequencer.currentItem);
autocommands.trigger("StreamStop", { track: gMM.sequencer.currentItem });
break;
}
}
};
gMM.addListener(mediaCoreListener);
liberator.registerObserver("shutdown", function () {
gMM.removeListener(mediaCoreListener);
});
/////////////////////////////////////////////////////////////////////////////}}} /////////////////////////////////////////////////////////////////////////////}}}
////////////////////// MAPPINGS //////////////////////////////////////////////// ////////////////////// MAPPINGS ////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{ /////////////////////////////////////////////////////////////////////////////{{{
mappings.add([modes.PLAYER], mappings.add([modes.PLAYER],
["x"], "Play Track", ["x"], "Play track",
function () function () { player.play(); });
{
gMM.sequencer.play();
});
mappings.add([modes.PLAYER], mappings.add([modes.PLAYER],
["z"], "Previous Track", ["z"], "Previous track",
function () function () { player.previous(); });
{
gSongbirdWindowController.doCommand("cmd_control_previous");
});
mappings.add([modes.PLAYER], mappings.add([modes.PLAYER],
["c"], "Pause/Unpause Track", ["c"], "Pause/unpause track",
function () function () { player.togglePlayPause(); });
{
gSongbirdWindowController.doCommand("cmd_control_playpause");
});
mappings.add([modes.PLAYER], mappings.add([modes.PLAYER],
["b"], "Next Track", ["b"], "Next track",
function () function () { player.next(); });
{
gSongbirdWindowController.doCommand("cmd_control_next");
});
mappings.add([modes.PLAYER], mappings.add([modes.PLAYER],
["v"], "Stop Track", ["v"], "Stop track",
function () function () { player.stop(); });
mappings.add([modes.PLAYER],
["f"], "Filter library",
function () { commandline.open(":", "filter ", modes.EX); });
mappings.add([modes.PLAYER],
["F"], "Loads current view filtered by the keywords",
function () { commandline.open(":", "Filter ", modes.EX); });
mappings.add([modes.PLAYER],
["i"], "Select current track",
function () { gSongbirdWindowController.doCommand("cmd_find_current_track"); });
mappings.add([modes.PLAYER],
["s"], "Toggle shuffle",
function () { player.toggleShuffle(); });
mappings.add([modes.PLAYER],
["r"], "Toggle repeat",
function () { player.toggleRepeat(); });
mappings.add([modes.PLAYER],
["h", "<Left>"], "Seek -10s",
function (count) { player.seekBackward(Math.max(1, count) * 10000); },
{ flags: Mappings.flags.COUNT });
mappings.add([modes.PLAYER],
["l", "<Right>"], "Seek +10s",
function (count) { player.seekForward(Math.max(1, count) * 10000); },
{ flags: Mappings.flags.COUNT });
mappings.add([modes.PLAYER],
["H", "<S-Left>"], "Seek -1m",
function (count) { player.seekBackward(Math.max(1, count) * 60000); },
{ flags: Mappings.flags.COUNT });
mappings.add([modes.PLAYER],
["L", "<S-Right>"], "Seek +1m",
function (count) { player.seekForward(Math.max(1, count) * 60000); },
{ flags: Mappings.flags.COUNT });
mappings.add([modes.PLAYER],
["=", "+"], "Increase volume by 10%",
function () { player.increaseVolume(); });
mappings.add([modes.PLAYER],
["-"], "Decrease volume by 10%",
function () { player.decreaseVolume(); });
mappings.add([modes.PLAYER],
["/"], "Search forward for a track",
function (args) { commandline.open("/", "", modes.SEARCH_VIEW_FORWARD); });
mappings.add([modes.PLAYER],
["n"], "Find the next track",
function () { player.searchViewAgain(false);});
mappings.add([modes.PLAYER],
["N"], "Find the previous track",
function () { player.searchViewAgain(true);});
for (let i in util.range(0, 6))
{
let (rating = i) {
mappings.add([modes.PLAYER],
["<C-" + rating + ">"], "Rate the current media item " + rating,
function () { player.rateMediaItem(rating); });
}
}
////////////////// ///////////////////////////////////////////////////////////}}}
////////////////////// COMMANDS ////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{
// TODO: rename :Filter to :filter and move this functionality into :tqueue etc? --djk
commands.add(["f[ilter]"],
"Filter and play tracks",
function (args)
{
// Store the old view
// let prev_view = gMM.status.view;
let library = LibraryUtils.mainLibrary;
let mainView = library.createView();
let sqncr = gMM.sequencer;
let customProps = Cc["@songbirdnest.com/Songbird/Properties/MutablePropertyArray;1"]
.createInstance(Ci.sbIMutablePropertyArray);
// args
switch (args.length)
{
case 3:
customProps.appendProperty(SBProperties.trackName, args[2].toString());
case 2:
customProps.appendProperty(SBProperties.albumName, args[1].toString());
case 1:
customProps.appendProperty(SBProperties.artistName, args[0].toString());
break;
default:
break;
}
sqncr.playView(mainView, mainView.getIndexForItem(library.getItemsByProperties(customProps).queryElementAt(0, Ci.sbIMediaItem)));
player.focusPlayingTrack();
},
{
argCount: "+",
completer: function (context, args) completion.song(context, args)
});
commands.add(["F[ilter]"],
"Filter tracks based on keywords {genre/artist/album/track}",
function (args)
{
let library = LibraryUtils.mainLibrary;
let view = LibraryUtils.createStandardMediaListView(LibraryUtils.mainLibrary, args.literalArg);
if (view.length == 0)
liberator.echoerr("No Tracks matching the keywords");
else
{
SBGetBrowser().loadMediaList(LibraryUtils.mainLibrary, null, null, view,
"chrome://songbird/content/mediapages/filtersPage.xul");
// TODO: make this focusTrack work ?
focusTrack(view.getItemByIndex(0));
}
},
{
argCount: "1",
literal: 0
//completer: function (context, args) completion.tracks(context, args);
});
commands.add(["load"],
"Load a playlist",
function (args)
{
let arg = args.literalArg;
if (arg)
{
// load the selected playlist/smart playlist
let playlists = player.getPlaylists();
for ([i, list] in Iterator(playlists))
{
if (util.compareIgnoreCase(arg, list.name) == 0)
{
SBGetBrowser().loadMediaList(playlists[i]);
focusTrack(_SBGetCurrentView().getItemByIndex(0));
return;
}
}
liberator.echoerr("E475: Invalid argument: " + arg);
}
else
{
// load main library if there are no args
_SBShowMainLibrary();
}
},
{
argCount: "?",
completer: function (context, args) completion.playlist(context, args),
literal: 0
});
// TODO: better off as a single command (:player play) or cmus compatible (:player-play)? --djk
commands.add(["playerp[lay]"],
"Play track",
function () { player.play(); });
commands.add(["playerpa[use]"],
"Pause/unpause track",
function () { player.togglePlayPause(); });
commands.add(["playern[ext]"],
"Play next track",
function () { player.next(); });
commands.add(["playerpr[ev]"],
"Play previous track",
function () { player.previous(); });
commands.add(["players[top]"],
"Stop track",
function () { player.stop(); });
commands.add(["see[k]"],
"Seek to a track position",
function (args)
{
let arg = args[0];
// intentionally supports 999:99:99
if (!/^[+-]?(\d+[smh]?|(\d+:\d\d:|\d+:)?\d{2})$/.test(arg))
{
liberator.echoerr("E475: Invalid argument: " + arg);
return;
}
function ms(t, m) Math.abs(parseInt(t, 10) * { s: 1000, m: 60000, h: 3600000 }[m])
if (/:/.test(arg))
{
let [seconds, minutes, hours] = arg.split(":").reverse();
hours = hours || 0;
var value = ms(seconds, "s") + ms(minutes, "m") + ms(hours, "h");
}
else
{
if (!/[smh]/.test(arg.substr(-1)))
arg += "s"; // default to seconds
value = ms(arg.substring(arg, arg.length - 1), arg.substr(-1));
}
if (/^[-+]/.test(arg))
arg[0] == "-" ? player.seekBackward(value) : player.seekForward(value)
else
player.seekTo(value)
},
{ argCount: "1" });
commands.add(["mediav[iew]"],
"Change the current media view",
function (args)
{
// FIXME: is this a SB restriction? --djk
if (!gBrowser.currentMediaPage)
{
liberator.echoerr("Exxx: Can only set the media view from the media tab"); // XXX
return;
}
let arg = args[0];
if (arg)
{
let pages = player.getMediaPages();
for ([,page] in Iterator(pages))
{
if (util.compareIgnoreCase(arg, page.contentTitle) == 0)
{
player.loadMediaPage(page, gBrowser.currentMediaListView.mediaList, gBrowser.currentMediaListView);
return;
}
}
liberator.echoerr("E475: Invalid argument: " + arg);
}
},
{
argCount: "1",
completer: function (context) completion.mediaView(context),
literal: 0
});
// TODO: maybe :vol! could toggle mute on/off? --djk
commands.add(["vol[ume]"],
"Set the volume",
function (args)
{
let arg = args[0];
if (!/^[+-]?\d+$/.test(arg))
{
liberator.echoerr("E488: Trailing characters");
return;
}
let level = parseInt(arg, 10) / 100;
if (/^[+-]/.test(arg))
level = player.volume + level;
player.volume = Math.min(Math.max(level, 0), 1);
},
{ argCount: "1" });
/////////////////////////////////////////////////////////////////////////////}}}
////////////////////// PUBLIC SECTION //////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{
return {
// TODO: check bounds and round, 0 - 1 or 0 - 100?
get volume() gMM.volumeControl.volume,
set volume(value)
{
gMM.volumeControl.volume = value;
},
// FIXME: can't be called from non-media tabs since 840e78
play: function play()
{
// Check if there is any selection in place, else play first item of the visible view.
if (_SBGetCurrentView().selection.count != 0)
{
// Play the selection.
gMM.sequencer.playView(_SBGetCurrentView(), _SBGetCurrentView().getIndexForItem(_SBGetCurrentView().selection.currentMediaItem));
focusTrack(gMM.sequencer.currentItem);
}
else
{
gMM.sequencer.playView(SBGetBrowser().currentMediaListView, 0);
focusTrack(gMM.sequencer.currentItem);
}
},
stop: function stop()
{ {
gMM.sequencer.stop(); gMM.sequencer.stop();
}); },
mappings.add([modes.PLAYER], next: function next()
["l"], "Play Media",
function ()
{ {
commandline.open(":", "playmedia ", modes.EX); gSongbirdWindowController.doCommand("cmd_control_next");
}); gSongbirdWindowController.doCommand("cmd_find_current_track");
},
mappings.add([modes.PLAYER], previous: function previous()
["s"], "Toggle Shuffle", {
function () gSongbirdWindowController.doCommand("cmd_control_previous");
gSongbirdWindowController.doCommand("cmd_find_current_track");
},
togglePlayPause: function togglePlayPause()
{
gSongbirdWindowController.doCommand("cmd_control_playpause");
focusTrack(gMM.sequencer.currentItem);
},
toggleShuffle: function toggleShuffle()
{ {
if (gMM.sequencer.mode != gMM.sequencer.MODE_SHUFFLE) if (gMM.sequencer.mode != gMM.sequencer.MODE_SHUFFLE)
gMM.sequencer.mode = gMM.sequencer.MODE_SHUFFLE; gMM.sequencer.mode = gMM.sequencer.MODE_SHUFFLE;
else else
gMM.sequencer.mode = gMM.sequencer.MODE_FORWARD; gMM.sequencer.mode = gMM.sequencer.MODE_FORWARD;
}); },
mappings.add([modes.PLAYER], // FIXME: not really toggling - good enough for now.
["r"], "Toggle Repeat", toggleRepeat: function toggleRepeat()
function ()
{ {
switch (gMM.sequencer.repeatMode) switch (gMM.sequencer.repeatMode)
{ {
@@ -86,131 +501,249 @@ function Player() // {{{
gMM.sequencer.repeatMode = gMM.sequencer.MODE_REPEAT_NONE; gMM.sequencer.repeatMode = gMM.sequencer.MODE_REPEAT_NONE;
break; break;
} }
});
/////////////////////////////////////////////////////////////////////////////}}}
////////////////////// COMMANDS ////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{
commands.add(["playmedia"],
"Play Media",
function (args)
{
//Store the old view
//var prev_view = gMM.status.view;
var library = LibraryUtils.mainLibrary;
var mainView = library.createView();
var sqncr = gMM.sequencer;
var customProps = Cc["@songbirdnest.com/Songbird/Properties/MutablePropertyArray;1"]
.createInstance(Ci.sbIMutablePropertyArray);
//args
if (args.length == 1)
{
customProps.appendProperty(SBProperties.artistName,args[0].toString());
}
else if (args.length == 2)
{
customProps.appendProperty(SBProperties.artistName,args[0].toString());
customProps.appendProperty(SBProperties.albumName,args[1].toString());
}
else if (args.length == 3)
{
customProps.appendProperty(SBProperties.artistName,args[0].toString());
customProps.appendProperty(SBProperties.albumName,args[1].toString());
customProps.appendProperty(SBProperties.trackName,args[2].toString());
}
sqncr.playView(mainView, mainView.getIndexForItem(library.getItemsByProperties(customProps).queryElementAt(0,Ci.sbIMediaItem)));
}, },
seekForward: function seekForward(interval)
{ {
completer: function (context, args) completion.song(context, args) seek(interval, true);
}); },
/////////////////////////////////////////////////////////////////////////////}}} seekBackward: function seekBackward(interval)
////////////////////// PUBLIC SECTION ////////////////////////////////////////// {
/////////////////////////////////////////////////////////////////////////////{{{ seek(interval, false);
},
seekTo: function seekTo(position)
{
// FIXME: if not playing
if (!gMM.playbackControl)
this.play();
let min = 0;
let max = gMM.playbackControl.duration - 5000; // TODO: 5s buffer like cmus desirable?
gMM.playbackControl.position = Math.min(Math.max(position, min), max);
},
// FIXME: 10% ?
// I think just general increments of say 0.05 might be better --djk
increaseVolume: function increaseVolume()
{
gMM.volumeControl.volume = gMM.volumeControl.volume * 1.1;
},
decreaseVolume: function decreaseVolume()
{
if (gMM.volumeControl.volume == 0)
gMM.volumeControl.volume = 0.1;
else
gMM.volumeControl.volume = gMM.volumeControl.volume * 0.9;
},
focusPlayingTrack :function focusPlayingTrack()
{
focusTrack(gMM.sequencer.currentItem);
},
listTracks: function listTracks(view)
{
//let myView = LibraryUtils.createStandardMediaListView(LibraryUtils.mainLibrary, args);
let length = view.length;
let tracksList = [];
for (let i = 0; i < length; i++)
{
let mediaItem = view.getItemByIndex(i);
let trackName = mediaItem.getProperty(SBProperties.trackName);
let albumName = mediaItem.getProperty(SBProperties.albumName);
let artistName = mediaItem.getProperty(SBProperties.artistName);
tracksList[i] = [trackName, "Album : " + albumName + " Artist : " + artistName];
}
return tracksList;
},
searchView: function searchView (args)
{
let currentView = _SBGetCurrentView();
let mediaItemList = currentView.mediaList;
let search = _getSearchString(currentView);
let searchString = "";
if (search != "")
searchString = args + " " + search;
else
searchString = args;
lastSearchString = searchString;
let mySearchView = LibraryUtils.createStandardMediaListView(mediaItemList, searchString);
if (mySearchView.length)
{
lastSearchView = mySearchView;
lastSearchIndex = 0;
focusTrack(mySearchView.getItemByIndex(lastSearchIndex));
}
else
{
liberator.echoerr("E486 Pattern not found: " + searchString, commandline.FORCE_SINGLELINE);
}
},
searchViewAgain: function searchViewAgain(reverse)
{
function echo(str)
{
setTimeout(function () {
commandline.echo(str, commandline.HL_WARNINGMSG, commandline.APPEND_TO_MESSAGES | commandline.FORCE_SINGLELINE);
}, 0);
}
if (reverse)
{
if (lastSearchIndex == 0)
{
lastSearchIndex = lastSearchView.length - 1;
echo("Search hit TOP, continuing at BOTTOM");
}
else
lastSearchIndex = lastSearchIndex - 1;
}
else
{
if (lastSearchIndex == (lastSearchView.length - 1))
{
lastSearchIndex = 0;
echo("Search hit BOTTOM, continuing at TOP");
}
else
lastSearchIndex = lastSearchIndex + 1;
}
//FIXME: Implement for "?" --ken
commandline.echo("/" + lastSearchString, null, commandline.FORCE_SINGLELINE);
focusTrack(lastSearchView.getItemByIndex(lastSearchIndex));
},
onSearchKeyPress: function (str)
{
if (options["incsearch"])
this.searchView(str);
},
onSearchSubmit: function (str)
{
this.searchView(str);
},
getPlaylists: function getPlaylists()
{
let mainLibrary = LibraryUtils.mainLibrary;
let playlists = [mainLibrary];
let listener = {
onEnumerationBegin: function () { },
onEnumerationEnd: function () { },
onEnumeratedItem: function (list, item)
{
// FIXME: why are there null items and duplicates?
if (!playlists.some(function (list) list.name == item.name) && item.name != null)
{
playlists.push(item);
}
return Components.interfaces.sbIMediaListEnumerationListener.CONTINUE;
}
};
mainLibrary.enumerateItemsByProperty("http://songbirdnest.com/data/1.0#isList", "1", listener);
return playlists;
},
// Play track at 'row' in 'playlist'
playPlaylist: function playPlaylist(playlist, row)
{
gMM.sequencer.playView(playlist.createView(), row);
},
getMediaPages: function getMediaPages()
{
let list = gBrowser.currentMediaPage.mediaListView.mediaList;
let pages = pageService.getAvailablePages(list);
return ArrayConverter.JSArray(pages).map(function (page) page.QueryInterface(Components.interfaces.sbIMediaPageInfo));
},
loadMediaPage: function loadMediaList(page, list, view)
{
pageService.setPage(list, page);
gBrowser.loadMediaList(list, null, null, view, null);
},
rateMediaItem: function rateMediaItem(rating)
{
if (gMM.sequencer.currentItem)
gMM.sequencer.currentItem.setProperty(SBProperties.rating, rating);
},
getArtists: function getArtists()
{
return artists;
},
getAlbums: function getAlbums(artist)
{
var list = LibraryUtils.mainLibrary;
var albumArray = [], returnArray = [];
var items = list.getItemsByProperty(SBProperties.artistName, artist).enumerate();
var i = 0, j = 0;
while (items.hasMoreElements())
{
album = items.getNext().getProperty(SBProperties.albumName);
albumArray[i] = [album, album];
if (i == 0)
{
returnArray[j] = albumArray[i];
j++;
}
else if (albumArray[i-1].toString() != albumArray[i].toString())
{
returnArray[i] = albumArray[i];
j++;
}
i++;
}
return returnArray;
},
getTracks: function getTracks(artist, album)
{
var list = LibraryUtils.mainLibrary;
var tracksArray = [];
var pa = Cc["@songbirdnest.com/Songbird/Properties/MutablePropertyArray;1"]
.createInstance(Ci.sbIMutablePropertyArray);
var i = 0;
pa.appendProperty(SBProperties.artistName, artist.toString());
pa.appendProperty(SBProperties.albumName, album.toString());
var items = list.getItemsByProperties(pa).enumerate();
while (items.hasMoreElements())
{
track = items.getNext().getProperty(SBProperties.trackName);
tracksArray[i] = [track, track];
i++;
}
return tracksArray;
}
};
//}}} //}}}
} // }}} } // }}}
function getArtists()
{
return this.artists;
}
function getArtistsArray()
{
var list = LibraryUtils.mainLibrary;
// Create an enumeration listener to count each item
var listener = {
count: 0,
onEnumerationBegin: function (aMediaList) {
this.count = 0;
},
onEnumeratedItem: function (aMediaList, aMediaItem) {
this.count++;
},
onEnumerationEnd: function (aMediaList, aStatusCode) {}
};
var artistCounts = {};
var artists = list.getDistinctValuesForProperty(SBProperties.artistName);
var artist;
var artistArray = [];
var i = 0;
// Count the number of media items for each distinct artist
while (artists.hasMore()) {
artist = artists.getNext();
artistArray[i] = [artist,artist];
list.enumerateItemsByProperty(SBProperties.artistName,
artist,
listener,
Ci.sbIMediaList.ENUMERATIONTYPE_LOCKING);
artistCounts[artist] = listener.count;
i++;
}
//liberator.dump("Count : "+artistCounts.toSource());
return artistArray;
}
function getAlbums(artist)
{
var list = LibraryUtils.mainLibrary;
var albumArray = [];
var items = list.getItemsByProperty(SBProperties.artistName, artist).enumerate();
var i = 0;
while (items.hasMoreElements()) {
album = items.getNext().getProperty(SBProperties.albumName);
albumArray[i] = [album, album];
i++;
}
return util.Array.uniq(albumArray);
}
function getTracks(artist,album)
{
var list = LibraryUtils.mainLibrary;
var tracksArray = [];
var pa = Cc["@songbirdnest.com/Songbird/Properties/MutablePropertyArray;1"]
.createInstance(Ci.sbIMutablePropertyArray);
var i = 0;
pa.appendProperty(SBProperties.artistName,artist.toString());
pa.appendProperty(SBProperties.albumName,album.toString());
var items = list.getItemsByProperties(pa).enumerate();
while (items.hasMoreElements()) {
track = items.getNext().getProperty(SBProperties.trackName);
tracksArray[i] = [track, track];
i++;
}
return tracksArray;
}
// vim: set fdm=marker sw=4 ts=4 et: // vim: set fdm=marker sw=4 ts=4 et:

BIN
xulmus/content/xulmus.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

8
xulmus/content/xulmus.svg Executable file → Normal file
View File

@@ -15,9 +15,9 @@
inkscape:version="0.46" inkscape:version="0.46"
version="1.0" version="1.0"
sodipodi:docbase="/home/maxauthority/code/vimperator" sodipodi:docbase="/home/maxauthority/code/vimperator"
sodipodi:docname="vimperator.svg" sodipodi:docname="xulmus.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape" inkscape:output_extension="org.inkscape.output.svg.inkscape"
inkscape:export-filename="/home/maxauthority/code/vimperator/vimperator.png" inkscape:export-filename="/home/maxauthority/code/vimperator/xulmus.png"
inkscape:export-xdpi="90" inkscape:export-xdpi="90"
inkscape:export-ydpi="90"> inkscape:export-ydpi="90">
<defs <defs
@@ -73,10 +73,10 @@
sodipodi:role="line" sodipodi:role="line"
id="tspan2231" id="tspan2231"
x="6.2673268" x="6.2673268"
y="29.896835">vimperator_</tspan></text> y="29.896835">xulmus_</tspan></text>
<text <text
xml:space="preserve" xml:space="preserve"
style="font-size:24px;font-style:normal;font-weight:normal;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans Mono" style="font-size:24px;font-style:normal;font-weight:normal;fill:#00ff00;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans Mono"
x="6.4079518" x="6.4079518"
y="53.183945" y="53.183945"
id="text2233"><tspan id="text2233"><tspan

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

0
xulmus/content/xulmus.xul Executable file → Normal file
View File

0
xulmus/contrib/vim/Makefile Executable file → Normal file
View File

0
xulmus/contrib/vim/ftdetect/xulmus.vim Executable file → Normal file
View File

0
xulmus/contrib/vim/mkvimball.txt Executable file → Normal file
View File

0
xulmus/contrib/vim/syntax/xulmus.vim Executable file → Normal file
View File

45
xulmus/install.rdf Executable file → Normal file
View File

@@ -5,54 +5,15 @@
<em:id>{3703dcdb-6ba3-4331-8de8-c18373fb05d1}</em:id> <em:id>{3703dcdb-6ba3-4331-8de8-c18373fb05d1}</em:id>
<em:type>2</em:type> <em:type>2</em:type>
<em:name>xulmus@vimperator.org</em:name> <em:name>xulmus@vimperator.org</em:name>
<em:version>0.1</em:version> <em:version>###VERSION###</em:version>
<em:creator>Prathyush Thota</em:creator> <em:creator>Prathyush Thota</em:creator>
<em:description>Makes Songbird behave like Vim and CMus.</em:description>
<em:description>VIM for SongBird brothers.</em:description>
<em:targetApplication> <em:targetApplication>
<Description> <Description>
<em:id>songbird@songbirdnest.com</em:id> <em:id>songbird@songbirdnest.com</em:id>
<em:minVersion>0.8.0pre</em:minVersion> <em:minVersion>0.8.0pre</em:minVersion>
<em:maxVersion>1.1.0pre</em:maxVersion> <em:maxVersion>1.2.0pre</em:maxVersion>
</Description> </Description>
</em:targetApplication> </em:targetApplication>
<!-- Register a pane to be displayed below the service sidebar.
See http://wiki.songbirdnest.com/Developer/Articles/Getting_Started/Display_Panes -->
<songbird:displayPane>
<Description>
<songbird:contentTitle>xulmus</songbird:contentTitle>
<songbird:contentUrl>chrome://xulmus/content/pane.xul</songbird:contentUrl>
<songbird:contentIcon>chrome://xulmus/skin/pane-icon.png</songbird:contentIcon>
<songbird:defaultWidth>200</songbird:defaultWidth>
<songbird:defaultHeight>100</songbird:defaultHeight>
<songbird:suggestedContentGroups>servicepane</songbird:suggestedContentGroups>
<songbird:showOnInstall>true</songbird:showOnInstall>
</Description>
</songbird:displayPane>
<!-- Register a custom media page.
See http://wiki.songbirdnest.com/Developer/Articles/Getting_Started/Building_Media_Views -->
<songbird:mediaPage>
<Description>
<songbird:contentTitle>xulmus</songbird:contentTitle>
<songbird:contentUrl>chrome://xulmus/content/media-page.xul</songbird:contentUrl>
</Description>
</songbird:mediaPage>
</Description> </Description>
</RDF> </RDF>

0
xulmus/locale/en-US/Makefile Executable file → Normal file
View File

8
xulmus/locale/en-US/asciidoc.conf Executable file → Normal file

File diff suppressed because one or more lines are too long

20
xulmus/locale/en-US/autocommands.txt Executable file → Normal file
View File

@@ -12,7 +12,7 @@ Execute commands automatically on events.
[c]:au[tocmd][c] {event} {pat} {cmd} [c]:au[tocmd][c] {event} {pat} {cmd}
Add {cmd} to the list of commands Vimperator will execute on {event} for a URL matching {pat}: Add {cmd} to the list of commands Xulmus will execute on {event} for a URL matching {pat}:
* [c]:autocmd[!][c] {events} {pat}: list/remove autocommands filtered by {events} and {pat} * [c]:autocmd[!][c] {events} {pat}: list/remove autocommands filtered by {events} and {pat}
* [c]:autocmd[!][c] {events}: list/remove autocommands matching {events} * [c]:autocmd[!][c] {events}: list/remove autocommands matching {events}
@@ -26,14 +26,22 @@ Available {events}:
*ColorScheme* Triggered after a color scheme has been loaded *ColorScheme* Triggered after a color scheme has been loaded
*DOMLoad* Triggered when a page's DOM content has fully loaded *DOMLoad* Triggered when a page's DOM content has fully loaded
*DownloadPost* Triggered when a download has completed *DownloadPost* Triggered when a download has completed
*Fullscreen* Triggered when the browser's fullscreen state changes *Fullscreen* Triggered when the player's fullscreen state changes
*LocationChange* Triggered when changing tabs or when navigating to a new location *LocationChange* Triggered when changing tabs or when navigating to a new location
*PageLoadPre* Triggered after a page load is initiated *PageLoadPre* Triggered after a page load is initiated
*PageLoad* Triggered when a page gets (re)loaded/opened *PageLoad* Triggered when a page gets (re)loaded/opened
*ShellCmdPost* Triggered after executing a shell command with [c]:![c]#{cmd} *ShellCmdPost* Triggered after executing a shell command with [c]:![c]#{cmd}
*VimperatorEnter* Triggered after Firefox starts *TrackChangePre* Triggered before a playing track is changed
*VimperatorLeavePre* Triggered before exiting Firefox, just before destroying each module *TrackChange* Triggered after a playing track has changed
*VimperatorLeave* Triggered before exiting Firefox *ViewChangePre* Triggered before a sequencer view is changed
*ViewChange* Triggered after a sequencer view is changed
*StreamStart* Triggered after a stream has started
*StreamPause* Triggered after a stream has paused
*StreamEnd* Triggered after a stream has ended
*StreamStop* Triggered after a stream has stopped
*XulmusEnter* Triggered after Songbird starts
*XulmusLeavePre* Triggered before exiting Songbird, just before destroying each module
*XulmusLeave* Triggered before exiting Songbird
-------------------------------------------------------------- --------------------------------------------------------------
{pat} is a regular expression, use .* if you want to match all URLs. {pat} is a regular expression, use .* if you want to match all URLs.
@@ -53,6 +61,8 @@ The following keywords are available where relevant:
*<file>* The target destination of a download. Only for *DownloadPost*. *<file>* The target destination of a download. Only for *DownloadPost*.
*<state>* The new fullscreen state. Only for *Fullscreen*. *<state>* The new fullscreen state. Only for *Fullscreen*.
*<name>* The color scheme name. Only for *ColorScheme*. *<name>* The color scheme name. Only for *ColorScheme*.
*<view>* The new sequencer view. Only for *ViewChangePre* and *ViewChange*.
*<track>* The new media track. Only for *TrackChangePre*, *TrackChange* and *Stream\**.
-------------------------------------------------------------- --------------------------------------------------------------
________________________________________________________________________________ ________________________________________________________________________________

38
xulmus/locale/en-US/browsing.txt Executable file → Normal file
View File

@@ -2,15 +2,15 @@ HEADER
|surfing| |browsing| + |surfing| |browsing| +
Vimperator overrides nearly all Firefox keys in order to make browsing more Xulmus overrides nearly all Songbird keys in order to make browsing more
pleasant for Vim users. On the rare occasions when you want to pass a keystroke pleasant for Vim users. On the rare occasions when you want to pass a keystroke
to Firefox, or to the web page, and have it retain its original meaning you to Songbird, or to the web page, and have it retain its original meaning you
have 2 possibilities: have 2 possibilities:
|pass-through| |<C-z>| |CTRL-Z| + |pass-through| |<C-z>| |CTRL-Z| +
||CTRL-Z|| ||CTRL-Z||
________________________________________________________________________________ ________________________________________________________________________________
Disable all Vimperator keys except [m]<Esc>[m] and pass them to the next event Disable all Xulmus keys except [m]<Esc>[m] and pass them to the next event
handler. This is especially useful, if JavaScript controlled forms like the handler. This is especially useful, if JavaScript controlled forms like the
RichEdit form fields of Gmail don't work anymore. To exit this mode, press RichEdit form fields of Gmail don't work anymore. To exit this mode, press
[m]<Esc>[m]. If you also need to pass [m]<Esc>[m] in this mode to the web page, [m]<Esc>[m]. If you also need to pass [m]<Esc>[m] in this mode to the web page,
@@ -21,10 +21,10 @@ ________________________________________________________________________________
||CTRL-V|| ||CTRL-V||
________________________________________________________________________________ ________________________________________________________________________________
If you only need to pass a single key to a JavaScript form field or another If you only need to pass a single key to a JavaScript form field or another
extension prefix the key with [m]<C-v>[m]. Also works to unshadow Firefox extension prefix the key with [m]<C-v>[m]. Also works to unshadow Songbird
shortcuts like [m]<C-o>[m] which are otherwise hidden in Vimperator. When shortcuts like [m]<C-o>[m] which are otherwise hidden in Xulmus. When
Vimperator mode is temporarily disabled with [m]<C-z>[m], [m]<C-v>[m] will pass Xulmus mode is temporarily disabled with [m]<C-z>[m], [m]<C-v>[m] will pass
the next key to Vimperator instead of the web page. the next key to Xulmus instead of the web page.
________________________________________________________________________________ ________________________________________________________________________________
section:Opening{nbsp}web{nbsp}pages[opening] section:Opening{nbsp}web{nbsp}pages[opening]
@@ -52,7 +52,7 @@ Each token is analyzed and in this order:
3. Opened with the default search engine or keyword (specified with the 3. Opened with the default search engine or keyword (specified with the
'defsearch' option) if the first word is no search engine ([c]:open linus 'defsearch' option) if the first word is no search engine ([c]:open linus
torvalds[c] opens a Google search for linux torvalds). torvalds[c] opens a Google search for linux torvalds).
4. Passed directly to Firefox in all other cases ([c]:open www.osnews.com, 4. Passed directly to Songbird in all other cases ([c]:open www.osnews.com,
www.slashdot.org[c] opens OSNews in the current, and Slashdot in a new www.slashdot.org[c] opens OSNews in the current, and Slashdot in a new
background tab). background tab).
@@ -100,13 +100,6 @@ like [m]o[m] but preselects current URL in the [c]:open[c] query.
________________________________________________________________________________ ________________________________________________________________________________
|:winopen| |:wopen| |:winedit|
||:wino[pen][!] [a][arg1][a], [a][arg2][a], ...|| +
________________________________________________________________________________
Just like [c]:tabopen[c] but opens the resulting web page(s) in a new window.
________________________________________________________________________________
|<MiddleMouse>| |p| + |<MiddleMouse>| |p| +
||p|| ||p||
________________________________________________________________________________ ________________________________________________________________________________
@@ -286,7 +279,7 @@ section:Quitting[quitting,save-session]
||:q[uit]|| ||:q[uit]||
________________________________________________________________________________ ________________________________________________________________________________
Quit current tab. If this is the last tab in the window, close the window. If Quit current tab. If this is the last tab in the window, close the window. If
this was the last window, close Vimperator. When quitting Vimperator, the this was the last window, close Xulmus. When quitting Xulmus, the
session is not stored. session is not stored.
________________________________________________________________________________ ________________________________________________________________________________
@@ -294,23 +287,16 @@ ________________________________________________________________________________
|:qa| |:qall| |:quita| |:quitall| + |:qa| |:qall| |:quita| |:quitall| +
||:quita[ll]|| ||:quita[ll]||
________________________________________________________________________________ ________________________________________________________________________________
Quit Vimperator. Quit Vimperator, no matter how many tabs/windows are open. Quit Xulmus. Quit Xulmus, no matter how many tabs/windows are open.
The session is not stored. The session is not stored.
________________________________________________________________________________ ________________________________________________________________________________
|:wc| |:wclose| |:winc| |:winclose|
||:winc[lose]|| +
________________________________________________________________________________
Close window.
________________________________________________________________________________
|:xa| |:xall| |:wq| |:wqa| |:wqall| |:xa| |:xall| |:wq| |:wqa| |:wqall|
||:wqa[ll]|| + ||:wqa[ll]|| +
||:xa[ll]|| ||:xa[ll]||
________________________________________________________________________________ ________________________________________________________________________________
Save the session and quit. Quit Vimperator, no matter how many tabs/windows Save the session and quit. Quit Xulmus, no matter how many tabs/windows
are open. The session is stored. [c]:wq[c] is different from Vim, as it are open. The session is stored. [c]:wq[c] is different from Vim, as it
closes the window instead of just one tab by popular demand. Complain on the closes the window instead of just one tab by popular demand. Complain on the
mailing list, if you want to change that. mailing list, if you want to change that.
@@ -327,7 +313,7 @@ ________________________________________________________________________________
|ZZ| |ZZ|
||ZZ|| ||ZZ||
________________________________________________________________________________ ________________________________________________________________________________
Quit and save the session. Quit Vimperator, no matter how many tabs/windows Quit and save the session. Quit Xulmus, no matter how many tabs/windows
are open. The session is stored. Works like [c]:xall[c]. are open. The session is stored. Works like [c]:xall[c].
________________________________________________________________________________ ________________________________________________________________________________

4
xulmus/locale/en-US/buffer.txt Executable file → Normal file
View File

@@ -2,7 +2,7 @@ HEADER
|buffer| |document| + |buffer| |document| +
Vimperator holds exactly one buffer object for each tab. It is usually an Xulmus holds exactly one buffer object for each tab. It is usually an
(X)HTML document with advanced features. (X)HTML document with advanced features.
section:Buffer{nbsp}information[buffer-information] section:Buffer{nbsp}information[buffer-information]
@@ -234,7 +234,7 @@ default zoom levels are 30%, 50%, 67%, 80%, 90%, 100%, 110%, 120%, 133%, 150%,
170%, 200%, 240%, 300%. 170%, 200%, 240%, 300%.
The available zoom range can be changed by setting the \'zoom.minPercent' and The available zoom range can be changed by setting the \'zoom.minPercent' and
\'zoom.maxPercent' Firefox preferences. The zoom levels can be changed using \'zoom.maxPercent' Songbird preferences. The zoom levels can be changed using
the \'toolkit.ZoomManager.zoomLevels' preference. the \'toolkit.ZoomManager.zoomLevels' preference.
Note: \'toolkit.ZoomManager.zoomLevels' is specified as a list of values Note: \'toolkit.ZoomManager.zoomLevels' is specified as a list of values

0
xulmus/locale/en-US/cmdline.txt Executable file → Normal file
View File

2
xulmus/locale/en-US/developer.txt Executable file → Normal file
View File

@@ -60,7 +60,7 @@ Some notes about the code above:
automatically marked up as an argument. automatically marked up as an argument.
There are also some additional asciidoc commands specifically for writing There are also some additional asciidoc commands specifically for writing
Vimperator documentation: Xulmus documentation:
- *$$section:Writing{nbsp}documentation[writing-docs,documentation]$$* Creates - *$$section:Writing{nbsp}documentation[writing-docs,documentation]$$* Creates
a new section like _Writing Documentation_ in this help file with 2 tags. a new section like _Writing Documentation_ in this help file with 2 tags.

4
xulmus/locale/en-US/eval.txt Executable file → Normal file
View File

@@ -53,10 +53,10 @@ passing the argument to `eval()`.
is found, and interpret them with the JavaScript _eval()_ function. is found, and interpret them with the JavaScript _eval()_ function.
The special version [c]:javascript![c] opens the JavaScript console of The special version [c]:javascript![c] opens the JavaScript console of
Firefox. Songbird.
[m]<Tab>[m] completion is available for [c]:javascript {cmd}<Tab>[c] (but not [m]<Tab>[m] completion is available for [c]:javascript {cmd}<Tab>[c] (but not
yet for the [c]:js <<EOF[c] multiline widget). Be aware that Vimperator needs yet for the [c]:js <<EOF[c] multiline widget). Be aware that Xulmus needs
to run {cmd} through eval() to get the completions, which could have unwanted to run {cmd} through eval() to get the completions, which could have unwanted
side effects. side effects.
________________________________________________________________________________ ________________________________________________________________________________

45
xulmus/locale/en-US/gui.txt Executable file → Normal file
View File

@@ -2,7 +2,7 @@ HEADER
|gui| + |gui| +
Although Vimperator offers the most frequently used Firefox functionality via Although Xulmus offers the most frequently used Songbird functionality via
Ex and Normal mode commands there may be times when directly accessing the GUI Ex and Normal mode commands there may be times when directly accessing the GUI
is required. There are commands for accessing the menu system, standard dialogs is required. There are commands for accessing the menu system, standard dialogs
and the sidebar. and the sidebar.
@@ -11,7 +11,7 @@ and the sidebar.
||:emenu {menu}|| ||:emenu {menu}||
________________________________________________________________________________ ________________________________________________________________________________
Execute {menu} from the command line. This command provides command-line access Execute {menu} from the command line. This command provides command-line access
to all menu items available from the main Firefox menubar. {menu} is a to all menu items available from the main Songbird menubar. {menu} is a
hierarchical path to the menu item with each submenu separated by a period. hierarchical path to the menu item with each submenu separated by a period.
E.g. [c]:emenu File.Open File...[c] E.g. [c]:emenu File.Open File...[c]
________________________________________________________________________________ ________________________________________________________________________________
@@ -20,45 +20,39 @@ ________________________________________________________________________________
|:addo| |:addons| + |:addo| |:addons| +
||:addo[ns]|| ||:addo[ns]||
________________________________________________________________________________ ________________________________________________________________________________
Show available Browser Extensions and Themes. Show available Songbird Extensions and Themes.
You can add/remove/disable browser extensions from this dialog. You can add/remove/disable extensions from this dialog.
Be aware that not all Firefox extensions work, because Vimperator overrides Be aware that not all Songbird extensions work, because Xulmus overrides
some key bindings and changes Firefox's GUI. some key bindings and changes Songbird's GUI.
________________________________________________________________________________ ________________________________________________________________________________
|:dia| |:dialog| |:dia| |:dialog|
||:dia[log] [a][firefox-dialog][a]|| + ||:dia[log] [a][songbird-dialog][a]|| +
________________________________________________________________________________ ________________________________________________________________________________
Open a Firefox dialog. Open a Songbird dialog.
Available dialogs: Available dialogs:
`------------------`----------------------------------- `------------------`-----------------------------------
*about* About Firefox *about* About Songbird
*addbookmark* Add bookmark for the current page
*addons* Manage Add-ons *addons* Manage Add-ons
*bookmarks* List your bookmarks
*checkupdates* Check for updates *checkupdates* Check for updates
*cleardata* Clear private data *cleardata* Clear private data
*cookies* List your cookies *cookies* List your cookies
*console* JavaScript console *console* JavaScript console
*customizetoolbar* Customize the Toolbar
*dominspector* DOM Inspector *dominspector* DOM Inspector
*downloads* Manage Downloads *downloads* Manage Downloads
*history* List your history
*import* Import Preferences, Bookmarks, History, etc. from other browsers
*openfile* Open the file selector dialog *openfile* Open the file selector dialog
*pageinfo* Show information about the current page
*pagesource* View page source *pagesource* View page source
*places* Places Organizer: Manage your bookmarks and history *places* Places Organizer: Manage your bookmarks and history
*preferences* Show Firefox preferences dialog *preferences* Show Songbird preferences dialog
*printpreview* Preview the page before printing
*printsetup* Setup the page size and orientation before printing *printsetup* Setup the page size and orientation before printing
*print* Show print dialog *print* Show print dialog
*saveframe* Save frame to disk *saveframe* Save frame to disk
*savepage* Save page to disk *savepage* Save page to disk
*searchengines* Manage installed search engines *searchengines* Manage installed search engines
*selectionsource* View selection source *selectionsource* View selection source
*subscribe* Add a new subscription
------------------------------------------------------- -------------------------------------------------------
________________________________________________________________________________ ________________________________________________________________________________
@@ -67,24 +61,23 @@ ________________________________________________________________________________
|:dl| |:downl| |:downloads| + |:dl| |:downl| |:downloads| +
||:downl[oads]|| ||:downl[oads]||
________________________________________________________________________________ ________________________________________________________________________________
Show progress of current downloads. Open the original Firefox download dialog Show progress of current downloads. Open the original Songbird download dialog
in a new tab. Here, downloads can be paused, canceled and resumed. in a new tab. Here, downloads can be paused, canceled and resumed.
________________________________________________________________________________ ________________________________________________________________________________
|:sbcl| |:sbclose| + |:dpcl| |:dpclose| +
||:sbcl[ose]|| ||:dpcl[ose] {pane}||
________________________________________________________________________________ ________________________________________________________________________________
Close the sidebar window. Close the specified display pane.
________________________________________________________________________________ ________________________________________________________________________________
|:sbope| |:sbopen| |:sb| |:sbar| |:sideb| |:sidebar| + |:dpope| |:dpopen| |:dp| |:dpane| |:dislplayp| |:dislplaypane|
||:sidebar {name}|| ||:displaypane {pane}|| +
________________________________________________________________________________ ________________________________________________________________________________
Open the sidebar window. {name} is any of the menu items listed under the Open the specified display pane. {pane} is any of "content pane bottom",
standard Firefox View->Sidebar menu. Add-ons, Preferences and Downloads are "service pane bottom" or "right sidebar".
also available in the sidebar.
________________________________________________________________________________ ________________________________________________________________________________
// vim: set filetype=asciidoc: // vim: set filetype=asciidoc:

0
xulmus/locale/en-US/help.js Executable file → Normal file
View File

2
xulmus/locale/en-US/hints.txt Executable file → Normal file
View File

@@ -25,7 +25,7 @@ ________________________________________________________________________________
Start QuickHint mode, but open link in a new tab. Like normal QuickHint Start QuickHint mode, but open link in a new tab. Like normal QuickHint
mode (activated with [m]f[m]) but opens the link in a new tab. The new mode (activated with [m]f[m]) but opens the link in a new tab. The new
tab will be loaded in background according to the tab will be loaded in background according to the
\'browser.tabs.loadInBackground' Firefox preference. \'browser.tabs.loadInBackground' Songbird preference.
________________________________________________________________________________ ________________________________________________________________________________

64
xulmus/locale/en-US/index.txt Executable file → Normal file
View File

@@ -4,6 +4,41 @@ HEADER
This file contains a list of all available commands. This file contains a list of all available commands.
section:Player{nbsp}mode[player-index]
||[m]x[m]|| Play the current track +
||[m]z[m]|| Play the previous track +
||[m]b[m]|| Play the next track +
||[m]c[m]|| Pause/unpause the current track +
||[m]v[m]|| Stop playing the current track +
||[m]t[m]|| Toggle shuffle mode +
||[m]r[m]|| Toggle repeat mode +
||[m]i[m]|| Select the currently playing track +
||[m]f[m]|| Filter and play tracks +
||[m]F[m]|| Filter and show the tracks as a view +
||[m]h[m]|| Seek -10s +
||[m]<Left>[m]|| Seek -10s +
||[m]l[m]|| Seek +10s +
||[m]<Right>[m]|| Seek -10s +
||[m]H[m]|| Seek -1m +
||[m]<S-Left>[m]|| Seek -10s +
||[m]L[m]|| Seek +1m +
||[m]<S-Right>[m]|| Seek -10s +
||[m]+[m]|| Increase volume by 10% +
||[m]-[m]|| Decrease volume by 10% +
||[m]/[m]|| Search forward for a track +
||[m]n[m]|| Find the next track +
||[m]N[m]|| Find the previous track +
// TODO: better formatting
||<C-0>|| Rate the current track with 0 stars +
||<C-1>|| Rate the current track with 1 stars +
||<C-2>|| Rate the current track with 2 stars +
||<C-3>|| Rate the current track with 3 stars +
||<C-4>|| Rate the current track with 4 stars +
||<C-5>|| Rate the current track with 5 stars +
section:Insert{nbsp}mode[insert-index] section:Insert{nbsp}mode[insert-index]
||[m]<C-i>[m]|| Launch the external editor + ||[m]<C-i>[m]|| Launch the external editor +
@@ -24,7 +59,7 @@ section:Normal{nbsp}mode[normal-index]
||[m]<C-u>[m]|| Scroll window upwards in the buffer + ||[m]<C-u>[m]|| Scroll window upwards in the buffer +
||[m]<C-v>[m]|| Pass through next key + ||[m]<C-v>[m]|| Pass through next key +
||[m]<C-x>[m]|| Decrement last number in URL + ||[m]<C-x>[m]|| Decrement last number in URL +
||[m]<C-z>[m]|| Temporarily ignore all Vimperator key bindings + ||[m]<C-z>[m]|| Temporarily ignore all Xulmus key bindings +
||[m]<Esc>[m]|| Focus content + ||[m]<Esc>[m]|| Focus content +
@@ -141,6 +176,18 @@ section:Command-line{nbsp}editing[ex-edit-index]
section:Ex{nbsp}commands[ex-cmd-index,:index] section:Ex{nbsp}commands[ex-cmd-index,:index]
||[c]:playerplay[c]|| Play the current track +
||[c]:playerprev[c]|| Play the previous track +
||[c]:playernext[c]|| Play the next track +
||[c]:playerpause[c]|| Pause/unpause the current track +
||[c]:playerstop[c]|| Stop playing the current track +
||[c]:filter[c]|| Filter and play tracks +
||[c]:Filter[c]|| Filter and show the tracks as a view +
||[c]:seek[c]|| Seek to an absolute or relative position in a track +
||[c]:volume[c]|| Set the player volume +
||[c]:load[c]|| Load a playlist +
||[c]:mediaview[c]|| Change the media view +
||[c]:![c]|| Run a command + ||[c]:![c]|| Run a command +
||[c]:abbreviate[c]|| Abbreviate a key sequence + ||[c]:abbreviate[c]|| Abbreviate a key sequence +
||[c]:abclear[c]|| Remove all abbreviations + ||[c]:abclear[c]|| Remove all abbreviations +
@@ -174,6 +221,8 @@ section:Ex{nbsp}commands[ex-cmd-index,:index]
||[c]:doautoall[c]|| Apply the autocommands matching the specified URL to all buffers + ||[c]:doautoall[c]|| Apply the autocommands matching the specified URL to all buffers +
||[c]:doautocmd[c]|| Apply the autocommands matching the specified URL to the current buffer + ||[c]:doautocmd[c]|| Apply the autocommands matching the specified URL to the current buffer +
||[c]:downloads[c]|| Show progress of current downloads + ||[c]:downloads[c]|| Show progress of current downloads +
||[c]:displaypane[c]|| Open the specified display pane +
||[c]:dpclose[c]|| Close the specified display pane +
||[c]:echo[c]|| Echo the expression + ||[c]:echo[c]|| Echo the expression +
||[c]:echoerr[c]|| Echo the expression as an error message + ||[c]:echoerr[c]|| Echo the expression as an error message +
||[c]:echomsg[c]|| Echo the expression as an informational message + ||[c]:echomsg[c]|| Echo the expression as an informational message +
@@ -184,7 +233,7 @@ section:Ex{nbsp}commands[ex-cmd-index,:index]
||[c]:forward[c]|| Go forward in the browser history + ||[c]:forward[c]|| Go forward in the browser history +
||[c]:hardcopy[c]|| Print current document + ||[c]:hardcopy[c]|| Print current document +
||[c]:help[c]|| Display help + ||[c]:help[c]|| Display help +
||[c]:highlight[c]|| Style Vimperator + ||[c]:highlight[c]|| Style Xulmus +
||[c]:history[c]|| Show recently visited URLs + ||[c]:history[c]|| Show recently visited URLs +
||[c]:iabbrev[c]|| Abbreviate a key sequence in Insert mode + ||[c]:iabbrev[c]|| Abbreviate a key sequence in Insert mode +
||[c]:iabclear[c]|| Remove all abbreviations in Insert mode + ||[c]:iabclear[c]|| Remove all abbreviations in Insert mode +
@@ -203,7 +252,7 @@ section:Ex{nbsp}commands[ex-cmd-index,:index]
||[c]:mark[c]|| Mark current location within the web page + ||[c]:mark[c]|| Mark current location within the web page +
||[c]:marks[c]|| Show all location marks of current web page + ||[c]:marks[c]|| Show all location marks of current web page +
||[c]:messages[c]|| Display previously given messages + ||[c]:messages[c]|| Display previously given messages +
||[c]:mkvimperatorrc[c]|| Write current key mappings and changed options to the config file + ||[c]:mkxulmusrc[c]|| Write current key mappings and changed options to the config file +
||[c]:nohlsearch[c]|| Remove the search highlighting + ||[c]:nohlsearch[c]|| Remove the search highlighting +
||[c]:noremap[c]|| Map a key sequence without remapping keys + ||[c]:noremap[c]|| Map a key sequence without remapping keys +
||[c]:normal[c]|| Execute Normal mode commands + ||[c]:normal[c]|| Execute Normal mode commands +
@@ -212,7 +261,7 @@ section:Ex{nbsp}commands[ex-cmd-index,:index]
||[c]:pageinfo[c]|| Show various page information + ||[c]:pageinfo[c]|| Show various page information +
||[c]:pagestyle[c]|| Select the author style sheet to apply + ||[c]:pagestyle[c]|| Select the author style sheet to apply +
||[c]:play[c]|| Replay a recorded macro + ||[c]:play[c]|| Replay a recorded macro +
||[c]:preferences[c]|| Show Firefox preferences dialog + ||[c]:preferences[c]|| Show Songbird preferences dialog +
||[c]:pwd[c]|| Print the current directory name + ||[c]:pwd[c]|| Print the current directory name +
||[c]:qmark[c]|| Mark a URL with a letter for quick access + ||[c]:qmark[c]|| Mark a URL with a letter for quick access +
||[c]:qmarks[c]|| Show all QuickMarks + ||[c]:qmarks[c]|| Show all QuickMarks +
@@ -224,13 +273,11 @@ section:Ex{nbsp}commands[ex-cmd-index,:index]
||[c]:restart[c]|| Force undefined to restart + ||[c]:restart[c]|| Force undefined to restart +
||[c]:runtime[c]|| Source the specified file from each directory in 'runtimepath' + ||[c]:runtime[c]|| Source the specified file from each directory in 'runtimepath' +
||[c]:saveas[c]|| Save current document to disk + ||[c]:saveas[c]|| Save current document to disk +
||[c]:sbclose[c]|| Close the sidebar window +
||[c]:scriptnames[c]|| List all sourced script names + ||[c]:scriptnames[c]|| List all sourced script names +
||[c]:set[c]|| Set an option + ||[c]:set[c]|| Set an option +
||[c]:setglobal[c]|| Set global option + ||[c]:setglobal[c]|| Set global option +
||[c]:setlocal[c]|| Set local option + ||[c]:setlocal[c]|| Set local option +
||[c]:sidebar[c]|| Open the sidebar window + ||[c]:style[c]|| Style Xulmus and web sites +
||[c]:style[c]|| Style Vimperator and web sites +
||[c]:source[c]|| Read Ex commands from a file + ||[c]:source[c]|| Read Ex commands from a file +
||[c]:stop[c]|| Stop loading + ||[c]:stop[c]|| Stop loading +
||[c]:tab[c]|| Execute a command and tell it to output in a new tab + ||[c]:tab[c]|| Execute a command and tell it to output in a new tab +
@@ -252,8 +299,6 @@ section:Ex{nbsp}commands[ex-cmd-index,:index]
||[c]:version[c]|| Show version information + ||[c]:version[c]|| Show version information +
||[c]:viewsource[c]|| View source code of current document + ||[c]:viewsource[c]|| View source code of current document +
||[c]:viusage[c]|| List all mappings with a short description + ||[c]:viusage[c]|| List all mappings with a short description +
||[c]:winclose[c]|| Close window +
||[c]:winopen[c]|| Open one or more URLs in a new window +
||[c]:wqall[c]|| Save the session and quit + ||[c]:wqall[c]|| Save the session and quit +
||[c]:zoom[c]|| Set zoom value of current web page + ||[c]:zoom[c]|| Set zoom value of current web page +
@@ -284,6 +329,7 @@ section:Options[option-index]
||'laststatus'|| Show the status line + ||'laststatus'|| Show the status line +
||'linksearch'|| Limit the search to hyperlink text + ||'linksearch'|| Limit the search to hyperlink text +
||'loadplugins'|| Load plugin scripts when starting up + ||'loadplugins'|| Load plugin scripts when starting up +
||'maxitems'|| Maximum number of items to display at once in a listing +
||'messages'|| Number of messages to store in the message history + ||'messages'|| Number of messages to store in the message history +
||'more'|| Pause the message list window when more than one screen of listings is displayed + ||'more'|| Pause the message list window when more than one screen of listings is displayed +
||'newtab'|| Define which commands should output in a new tab by default + ||'newtab'|| Define which commands should output in a new tab by default +

0
xulmus/locale/en-US/insert.txt Executable file → Normal file
View File

43
xulmus/locale/en-US/intro.txt Executable file → Normal file
View File

@@ -1,31 +1,25 @@
LOGO LOGO
+++<div style="text-align: center;">+++
*First there was a Navigator, then there was an Explorer.
Later it was time for a Konqueror. Now it's time for an Imperator, the
VIMperator :)*
+++</div>+++
section:Introduction[intro] section:Introduction[intro]
http://vimperator.org[Vimperator] is a free browser add-on for Firefox, http://vimperator.org/Xulmus[Xulmus] is a free media player add-on for
which makes it look and behave like the http://www.vim.org[Vim] Songbird, which combines the best features of the
text editor. It has similar key bindings, and you could call it a modal http://cmus.sourceforge.net[CMus] music player and the http://www.vim.org[Vim]
web browser, as key bindings differ according to which mode you are in. text editor.
|warning| + |warning| +
Warning: Warning:
To provide the most authentic Vim experience, the Firefox menubar and toolbar To provide the most authentic CMus/Vim experience, the Songbird toolbar
are hidden. + is hidden. +
If you really need them, type: [c]:set guioptions+=mT[c] to get them back. + If you really need it, type: [c]:set guioptions+=T[c] to get it back. +
If you don't like Vimperator at all, you can uninstall it by typing If you don't like Xulmus at all, you can uninstall it by typing
[c]:addons[c] and remove/disable it. + [c]:addons[c] and remove/disable it. +
If you like it but can't remember the shortcuts, then press [m]F1[m] or 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. [c]:help[c] to get this help window back.
|author| |donation| + |author| |donation| +
Vimperator was written by mailto:stubenschrott@gmx.net[Martin Stubenschrott]. Xulmus was written by mailto:prathyushthota@gmail.com[Prathyush Thota].
If you appreciate my work on Vimperator and want to encourage me working on it If you appreciate my work on Xulmus and want to encourage me working on it
more, you can either send me greetings, patches or make a donation: more, you can either send me greetings, patches or make a donation:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -38,14 +32,15 @@ more, you can either send me greetings, patches or make a donation:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Of course as a believer in free open source software, only make a donation Of course as a believer in free open source software, only make a donation
if you really like Vimperator and the money doesn't hurt -- otherwise just use if you really like Xulmus and the money doesn't hurt -- otherwise just use
it, recommend it and like it :) it, recommend it and like it :)
section:Help{nbsp}topics[overview] section:Help{nbsp}topics[overview]
- help:Tutorial[tutorial.html]: A quick-start tutorial for new users. //- help:Tutorial[tutorial.html]: A quick-start tutorial for new users.
- help:Initialization[starting.html]: How Vimperator starts up, where it reads - help:Initialization[starting.html]: How Xulmus starts up, where it reads
the config file... the config file...
- help:Player[player.html]: Interacting with the media player.
- help:Browsing[browsing.html]: Basic mappings and commands needed for a - help:Browsing[browsing.html]: Basic mappings and commands needed for a
browsing session (how to open a web page or go back in history). browsing session (how to open a web page or go back in history).
- help:Buffer{nbsp}commands[buffer.html]: Operations on the current document - help:Buffer{nbsp}commands[buffer.html]: Operations on the current document
@@ -65,8 +60,8 @@ section:Help{nbsp}topics[overview]
- help:Autocommands[autocommands.html]: Automatically executing code on certain - help:Autocommands[autocommands.html]: Automatically executing code on certain
events. events.
- help:Print[print.html]: Printing pages. - help:Print[print.html]: Printing pages.
- help:GUI[gui.html]: Accessing Firefox menus, dialogs and the sidebar. - help:GUI[gui.html]: Accessing Songbird menus, dialogs and the sidebar.
- help:Styling[styling.html]: Changing the styling of content pages and Vimperator itself. - help:Styling[styling.html]: Changing the styling of content pages and Xulmus itself.
- help:Messages[message.html]: A description of messages and error messages. - help:Messages[message.html]: A description of messages and error messages.
- help:Developer{nbsp}information[developer.html]: How to write docs or - help:Developer{nbsp}information[developer.html]: How to write docs or
plugins. plugins.
@@ -87,11 +82,11 @@ section:Features[features]
* Advanced completion of bookmark and history URLs (searching also in title, not only URL) * Advanced completion of bookmark and history URLs (searching also in title, not only URL)
* Vim-like statusline with a wget-like progress bar * Vim-like statusline with a wget-like progress bar
* Minimal GUI (easily hide useless menubar and toolbar with [c]:set guioptions=[c]) * Minimal GUI (easily hide useless menubar and toolbar with [c]:set guioptions=[c])
* Ability to [c]:source[c] JavaScript files, and to use a [a]~/.vimperatorrc[a] file * Ability to [c]:source[c] JavaScript files, and to use a [a]~/.xulmusrc[a] file
with syntax highlighting if you install scripts/vimperator.vim with syntax highlighting if you install scripts/xulmus.vim
* Easy quick searches ([c]:open foo[c] will search for "foo" in google, * Easy quick searches ([c]:open foo[c] will search for "foo" in google,
[c]:open ebay terminator[c] will search for "terminator" on ebay) [c]:open ebay terminator[c] will search for "terminator" on ebay)
with support for Firefox keyword bookmarks and search engines with support for Songbird keyword bookmarks and search engines
* Count supported for many commands ([m]3<C-o>[m] will go back 3 pages) * Count supported for many commands ([m]3<C-o>[m] will go back 3 pages)
* Beep on errors * Beep on errors
* Marks support ([m]ma[m] to set mark a on a web page, [m]'a[m] to go there) * Marks support ([m]ma[m] to set mark a on a web page, [m]'a[m] to go there)

14
xulmus/locale/en-US/map.txt Executable file → Normal file
View File

@@ -58,7 +58,7 @@ Map the key sequence {lhs} to {rhs}. The {rhs} is remapped, allowing for
nested and recursive mappings. nested and recursive mappings.
Warning: Mappings are NOT saved between sessions, make sure you put them in your Warning: Mappings are NOT saved between sessions, make sure you put them in your
vimperatorrc file! xulmusrc file!
________________________________________________________________________________ ________________________________________________________________________________
@@ -71,7 +71,7 @@ Map the key sequence {lhs} to {rhs} (in Command-line mode). The {rhs} is
remapped, allowing for nested and recursive mappings. remapped, allowing for nested and recursive mappings.
Warning: Mappings are NOT saved between sessions, make sure you put them in your Warning: Mappings are NOT saved between sessions, make sure you put them in your
vimperatorrc file! xulmusrc file!
________________________________________________________________________________ ________________________________________________________________________________
@@ -84,7 +84,7 @@ Map the key sequence {lhs} to {rhs} (in Insert mode). The {rhs} is remapped,
allowing for nested and recursive mappings. allowing for nested and recursive mappings.
Warning: Mappings are NOT saved between sessions, make sure you put them in your Warning: Mappings are NOT saved between sessions, make sure you put them in your
vimperatorrc file! xulmusrc file!
________________________________________________________________________________ ________________________________________________________________________________
@@ -172,7 +172,7 @@ ________________________________________________________________________________
section:Abbreviations[abbreviations] section:Abbreviations[abbreviations]
Vimperator can automatically replace words identified as abbreviations, Xulmus can automatically replace words identified as abbreviations,
which may be used to save typing or to correct commonly misspelled which may be used to save typing or to correct commonly misspelled
words. An abbreviation can be one of three types that are defined by the words. An abbreviation can be one of three types that are defined by the
types of constituent characters. Whitespace and quotes are non-keyword types of constituent characters. Whitespace and quotes are non-keyword
@@ -319,7 +319,7 @@ Completion can be enabled by specifying one of the following arguments to the
*buffer* buffers *buffer* buffers
*color* color schemes *color* color schemes
*command* Ex commands *command* Ex commands
*dialog* Firefox dialogs *dialog* Songbird dialogs
*dir* directories *dir* directories
*environment* environment variables *environment* environment variables
*event* autocommand events *event* autocommand events
@@ -330,8 +330,8 @@ Completion can be enabled by specifying one of the following arguments to the
*macro* named macros *macro* named macros
*mapping* user mappings *mapping* user mappings
*menu* menu items *menu* menu items
*option* Vimperator options *option* Xulmus options
*preference* Firefox preferences *preference* Songbird preferences
*search* search engines and keywords *search* search engines and keywords
*shellcmd* shell commands *shellcmd* shell commands
*sidebar* sidebar panels *sidebar* sidebar panels

4
xulmus/locale/en-US/marks.txt Executable file → Normal file
View File

@@ -2,14 +2,14 @@ HEADER
|different-marks| |marks| + |different-marks| |marks| +
Vimperator supports a number of different marks: Xulmus supports a number of different marks:
- Bookmarks which allow you to mark a web page as one of your favorites for - Bookmarks which allow you to mark a web page as one of your favorites for
easy access. easy access.
- QuickMarks allow you to define up to 62 (a-zA-Z0-9) web sites (or groups of - QuickMarks allow you to define up to 62 (a-zA-Z0-9) web sites (or groups of
web sites) which you visit most often. web sites) which you visit most often.
- Local marks to store the position within a web page. - Local marks to store the position within a web page.
- History is also a special type of marks, as Vimperator automatically - History is also a special type of marks, as Xulmus automatically
remembers sites which you have visited in the past. remembers sites which you have visited in the past.
section:Bookmarks[bookmarks] section:Bookmarks[bookmarks]

2
xulmus/locale/en-US/message.txt Executable file → Normal file
View File

@@ -2,7 +2,7 @@ HEADER
|message-history| + |message-history| +
Vimperator stores all info and error messages in a message history. The type of Xulmus stores all info and error messages in a message history. The type of
info messages output can be controlled by the 'verbose' option. info messages output can be controlled by the 'verbose' option.
|:mes| |:messages| + |:mes| |:messages| +

76
xulmus/locale/en-US/options.txt Executable file → Normal file
View File

@@ -2,7 +2,7 @@ HEADER
|options| + |options| +
Vimperator has a number of internal variables and switches which can be set to Xulmus has a number of internal variables and switches which can be set to
achieve special effects. These options come in 5 forms: achieve special effects. These options come in 5 forms:
`------------`----------------------------------------- `------------`-----------------------------------------
*boolean* can only be on or off *boolean* can only be on or off
@@ -155,35 +155,35 @@ Environment variables are expanded for path options like 'cdpath' and
'runtimepath'. The variable notation is _$VAR_ (terminated by a non-word 'runtimepath'. The variable notation is _$VAR_ (terminated by a non-word
character) or _$\\{VAR}_. _%VAR%_ is also supported on Windows. character) or _$\\{VAR}_. _%VAR%_ is also supported on Windows.
section:Setting{nbsp}Firefox{nbsp}options[firefox-options,preferences] section:Setting{nbsp}Songbird{nbsp}options[songbird-options,preferences]
Firefox options can be viewed and set with the following commands: Songbird options can be viewed and set with the following commands:
|:prefs| |:preferences| |:prefs| |:preferences|
||:pref[erences]|| ||:pref[erences]||
________________________________________________________________________________ ________________________________________________________________________________
Show the Firefox preferences dialog. You can change the browser preferences Show the Songbird preferences dialog. You can change the player preferences
from this dialog. Be aware that not all Firefox preferences work, because from this dialog. Be aware that not all Songbird preferences work, because
Vimperator overrides some key bindings and changes Firefox's GUI. Xulmus overrides some key bindings and changes Songbird's GUI.
________________________________________________________________________________ ________________________________________________________________________________
|:prefs!| |:preferences!| |:prefs!| |:preferences!|
||:pref[erences]!|| ||:pref[erences]!||
________________________________________________________________________________ ________________________________________________________________________________
Opens about:config in the current tab where you can change advanced Firefox Opens about:config in the current tab where you can change advanced Songbird
preferences. preferences.
________________________________________________________________________________ ________________________________________________________________________________
|:set!| |:set-!| |:set!| |:set-!|
||:se[t]! {preference}={value}|| + ||:se[t]! {preference}={value}|| +
________________________________________________________________________________ ________________________________________________________________________________
Change any Firefox {preference} (those in the about:config window). You can also Change any Songbird {preference} (those in the about:config window). You can
reset/delete those preferences with [c]:set! {preference}&[c]. also reset/delete those preferences with [c]:set! {preference}&[c].
________________________________________________________________________________ ________________________________________________________________________________
|overridden-preferences| + |overridden-preferences| +
Vimperator sets several Firefox preferences at startup. If this is undesirable, Xulmus sets several Songbird preferences at startup. If this is undesirable,
they can be changed to a different value in your RC file using they can be changed to a different value in your RC file using
[c]:set! {preference}={value}[c] [c]:set! {preference}={value}[c]
@@ -231,7 +231,7 @@ Items which are completed at the [c]:[tab]open[c] prompt. Available items:
`---`-------------------------------------------------------------------------------- `---`--------------------------------------------------------------------------------
*s* Search engines and keyword URLs *s* Search engines and keyword URLs
*f* Local files *f* Local files
*l* Firefox location bar entries (bookmarks and history sorted in an intelligent way) *l* Songbird location bar entries (bookmarks and history sorted in an intelligent way)
*b* Bookmarks *b* Bookmarks
*S* Suggest engines *S* Suggest engines
------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------
@@ -253,7 +253,7 @@ schwarzenegger[c] will be exactly the same as [c]:open youtube arnold
schwarzenegger[c]. Therefore, you need to add a keyword or search engine schwarzenegger[c]. Therefore, you need to add a keyword or search engine
"youtube" first. "youtube" first.
If 'defsearch' is empty, then Firefox will always attempt to open the If 'defsearch' is empty, then Songbird will always attempt to open the
raw [a][arg][a]. raw [a][arg][a].
____ ____
@@ -265,7 +265,7 @@ Set the external text editor.
Sets the editor to run when [m]<C-i>[m] is pressed in INSERT and TEXTAREA Sets the editor to run when [m]<C-i>[m] is pressed in INSERT and TEXTAREA
modes. modes.
Warning: Vimperator will not behave correctly if the editor forks its own Warning: Xulmus will not behave correctly if the editor forks its own
process, such as with gvim without the -f argument. process, such as with gvim without the -f argument.
____ ____
@@ -331,7 +331,7 @@ Show or hide certain GUI elements like the menu or toolbar. Supported characters
`---`----------- `---`-----------
*m* Menubar *m* Menubar
*T* Toolbar *T* Toolbar
*B* Bookmark bar *p* Player controls
*n* Tab number *n* Tab number
*N* Tab number over image *N* Tab number over image
*b* Bottom scrollbar *b* Bottom scrollbar
@@ -439,8 +439,8 @@ ____
||'insertmode' 'im'|| boolean (default: on) ||'insertmode' 'im'|| boolean (default: on)
____ ____
Use Insert mode as the default for text areas. Use Insert mode as the default for text areas.
Makes Vimperator work in a way that Insert mode is the default mode for text areas. Makes Xulmus work in a way that Insert mode is the default mode for text areas.
Useful if you want to use Vimperator as a modeless editor, keeping the known Firefox interface for editing text areas. Useful if you want to use Xulmus as a modeless editor, keeping the known Songbird interface for editing text areas.
____ ____
@@ -471,12 +471,20 @@ ____
||'loadplugins' 'lpl'|| boolean (default on) ||'loadplugins' 'lpl'|| boolean (default on)
____ ____
Load plugin scripts when starting up. When on, yet unloaded plugins are Load plugin scripts when starting up. When on, yet unloaded plugins are
automatically loaded after the vimperatorrc file has been sourced. To automatically loaded after the xulmusrc file has been sourced. To
load plugins earlier, use the [c]:loadplugins[c] command within the load plugins earlier, use the [c]:loadplugins[c] command within the
vimperatorrc. xulmusrc.
____ ____
|\'maxitems'|
||'maxitems'|| number (default: 20)
____
Maximum number of items to display at once in a listing.
____
|\'msgs'| |\'messages'| |\'msgs'| |\'messages'|
||'messages' 'msgs'|| number (default: 100) ||'messages' 'msgs'|| number (default: 100)
____ ____
@@ -555,12 +563,12 @@ they always open in a new tab. Possible values:
.---`------------------------------------------------------------------------------------------------ .---`------------------------------------------------------------------------------------------------
*0* Force to open in the current tab (Warning: this can stop some web sites from working correctly!) *0* Force to open in the current tab (Warning: this can stop some web sites from working correctly!)
*1* Always open in a new tab *1* Always open in a new tab
*2* Open in a new window if it has a specific requested size (default in Firefox) *2* Open in a new window if it has a specific requested size (default in Songbird)
*3* Always open in a new window *3* Always open in a new window
*4* Open in the same tab unless it has a specific requested size *4* Open in the same tab unless it has a specific requested size
----------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------------
Note: This option does not change the popup blocker of Firefox in any way. Note: This option does not change the popup blocker of Songbird in any way.
____ ____
@@ -570,7 +578,7 @@ ____
Speed up first time history/bookmark completion Speed up first time history/bookmark completion
History access can be quite slow for a large history. History access can be quite slow for a large history.
Vimperator maintains a cache to speed it up significantly on subsequent access. Xulmus maintains a cache to speed it up significantly on subsequent access.
In order to also speed up first time access, it is cached at startup, if this option is set (recommended). In order to also speed up first time access, it is cached at startup, if this option is set (recommended).
____ ____
@@ -587,23 +595,23 @@ link elements are those defined by 'hinttags'.
____ ____
|$VIMPERATOR_RUNTIME| |$XULMUS_RUNTIME|
|\'rtp'| |\'runtimepath'| |\'rtp'| |\'runtimepath'|
||'runtimepath' 'rtp'|| stringlist ||'runtimepath' 'rtp'|| stringlist
____ ____
(default: _$VIMPERATOR_RUNTIME_ or Unix, Mac: "\~/.vimperator", Windows: "\~/vimperator") (default: _$XULMUS_RUNTIME_ or Unix, Mac: "\~/.xulmus", Windows: "\~/xulmus")
List of directories searched for runtime files: + List of directories searched for runtime files: +
colors/ + colors/ +
macros/ + macros/ +
plugin/ + plugin/ +
Example: [c]:set runtimepath=\~/myvimperator,\~/.vimperator[c] + Example: [c]:set runtimepath=\~/myxulmus,\~/.xulmus[c] +
This will search for plugins in both "\~/myvimperator/plugin" and This will search for plugins in both "\~/myxulmus/plugin" and
"\~/.vimperator/plugin" "\~/.xulmus/plugin"
On startup, if the environment variable _$VIMPERATOR_RUNTIME_ does not On startup, if the environment variable _$XULMUS_RUNTIME_ does not
exist, Vimperator will set it to match this value. exist, Xulmus will set it to match this value.
____ ____
@@ -690,13 +698,13 @@ ____
|\'titlestring'| |\'titlestring'|
||'titlestring'|| string (default: "Vimperator") ||'titlestring'|| string (default: "Xulmus")
____ ____
Change the title of the browser window. Change the title of the player window.
Vimperator changes the browser title from "Title of web page - Mozilla Firefox" to Xulmus changes the player title from "Songbird" to
"Title of web page - Vimperator". + "Title of tab - Xulmus". +
If you don't like that, you can restore it with: If you don't like that, you can restore it with:
[c]:set titlestring=Mozilla\ Firefox[c]. [c]:set titlestring=Songbird[c].
____ ____
@@ -725,7 +733,7 @@ ____
||'verbose' 'vbs'|| number (default: 1) ||'verbose' 'vbs'|| number (default: 1)
____ ____
Define which info messages are displayed. Define which info messages are displayed.
When bigger than zero, Vimperator will give messages about what it is doing. When bigger than zero, Xulmus will give messages about what it is doing.
These can be viewed at any time with the [c]:messages[c] command. The highest These can be viewed at any time with the [c]:messages[c] command. The highest
value is 15, being the most verbose mode. value is 15, being the most verbose mode.

Some files were not shown because too many files have changed in this diff Show More