1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-24 07:02:38 +01:00

Basic Songbird 1.9a support.

--HG--
rename : xulmus/AUTHORS => melodactyl/AUTHORS
rename : xulmus/Makefile => melodactyl/Makefile
rename : xulmus/NEWS => melodactyl/NEWS
rename : xulmus/TODO => melodactyl/TODO
rename : xulmus/chrome.manifest => melodactyl/chrome.manifest
rename : xulmus/components/commandline-handler.js => melodactyl/components/commandline-handler.js
rename : xulmus/components/protocols.js => melodactyl/components/protocols.js
rename : xulmus/content/config.js => melodactyl/content/config.js
rename : xulmus/content/dactyl.dtd => melodactyl/content/dactyl.dtd
rename : xulmus/content/library.js => melodactyl/content/library.js
rename : xulmus/content/logo.png => melodactyl/content/logo.png
rename : xulmus/content/xulmus.xul => melodactyl/content/melodactyl.xul
rename : xulmus/content/player.js => melodactyl/content/player.js
rename : xulmus/content/xulmus.svg => melodactyl/content/xulmus.svg
rename : xulmus/contrib/vim/Makefile => melodactyl/contrib/vim/Makefile
rename : xulmus/contrib/vim/ftdetect/xulmus.vim => melodactyl/contrib/vim/ftdetect/melodactyl.vim
rename : xulmus/contrib/vim/mkvimball.txt => melodactyl/contrib/vim/mkvimball.txt
rename : xulmus/contrib/vim/syntax/xulmus.vim => melodactyl/contrib/vim/syntax/melodactyl.vim
rename : xulmus/defaults/preferences/dactyl.js => melodactyl/defaults/preferences/dactyl.js
rename : xulmus/install.rdf => melodactyl/install.rdf
rename : xulmus/locale/en-US/all.xml => melodactyl/locale/en-US/all.xml
rename : xulmus/locale/en-US/autocommands.xml => melodactyl/locale/en-US/autocommands.xml
rename : xulmus/locale/en-US/browsing.xml => melodactyl/locale/en-US/browsing.xml
rename : xulmus/locale/en-US/dactyl.dtd => melodactyl/locale/en-US/dactyl.dtd
rename : xulmus/locale/en-US/gui.xml => melodactyl/locale/en-US/gui.xml
rename : xulmus/locale/en-US/intro.xml => melodactyl/locale/en-US/intro.xml
rename : xulmus/locale/en-US/player.xml => melodactyl/locale/en-US/player.xml
rename : xulmus/locale/en-US/tabs.xml => melodactyl/locale/en-US/tabs.xml
rename : xulmus/skin/icon.png => melodactyl/skin/icon.png
This commit is contained in:
Kris Maglione
2010-10-02 10:44:19 -04:00
parent c0a5a680b8
commit a59d88fee7
40 changed files with 84 additions and 79 deletions

View File

@@ -117,24 +117,20 @@ const Bookmarks = Module("bookmarks", {
// also ensures that each search engine has a Dactyl-friendly alias
getSearchEngines: function getSearchEngines() {
let searchEngines = [];
let aliases = {};
for (let [, engine] in Iterator(services.get("browserSearch").getVisibleEngines({}))) {
let alias = engine.alias;
if (!alias || !/^[a-z0-9_-]+$/.test(alias))
if (!alias || !/^[a-z_-]+$/.test(alias))
alias = engine.name.replace(/^\W*([a-zA-Z_-]+).*/, "$1").toLowerCase();
if (!alias)
alias = "search"; // for search engines which we can't find a suitable alias
// make sure we can use search engines which would have the same alias (add numbers at the end)
let newAlias = alias;
for (let j = 1; j <= 10; j++) { // <=10 is intentional
if (!searchEngines.some(function (item) item[0] == newAlias))
break;
newAlias = alias + j;
}
// only write when it changed, writes are really slow
if (engine.alias != newAlias)
engine.alias = newAlias;
if (set.has(aliases, alias))
alias += ++aliases[alias];
else
aliases[alias] = 0;
if (engine.alias != alias)
engine.alias = alias;
searchEngines.push([engine.alias, engine.description, engine.iconURI && engine.iconURI.spec]);
}

View File

@@ -316,7 +316,7 @@ const CompletionContext = Class("CompletionContext", {
get message() this._message || (this.waitingForTab ? "Waiting for <Tab>" : null),
set message(val) this._message = val,
get proto() {
get itemPrototype() {
let res = {};
function result(quote) {
yield ["result", quote ? function () quote[0] + quote[1](this.text) + quote[2]
@@ -444,9 +444,9 @@ const CompletionContext = Class("CompletionContext", {
try {
// Item prototypes
let proto = this.proto;
let proto = this.itemPrototype;
if (!this.cache.constructed)
this.cache.constructed = items.map(function (item) Object.create(proto, { item: { value: item, enumerable: true } }));
this.cache.constructed = items.map(function (item) ({ __proto__: proto, item: item }));
// Filters
let filtered = this.filterFunc(this.cache.constructed);

View File

@@ -53,9 +53,8 @@
oncommandupdate="&events;.onSelectionChange(event);"/>
</window>
<vbox id="browser-bottombox">
<!-- 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 id="&dactyl.commandContainer;">
<vbox class="dactyl-container" hidden="false" collapsed="true">
<iframe id="dactyl-multiline-output" src="chrome://dactyl/content/buffer.xhtml"
flex="1" hidden="false" collapsed="false"

View File

@@ -610,10 +610,10 @@ const JavaScript = Module("javascript", {
"ROCSSPrimitiveValue", "RangeError", "ReferenceError", "RegExp",
"StopIteration", "String", "SyntaxError", "TypeError", "URIError",
"Uint16Array", "Uint32Array", "Uint8Array", "XML",
"XMLHttpProgressEvent", "XMLList", "XMLSerializer", "XULControllers",
"decodeURI", "decodeURIComponent", "encodeURI", "encodeURIComponent",
"eval", "isFinite", "isNaN", "isXMLName", "parseFloat", "parseInt",
"undefined", "uneval"
"XMLHttpProgressEvent", "XMLList", "XMLSerializer", "XPCNativeWrapper",
"XPCSafeJSWrapper", "XULControllers", "decodeURI", "decodeURIComponent",
"encodeURI", "encodeURIComponent", "eval", "isFinite", "isNaN",
"isXMLName", "parseFloat", "parseInt", "undefined", "uneval"
].concat([k.substr(6) for (k in keys(Ci)) if (/^nsIDOM/.test(k))])
.concat([k.substr(3) for (k in keys(Ci)) if (/^nsI/.test(k))])
.filter(function (k) k in window))),