1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 16:52:25 +01:00

Remove some duplication in the DTDs. Link to the mailing list web page rather than address.

This commit is contained in:
Kris Maglione
2010-10-02 18:08:41 -04:00
parent bc97c417d6
commit 8ab81562ba
19 changed files with 69 additions and 65 deletions

View File

@@ -26,6 +26,8 @@ const systemPrincipal = Cc["@mozilla.org/systemprincipal;1"].getService(Ci.nsIPr
function dataURL(type, data) "data:" + (type || "application/xml;encoding=UTF-8") + "," + escape(data); function dataURL(type, data) "data:" + (type || "application/xml;encoding=UTF-8") + "," + escape(data);
function makeChannel(url, orig) { function makeChannel(url, orig) {
if (url == null)
return fakeChannel();
if (typeof url == "function") if (typeof url == "function")
url = dataURL.apply(null, url()); url = dataURL.apply(null, url());
let uri = ioService.newURI(url, null, null); let uri = ioService.newURI(url, null, null);
@@ -83,12 +85,15 @@ ChromeData.prototype = {
}; };
function Dactyl() { function Dactyl() {
const self = this;
this.wrappedJSObject = this; this.wrappedJSObject = this;
this.HELP_TAGS = {}; this.HELP_TAGS = {};
this.FILE_MAP = {}; this.FILE_MAP = {};
this.OVERLAY_MAP = {}; this.OVERLAY_MAP = {};
this.addonID = this.name + "@dactyl.googlecode.com"; this.addonID = this.name + "@dactyl.googlecode.com";
this.pages = {};
} }
Dactyl.prototype = { Dactyl.prototype = {
contractID: "@mozilla.org/network/protocol;1?name=dactyl", contractID: "@mozilla.org/network/protocol;1?name=dactyl",
@@ -106,9 +111,12 @@ Dactyl.prototype = {
}, },
appName: prefs.getComplexValue("appName", Ci.nsISupportsString).data, appName: prefs.getComplexValue("appName", Ci.nsISupportsString).data,
name: prefs.getComplexValue("name", Ci.nsISupportsString).data, fileExt: prefs.getComplexValue("fileExt", Ci.nsISupportsString).data,
idName: prefs.getComplexValue("idName", Ci.nsISupportsString).data,
host: prefs.getComplexValue("host", Ci.nsISupportsString).data, host: prefs.getComplexValue("host", Ci.nsISupportsString).data,
hostbin: prefs.getComplexValue("hostbin", Ci.nsISupportsString).data,
idName: prefs.getComplexValue("idName", Ci.nsISupportsString).data,
name: prefs.getComplexValue("name", Ci.nsISupportsString).data,
get version() prefs.getComplexValue("version", Ci.nsISupportsString).data,
init: function (obj) { init: function (obj) {
for each (let prop in ["HELP_TAGS", "FILE_MAP", "OVERLAY_MAP"]) { for each (let prop in ["HELP_TAGS", "FILE_MAP", "OVERLAY_MAP"]) {
@@ -135,16 +143,17 @@ Dactyl.prototype = {
newChannel: function (uri) { newChannel: function (uri) {
try { try {
if (!("all" in this.FILE_MAP)) if (uri.host != "content" && !("all" in this.FILE_MAP))
return redirect(uri.spec, uri, 1); return redirect(uri.spec, uri, 1);
let path = decodeURIComponent(uri.path.replace(/^\/|#.*/g, ""));
switch(uri.host) { switch(uri.host) {
case "content":
return makeChannel(this.pages[path], uri);
case "help": case "help":
let url = this.FILE_MAP[decodeURIComponent(uri.path.replace(/^\/|#.*/g, ""))]; return makeChannel(this.FILE_MAP[path], uri);
return makeChannel(url, uri);
case "help-overlay": case "help-overlay":
url = this.OVERLAY_MAP[decodeURIComponent(uri.path.replace(/^\/|#.*/g, ""))]; return makeChannel(this.OVERLAY_MAP[path], uri);
return makeChannel(url, uri);
case "help-tag": case "help-tag":
let tag = decodeURIComponent(uri.path.substr(1)); let tag = decodeURIComponent(uri.path.substr(1));
if (tag in this.FILE_MAP) if (tag in this.FILE_MAP)

View File

@@ -15,7 +15,7 @@
<div xmlns="&xmlns.html;" style="text-align: center" id="text-container"> <div xmlns="&xmlns.html;" style="text-align: center" id="text-container">
<img src="chrome://&dactyl.name;/content/logo.png" alt="&dactyl.appName;" /> <img src="chrome://&dactyl.name;/content/logo.png" alt="&dactyl.appName;" />
version @VERSION@ version &dactyl.version;
by Kris Maglione, Doug Kearns, et al. by Kris Maglione, Doug Kearns, et al.
&dactyl.appName; is open source and freely distributable &dactyl.appName; is open source and freely distributable

18
common/content/base.dtd Normal file
View File

@@ -0,0 +1,18 @@
<!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 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

@@ -39,6 +39,9 @@
let prefix = [BASE]; let prefix = [BASE];
modules.load("services");
prefix.unshift("chrome://" + modules.services.get("dactyl:").name + "/content/");
["base", ["base",
"modules", "modules",
"storage", "storage",
@@ -63,13 +66,11 @@
"marks", "marks",
"modes", "modes",
"options", "options",
"services",
"statusline", "statusline",
"styles", "styles",
"template" "template"
].forEach(modules.load); ].forEach(modules.load);
prefix.unshift("chrome://" + modules.services.get("dactyl:").name + "/content/");
modules.Config.prototype.scripts.forEach(modules.load); modules.Config.prototype.scripts.forEach(modules.load);
})(); })();

View File

@@ -1929,6 +1929,7 @@ const Dactyl = Module("dactyl", {
AddonManager.getAddonByID(services.get("dactyl:").addonID, function (addon) { AddonManager.getAddonByID(services.get("dactyl:").addonID, function (addon) {
// @DATE@ token replaced by the Makefile // @DATE@ token replaced by the Makefile
// TODO: Find it automatically // TODO: Find it automatically
options.setPref("extensions.dactyl.version", addon.version);
dactyl.version = addon.version + " (created: @DATE@)"; dactyl.version = addon.version + " (created: @DATE@)";
}); });

View File

@@ -9,7 +9,6 @@ resource dactyl ../common/modules/
skin dactyl classic/1.0 ../common/skin/ skin dactyl classic/1.0 ../common/skin/
override chrome://dactyl/content/dactyl.dtd chrome://melodactyl/content/dactyl.dtd override chrome://dactyl/content/dactyl.dtd chrome://melodactyl/content/dactyl.dtd
override chrome://dactyl/content/config.js chrome://melodactyl/content/config.js
overlay chrome://songbird/content/xul/layoutBaseOverlay.xul chrome://melodactyl/content/melodactyl.xul overlay chrome://songbird/content/xul/layoutBaseOverlay.xul chrome://melodactyl/content/melodactyl.xul
overlay chrome://songbird/content/xul/layoutBaseOverlay.xul chrome://dactyl/content/dactyl.xul overlay chrome://songbird/content/xul/layoutBaseOverlay.xul chrome://dactyl/content/dactyl.xul

View File

@@ -1,23 +1,15 @@
<!ENTITY % dactylBranding SYSTEM "chrome://branding/locale/brand.dtd">
%dactylBranding;
<!ENTITY dactyl.mainWindow "mainplayer"> <!ENTITY dactyl.mainWindow "mainplayer">
<!ENTITY dactyl.commandContainer "&dactyl.mainWindow;"> <!ENTITY dactyl.commandContainer "&dactyl.mainWindow;">
<!ENTITY dactyl.statusBefore "statusbar-display"> <!ENTITY dactyl.statusBefore "statusbar-display">
<!ENTITY dactyl.statusAfter ""> <!ENTITY dactyl.statusAfter "">
<!ENTITY dactyl.name "melodactyl"> <!ENTITY dactyl.name "melodactyl">
<!ENTITY dactyl.appName "Melodactyl"> <!ENTITY dactyl.appName "Melodactyl">
<!ENTITY dactyl.idName "MELODACTYL"> <!ENTITY dactyl.idName "MELODACTYL">
<!ENTITY dactyl.fileExt "melo"> <!ENTITY dactyl.fileExt "melo">
<!ENTITY dactyl.host "&brandShortName;">
<!ENTITY dactyl.hostbin "songbird"> <!ENTITY dactyl.hostbin "songbird">
<!ENTITY dactyl.code "http://code.google.com/p/dactyl/"> <!ENTITY % dactylBase SYSTEM "chrome://dactyl/content/base.dtd">
<!ENTITY dactyl.maillist "pentadactyl@googlegroups.com"> %dactylBase;
<!ENTITY dactyl.plugins "http://dactyl.sf.net/&dactyl.name;/plugins">
<!ENTITY dactyl.version "1.0">
<!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

@@ -1,4 +1,6 @@
pref("extensions.dactyl.name", "melodactyl"); pref("extensions.dactyl.name", "melodactyl");
pref("extensions.dactyl.appName", "Melodactyl"); pref("extensions.dactyl.appName", "Melodactyl");
pref("extensions.dactyl.idName", "MELODACTYL"); pref("extensions.dactyl.idName", "MELODACTYL");
pref("extensions.dactyl.fileExt", "melo");
pref("extensions.dactyl.host", "Songbird"); pref("extensions.dactyl.host", "Songbird");
pref("extensions.dactyl.hostbin", "songbird");

View File

@@ -1,4 +0,0 @@
<!ENTITY appName "Xulmus">
<!ENTITY hostapp "Songbird">

View File

@@ -9,7 +9,6 @@ resource dactyl ../common/modules/
skin dactyl classic/1.0 ../common/skin/ skin dactyl classic/1.0 ../common/skin/
override chrome://dactyl/content/dactyl.dtd chrome://pentadactyl/content/dactyl.dtd override chrome://dactyl/content/dactyl.dtd chrome://pentadactyl/content/dactyl.dtd
override chrome://dactyl/content/config.js chrome://pentadactyl/content/config.js
overlay chrome://browser/content/browser.xul chrome://dactyl/content/dactyl.xul overlay chrome://browser/content/browser.xul chrome://dactyl/content/dactyl.xul
overlay chrome://browser/content/browser.xul chrome://pentadactyl/content/pentadactyl.xul overlay chrome://browser/content/browser.xul chrome://pentadactyl/content/pentadactyl.xul

View File

@@ -1,24 +1,15 @@
<!ENTITY % dactylBranding SYSTEM "chrome://branding/locale/brand.dtd">
%dactylBranding;
<!ENTITY dactyl.mainWindow "main-window"> <!ENTITY dactyl.mainWindow "main-window">
<!ENTITY dactyl.commandContainer "browser-bottombox"> <!ENTITY dactyl.commandContainer "browser-bottombox">
<!ENTITY dactyl.name "pentadactyl">
<!ENTITY dactyl.version "1.0">
<!ENTITY dactyl.idName "PENTADACTYL">
<!ENTITY dactyl.appName "Pentadactyl">
<!ENTITY dactyl.apphome "http://dactyl.sf.net/">
<!ENTITY dactyl.code "http://code.google.com/p/dactyl/">
<!ENTITY dactyl.plugins "http://dactyl.sf.net/&dactyl.name;/plugins">
<!ENTITY dactyl.maillist "pentadactyl@googlegroups.com">
<!ENTITY dactyl.host "&brandShortName;">
<!ENTITY dactyl.hostbin "firefox">
<!ENTITY dactyl.fileExt "penta">
<!ENTITY dactyl.statusBefore "statusbar-display"> <!ENTITY dactyl.statusBefore "statusbar-display">
<!ENTITY dactyl.statusAfter ""> <!ENTITY dactyl.statusAfter "">
<!ENTITY xmlns.dactyl "http://vimperator.org/namespaces/liberator"> <!ENTITY dactyl.appName "Pentadactyl">
<!ENTITY xmlns.html "http://www.w3.org/1999/xhtml"> <!ENTITY dactyl.idName "PENTADACTYL">
<!ENTITY xmlns.xul "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <!ENTITY dactyl.name "pentadactyl">
<!ENTITY dactyl.fileExt "penta">
<!ENTITY dactyl.hostbin "firefox">
<!ENTITY % dactylBase SYSTEM "chrome://dactyl/content/base.dtd">
%dactylBase;

View File

@@ -1,4 +1,6 @@
pref("extensions.dactyl.name", "pentadactyl"); pref("extensions.dactyl.name", "pentadactyl");
pref("extensions.dactyl.appName", "Pentadactyl"); pref("extensions.dactyl.appName", "Pentadactyl");
pref("extensions.dactyl.idName", "PENTADACTYL"); pref("extensions.dactyl.idName", "PENTADACTYL");
pref("extensions.dactyl.fileExt", "penta");
pref("extensions.dactyl.host", "Firefox"); pref("extensions.dactyl.host", "Firefox");
pref("extensions.dactyl.hostbin", "firefox");

View File

@@ -1,4 +0,0 @@
<!ENTITY appName "Pentadactyl">
<!ENTITY hostapp "Firefox">

View File

@@ -168,13 +168,13 @@
<p> <p>
Please send comments, questions, or patches to the Please send comments, questions, or patches to the
<link topic="mailto:&dactyl.maillist;">mailing list</link>, <link topic="&dactyl.list.href;">mailing list</link>,
where we will do our best to answer any inquiries. You can also where we will do our best to answer any inquiries. You can also
check the check the
<link topic="http://code.google.com/p/dactyl/wiki">wiki</link> or <link topic="http://code.google.com/p/dactyl/wiki">wiki</link> or
<link topic="http://dactyl.sourceforge.net/pentadactyl/faq">FAQ</link>. <link topic="http://dactyl.sourceforge.net/pentadactyl/faq">FAQ</link>.
Issue reports can be entered in the Issue reports can be entered in the
<link topic="http://code.google.com/p/dactyl/issues/list">issue tracker</link>. <link topic="&dactyl.issues;">issue tracker</link>.
</p> </p>
</document> </document>

View File

@@ -8,7 +8,6 @@ resource dactyl ../common/modules/
skin dactyl classic/1.0 ../common/skin/ skin dactyl classic/1.0 ../common/skin/
override chrome://dactyl/content/dactyl.dtd chrome://teledactyl/content/dactyl.dtd override chrome://dactyl/content/dactyl.dtd chrome://teledactyl/content/dactyl.dtd
override chrome://dactyl/content/config.js chrome://teledactyl/content/config.js
overlay chrome://messenger/content/messenger.xul chrome://dactyl/content/dactyl.xul overlay chrome://messenger/content/messenger.xul chrome://dactyl/content/dactyl.xul
overlay chrome://messenger/content/messenger.xul chrome://teledactyl/content/teledactyl.xul overlay chrome://messenger/content/messenger.xul chrome://teledactyl/content/teledactyl.xul

View File

@@ -6,3 +6,4 @@
<!ENTITY xmlns.dactyl "http://vimperator.org/namespaces/liberator"> <!ENTITY xmlns.dactyl "http://vimperator.org/namespaces/liberator">
<!ENTITY xmlns.html "http://www.w3.org/1999/xhtml"> <!ENTITY xmlns.html "http://www.w3.org/1999/xhtml">
<!ENTITY xmlns.xul "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <!ENTITY xmlns.xul "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

View File

@@ -1,19 +1,15 @@
<!ENTITY % dactylBranding SYSTEM "chrome://branding/locale/brand.dtd">
%dactylBranding;
<!ENTITY dactyl.mainWindow "messengerWindow"> <!ENTITY dactyl.mainWindow "messengerWindow">
<!ENTITY dactyl.commandContainer "&dactyl.mainWindow;"> <!ENTITY dactyl.commandContainer "&dactyl.mainWindow;">
<!ENTITY dactyl.name "teledactyl">
<!ENTITY dactyl.idName "TELEDACTYL">
<!ENTITY dactyl.appName "Teledactyl">
<!ENTITY dactyl.host "&brandShortName;">
<!ENTITY dactyl.hostbin "thunderbird">
<!ENTITY dactyl.fileExt "tele">
<!ENTITY dactyl.statusBefore ""> <!ENTITY dactyl.statusBefore "">
<!ENTITY dactyl.statusAfter "statusTextBox"> <!ENTITY dactyl.statusAfter "statusTextBox">
<!ENTITY xmlns.dactyl "http://vimperator.org/namespaces/liberator"> <!ENTITY dactyl.name "teledactyl">
<!ENTITY xmlns.html "http://www.w3.org/1999/xhtml"> <!ENTITY dactyl.idName "TELEDACTYL">
<!ENTITY xmlns.xul "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <!ENTITY dactyl.appName "Teledactyl">
<!ENTITY dactyl.hostbin "thunderbird">
<!ENTITY dactyl.fileExt "tele">
<!ENTITY % dactylBase SYSTEM "chrome://dactyl/content/base.dtd">
%dactylBase;

View File

@@ -1,4 +1,6 @@
pref("extensions.dactyl.name", "teledactyl"); pref("extensions.dactyl.name", "teledactyl");
pref("extensions.dactyl.appName", "Teledactyl"); pref("extensions.dactyl.appName", "Teledactyl");
pref("extensions.dactyl.idName", "TELEDACTYL"); pref("extensions.dactyl.idName", "TELEDACTYL");
pref("extensions.dactyl.fileExt", "tele");
pref("extensions.dactyl.host", "Thunderbird"); pref("extensions.dactyl.host", "Thunderbird");
pref("extensions.dactyl.hostbin", "thunderbird");

View File

@@ -165,13 +165,13 @@ or <ex>:help :set</ex>.
<p> <p>
Please send comments, questions, or patches to the Please send comments, questions, or patches to the
<link topic="mailto:&dactyl.maillist;">mailing list</link>, <link topic="&dactyl.list.href;">mailing list</link>,
where we will do our best to answer any questions. You can also where we will do our best to answer any questions. You can also
check the check the
<link topic="http://code.google.com/p/dactyl/wiki">wiki</link> for <link topic="http://code.google.com/p/dactyl/wiki">wiki</link> for
<link topic="http://code.google.com/p/dactyl/wiki/FAQ">FAQ</link>. <link topic="http://code.google.com/p/dactyl/wiki/FAQ">FAQ</link>.
Issue reports can be entered in the Issue reports can be entered in the
<link topic="http://code.google.com/p/dactyl/issues/list">issue tracker</link>. <link topic="&dactyl.issues;>issue tracker</link>.
</p> </p>
</document> </document>