1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-07 21:54:12 +01:00

Automagically generate DTDs. One more step towards dropping the chrome: protocol.

--HG--
rename : common/content/io.js => common/modules/io.jsm
This commit is contained in:
Kris Maglione
2011-01-03 21:11:28 -05:00
parent 30ec5fc393
commit 43458d4432
59 changed files with 553 additions and 463 deletions

View File

@@ -1,19 +0,0 @@
<!ENTITY % dactylBranding SYSTEM "chrome://branding/locale/brand.dtd">
%dactylBranding;
<!ENTITY dactyl.version "@VERSION@">
<!ENTITY dactyl.host "&brandShortName;">
<!ENTITY dactyl.home "http://dactyl.sourceforge.net/">
<!ENTITY dactyl.apphome "&dactyl.home;&dactyl.name;">
<!ENTITY dactyl.code "http://code.google.com/p/dactyl/">
<!ENTITY dactyl.issues "&dactyl.home;bug/&dactyl.name;">
<!ENTITY dactyl.plugins "http://dactyl.sf.net/&dactyl.name;/plugins">
<!ENTITY dactyl.list.mailto "&dactyl.name;@googlegroups.com">
<!ENTITY dactyl.list.href "http://groups.google.com/group/&dactyl.name;">
<!ENTITY dactyl.faq "&dactyl.home;&dactyl.name;/faq">
<!ENTITY xmlns.dactyl "http://vimperator.org/namespaces/liberator">
<!ENTITY xmlns.html "http://www.w3.org/1999/xhtml">
<!ENTITY xmlns.xul "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

View File

@@ -92,9 +92,9 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
* @property {number} The current main mode.
* @see modes#mainModes
*/
mode: Class.Property({
get: deprecated("Please use modes.main instead", function mode() modes.main),
set: deprecated("Please use modes.main instead", function mode(val) modes.main = val),
mode: deprecated("Please use modes.main instead", {
get: function mode() modes.main,
set: function mode(val) modes.main = val
}),
get menuItems() Dactyl.getMenuItems(),
@@ -108,23 +108,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
forceNewTab: false,
forceNewWindow: false,
/** @property {string} The Dactyl version string. */
version: Class.memoize(function () {
if (/pre$/.test(util.addon.version)) {
let uri = util.addon.getResourceURI("../.hg");
if (uri instanceof Ci.nsIFileURL &&
uri.QueryInterface(Ci.nsIFileURL).file.exists() &&
io.pathSearch("hg")) {
return io.system(["hg", "-R", uri.file.parent.path,
"log", "-r.",
"--template=hg{rev} ({date|isodate})"]);
}
}
let version = util.addon.version;
if ("@DATE" !== "@" + "DATE@")
version += " (created: @DATE@)";
return version;
}),
version: deprecated("Please use config.version instead", { get: function version() config.version }),
/**
* @property {Object} The map of command-line options. These are
@@ -304,9 +288,9 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
},
dump: deprecated("Use util.dump instead",
function dump() util.dump.apply(util, arguments)),
{ get: function dump() util.closure.dump }),
dumpStack: deprecated("Use util.dumpStack instead",
function dumpStack() util.dumpStack.apply(util, arguments)),
{ get: function dumpStack() util.closure.dumpStack }),
/**
* Outputs a plain message to the command line.
@@ -546,14 +530,14 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
* @private
* Initialize the help system.
*/
initHelp: function () {
if (!this.helpInitialized) {
initHelp: function (force) {
if (!force && !this.helpInitialized) {
if ("noscriptOverlay" in window) {
noscriptOverlay.safeAllow("chrome-data:", true, false);
noscriptOverlay.safeAllow("dactyl:", true, false);
}
let namespaces = [config.name, "dactyl"];
let namespaces = ["locale-local", "locale"];
services["dactyl:"].init({});
let tagMap = services["dactyl:"].HELP_TAGS;
@@ -564,7 +548,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
function findHelpFile(file) {
let result = [];
for (let [, namespace] in Iterator(namespaces)) {
let url = ["chrome://", namespace, "/locale/", file, ".xml"].join("");
let url = ["dactyl://", namespace, "/", file, ".xml"].join("");
let res = util.httpGet(url);
if (res) {
if (res.responseXML.documentElement.localName == "document")
@@ -894,9 +878,8 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
* These are set and accessed with the "g:" prefix.
*/
_globalVariables: {},
globalVariables: Class.Property({
get: deprecated("Please use the options system instead",
function globalVariables() this._globalVariables)
globalVariables: deprecated("Please use the options system instead", {
get: function globalVariables() this._globalVariables
}),
loadPlugins: function (args) {
@@ -2051,7 +2034,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
dactyl.open("about:");
else
commandline.commandOutput(<>
{config.appName} {dactyl.version} running on:<br/>{navigator.userAgent}
{config.appName} {config.version} running on:<br/>{navigator.userAgent}
</>);
}, {
argCount: "0",

View File

@@ -1,6 +0,0 @@
<!ENTITY % dactylMain SYSTEM "chrome://dactyl/content/dactyl.dtd">
%dactylMain;
<!ENTITY tag.command-line '<link topic="command-line">command line</link>'>
<!ENTITY tag.status-line '<link topic="status-line">status line</link>'>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE stylesheet SYSTEM "chrome://dactyl/content/dactyl.dtd">
<!DOCTYPE stylesheet SYSTEM "dactyl://content/dtd">
<!-- Header {{{1 -->
<xsl:stylesheet version="1.0"

File diff suppressed because it is too large Load Diff

View File

@@ -163,9 +163,9 @@ var Option = Class("Option", {
setValues: deprecated("Please use Option#set instead", "set"),
joinValues: deprecated("Please use Option#stringify instead", "stringify"),
parseValues: deprecated("Please use Option#parse instead", "parse"),
values: Class.Property({
get: deprecated("Please use Option#value instead", function values() this.value),
set: deprecated("Please use Option#value instead", function values(val) this.value = val)
values: deprecated("Please use Option#value instead", {
get: function values() this.value,
set: function values(val) this.value = val
}),
/**