mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-20 17:24:14 +01:00
Ditch the bloody chrome registry.
This commit is contained in:
@@ -34,14 +34,14 @@ var CommandWidgets = Class("CommandWidgets", {
|
||||
<vbox id={config.commandContainer}>
|
||||
|
||||
<vbox class="dactyl-container" id="dactyl-multiline-output-container" hidden="false" collapsed="true">
|
||||
<iframe id="dactyl-multiline-output" src="chrome://dactyl/content/buffer.xhtml"
|
||||
<iframe id="dactyl-multiline-output" src="resource://dactyl-content/buffer.xhtml"
|
||||
flex="1" hidden="false" collapsed="false"
|
||||
contextmenu="dactyl-contextmenu"
|
||||
onclick="dactyl.modules.commandline.onMultilineOutputEvent(event)"/>
|
||||
</vbox>
|
||||
|
||||
<vbox class="dactyl-container" hidden="false" collapsed="true">
|
||||
<iframe class="dactyl-completions" id="dactyl-completions-dactyl-commandline" src="chrome://dactyl/content/buffer.xhtml"
|
||||
<iframe class="dactyl-completions" id="dactyl-completions-dactyl-commandline" src="resource://dactyl-content/buffer.xhtml"
|
||||
contextmenu="dactyl-contextmenu"
|
||||
flex="1" hidden="false" collapsed="false"
|
||||
onclick="dactyl.modules.commandline.onMultilineOutputEvent(event)"/>
|
||||
@@ -75,7 +75,7 @@ var CommandWidgets = Class("CommandWidgets", {
|
||||
before: <e4x xmlns={XUL} xmlns:dactyl={NS}>
|
||||
<toolbar id={statusline.statusBar.id}>
|
||||
<vbox id={"dactyl-completions-" + _status + "commandline-container"} class="dactyl-container" hidden="false" collapsed="true">
|
||||
<iframe class="dactyl-completions" id={"dactyl-completions-" + _status + "commandline"} src="chrome://dactyl/content/buffer.xhtml"
|
||||
<iframe class="dactyl-completions" id={"dactyl-completions-" + _status + "commandline"} src="resource://dactyl-content/buffer.xhtml"
|
||||
contextmenu="dactyl-contextmenu"
|
||||
flex="1" hidden="false" collapsed="false"
|
||||
onclick="dactyl.modules.commandline.onMultilineOutputEvent(event)"/>
|
||||
@@ -161,12 +161,12 @@ var CommandWidgets = Class("CommandWidgets", {
|
||||
});
|
||||
|
||||
let fontSize = util.computedStyle(document.documentElement).fontSize;
|
||||
styles.registerSheet("chrome://dactyl/skin/dactyl.css");
|
||||
styles.system.add("font-size", "chrome://dactyl/content/buffer.xhtml",
|
||||
styles.registerSheet("resource://dactyl-skin/dactyl.css");
|
||||
styles.system.add("font-size", "resource://dactyl-content/buffer.xhtml",
|
||||
"body { font-size: " + fontSize + "; }");
|
||||
},
|
||||
cleanup: function cleanup() {
|
||||
styles.unregisterSheet("chrome://dactyl/skin/dactyl.css");
|
||||
styles.unregisterSheet("resource://dactyl-skin/dactyl.css");
|
||||
},
|
||||
addElement: function (obj) {
|
||||
const self = this;
|
||||
|
||||
@@ -594,10 +594,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
||||
if (context && context.INFO instanceof XML) {
|
||||
let info = context.INFO;
|
||||
if (info.*.@lang.length()) {
|
||||
let langs = set(String(a) for each (a in info.*.@lang));
|
||||
let lang = [config.language, config.language.replace(/-.*/, ""),
|
||||
"en", "en-US", info.*.@lang[0]
|
||||
].filter(function (l) set.has(langs, l))[0];
|
||||
let lang = config.bestLocale(String(a) for each (a in info.*.@lang));
|
||||
|
||||
info.* = info.*.(function::attribute("lang").length() == 0 || @lang == lang);
|
||||
|
||||
@@ -613,7 +610,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
||||
let help =
|
||||
'<?xml version="1.0"?>\n' +
|
||||
'<?xml-stylesheet type="text/xsl" href="dactyl://content/help.xsl"?>\n' +
|
||||
'<!DOCTYPE document SYSTEM "chrome://dactyl/content/dactyl.dtd">\n' +
|
||||
'<!DOCTYPE document SYSTEM "resource://dactyl-content/dactyl.dtd">\n' +
|
||||
unescape(encodeURI( // UTF-8 handling hack.
|
||||
<document xmlns={NS}
|
||||
name="plugins" title={config.appName + " Plugins"}>
|
||||
|
||||
@@ -36,7 +36,7 @@ var Tabs = Module("tabs", {
|
||||
};
|
||||
|
||||
this.tabBinding = styles.system.add("tab-binding", "chrome://browser/content/browser.xul", String.replace(<><![CDATA[
|
||||
xul|tab { -moz-binding: url(chrome://dactyl/content/bindings.xml#tab) !important; }
|
||||
xul|tab { -moz-binding: url(resource://dactyl-content/bindings.xml#tab) !important; }
|
||||
]]></>, /tab-./g, function (m) util.OS.isMacOSX ? "tab-mac" : m),
|
||||
false, true);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user