mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 09:17:59 +01:00
Remove some duplication in the DTDs. Link to the mailing list web page rather than address.
This commit is contained in:
@@ -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 makeChannel(url, orig) {
|
||||
if (url == null)
|
||||
return fakeChannel();
|
||||
if (typeof url == "function")
|
||||
url = dataURL.apply(null, url());
|
||||
let uri = ioService.newURI(url, null, null);
|
||||
@@ -83,12 +85,15 @@ ChromeData.prototype = {
|
||||
};
|
||||
|
||||
function Dactyl() {
|
||||
const self = this;
|
||||
this.wrappedJSObject = this;
|
||||
|
||||
this.HELP_TAGS = {};
|
||||
this.FILE_MAP = {};
|
||||
this.OVERLAY_MAP = {};
|
||||
this.addonID = this.name + "@dactyl.googlecode.com";
|
||||
|
||||
this.pages = {};
|
||||
}
|
||||
Dactyl.prototype = {
|
||||
contractID: "@mozilla.org/network/protocol;1?name=dactyl",
|
||||
@@ -106,9 +111,12 @@ Dactyl.prototype = {
|
||||
},
|
||||
|
||||
appName: prefs.getComplexValue("appName", Ci.nsISupportsString).data,
|
||||
name: prefs.getComplexValue("name", Ci.nsISupportsString).data,
|
||||
idName: prefs.getComplexValue("idName", Ci.nsISupportsString).data,
|
||||
fileExt: prefs.getComplexValue("fileExt", 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) {
|
||||
for each (let prop in ["HELP_TAGS", "FILE_MAP", "OVERLAY_MAP"]) {
|
||||
@@ -135,16 +143,17 @@ Dactyl.prototype = {
|
||||
|
||||
newChannel: function (uri) {
|
||||
try {
|
||||
if (!("all" in this.FILE_MAP))
|
||||
if (uri.host != "content" && !("all" in this.FILE_MAP))
|
||||
return redirect(uri.spec, uri, 1);
|
||||
|
||||
let path = decodeURIComponent(uri.path.replace(/^\/|#.*/g, ""));
|
||||
switch(uri.host) {
|
||||
case "content":
|
||||
return makeChannel(this.pages[path], uri);
|
||||
case "help":
|
||||
let url = this.FILE_MAP[decodeURIComponent(uri.path.replace(/^\/|#.*/g, ""))];
|
||||
return makeChannel(url, uri);
|
||||
return makeChannel(this.FILE_MAP[path], uri);
|
||||
case "help-overlay":
|
||||
url = this.OVERLAY_MAP[decodeURIComponent(uri.path.replace(/^\/|#.*/g, ""))];
|
||||
return makeChannel(url, uri);
|
||||
return makeChannel(this.OVERLAY_MAP[path], uri);
|
||||
case "help-tag":
|
||||
let tag = decodeURIComponent(uri.path.substr(1));
|
||||
if (tag in this.FILE_MAP)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<div xmlns="&xmlns.html;" style="text-align: center" id="text-container">
|
||||
<img src="chrome://&dactyl.name;/content/logo.png" alt="&dactyl.appName;" />
|
||||
|
||||
version @VERSION@
|
||||
version &dactyl.version;
|
||||
by Kris Maglione, Doug Kearns, et al.
|
||||
&dactyl.appName; is open source and freely distributable
|
||||
|
||||
|
||||
18
common/content/base.dtd
Normal file
18
common/content/base.dtd
Normal 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">
|
||||
|
||||
@@ -39,6 +39,9 @@
|
||||
|
||||
let prefix = [BASE];
|
||||
|
||||
modules.load("services");
|
||||
prefix.unshift("chrome://" + modules.services.get("dactyl:").name + "/content/");
|
||||
|
||||
["base",
|
||||
"modules",
|
||||
"storage",
|
||||
@@ -63,13 +66,11 @@
|
||||
"marks",
|
||||
"modes",
|
||||
"options",
|
||||
"services",
|
||||
"statusline",
|
||||
"styles",
|
||||
"template"
|
||||
].forEach(modules.load);
|
||||
|
||||
prefix.unshift("chrome://" + modules.services.get("dactyl:").name + "/content/");
|
||||
modules.Config.prototype.scripts.forEach(modules.load);
|
||||
})();
|
||||
|
||||
|
||||
@@ -1929,6 +1929,7 @@ const Dactyl = Module("dactyl", {
|
||||
AddonManager.getAddonByID(services.get("dactyl:").addonID, function (addon) {
|
||||
// @DATE@ token replaced by the Makefile
|
||||
// TODO: Find it automatically
|
||||
options.setPref("extensions.dactyl.version", addon.version);
|
||||
dactyl.version = addon.version + " (created: @DATE@)";
|
||||
});
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ resource dactyl ../common/modules/
|
||||
skin dactyl classic/1.0 ../common/skin/
|
||||
|
||||
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://dactyl/content/dactyl.xul
|
||||
|
||||
@@ -1,23 +1,15 @@
|
||||
|
||||
<!ENTITY % dactylBranding SYSTEM "chrome://branding/locale/brand.dtd">
|
||||
%dactylBranding;
|
||||
|
||||
<!ENTITY dactyl.mainWindow "mainplayer">
|
||||
<!ENTITY dactyl.commandContainer "&dactyl.mainWindow;">
|
||||
<!ENTITY dactyl.statusBefore "statusbar-display">
|
||||
<!ENTITY dactyl.statusAfter "">
|
||||
|
||||
<!ENTITY dactyl.name "melodactyl">
|
||||
<!ENTITY dactyl.appName "Melodactyl">
|
||||
<!ENTITY dactyl.idName "MELODACTYL">
|
||||
<!ENTITY dactyl.fileExt "melo">
|
||||
<!ENTITY dactyl.host "&brandShortName;">
|
||||
<!ENTITY dactyl.hostbin "songbird">
|
||||
|
||||
<!ENTITY dactyl.code "http://code.google.com/p/dactyl/">
|
||||
<!ENTITY dactyl.maillist "pentadactyl@googlegroups.com">
|
||||
<!ENTITY dactyl.plugins "http://dactyl.sf.net/&dactyl.name;/plugins">
|
||||
<!ENTITY dactyl.version "1.0">
|
||||
<!ENTITY % dactylBase SYSTEM "chrome://dactyl/content/base.dtd">
|
||||
%dactylBase;
|
||||
|
||||
<!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">
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
pref("extensions.dactyl.name", "melodactyl");
|
||||
pref("extensions.dactyl.appName", "Melodactyl");
|
||||
pref("extensions.dactyl.idName", "MELODACTYL");
|
||||
pref("extensions.dactyl.fileExt", "melo");
|
||||
pref("extensions.dactyl.host", "Songbird");
|
||||
pref("extensions.dactyl.hostbin", "songbird");
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
|
||||
<!ENTITY appName "Xulmus">
|
||||
<!ENTITY hostapp "Songbird">
|
||||
|
||||
@@ -9,7 +9,6 @@ resource dactyl ../common/modules/
|
||||
skin dactyl classic/1.0 ../common/skin/
|
||||
|
||||
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://pentadactyl/content/pentadactyl.xul
|
||||
|
||||
@@ -1,24 +1,15 @@
|
||||
|
||||
<!ENTITY % dactylBranding SYSTEM "chrome://branding/locale/brand.dtd">
|
||||
%dactylBranding;
|
||||
|
||||
<!ENTITY dactyl.mainWindow "main-window">
|
||||
<!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.statusAfter "">
|
||||
|
||||
<!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">
|
||||
<!ENTITY dactyl.appName "Pentadactyl">
|
||||
<!ENTITY dactyl.idName "PENTADACTYL">
|
||||
<!ENTITY dactyl.name "pentadactyl">
|
||||
<!ENTITY dactyl.fileExt "penta">
|
||||
<!ENTITY dactyl.hostbin "firefox">
|
||||
|
||||
<!ENTITY % dactylBase SYSTEM "chrome://dactyl/content/base.dtd">
|
||||
%dactylBase;
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
pref("extensions.dactyl.name", "pentadactyl");
|
||||
pref("extensions.dactyl.appName", "Pentadactyl");
|
||||
pref("extensions.dactyl.idName", "PENTADACTYL");
|
||||
pref("extensions.dactyl.fileExt", "penta");
|
||||
pref("extensions.dactyl.host", "Firefox");
|
||||
pref("extensions.dactyl.hostbin", "firefox");
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
|
||||
<!ENTITY appName "Pentadactyl">
|
||||
<!ENTITY hostapp "Firefox">
|
||||
|
||||
@@ -168,13 +168,13 @@
|
||||
|
||||
<p>
|
||||
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
|
||||
check the
|
||||
<link topic="http://code.google.com/p/dactyl/wiki">wiki</link> or
|
||||
<link topic="http://dactyl.sourceforge.net/pentadactyl/faq">FAQ</link>.
|
||||
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>
|
||||
|
||||
</document>
|
||||
|
||||
@@ -8,7 +8,6 @@ resource dactyl ../common/modules/
|
||||
skin dactyl classic/1.0 ../common/skin/
|
||||
|
||||
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://teledactyl/content/teledactyl.xul
|
||||
|
||||
@@ -6,3 +6,4 @@
|
||||
<!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">
|
||||
|
||||
|
||||
@@ -1,19 +1,15 @@
|
||||
|
||||
<!ENTITY % dactylBranding SYSTEM "chrome://branding/locale/brand.dtd">
|
||||
%dactylBranding;
|
||||
|
||||
<!ENTITY dactyl.mainWindow "messengerWindow">
|
||||
<!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.statusAfter "statusTextBox">
|
||||
|
||||
<!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">
|
||||
<!ENTITY dactyl.name "teledactyl">
|
||||
<!ENTITY dactyl.idName "TELEDACTYL">
|
||||
<!ENTITY dactyl.appName "Teledactyl">
|
||||
<!ENTITY dactyl.hostbin "thunderbird">
|
||||
<!ENTITY dactyl.fileExt "tele">
|
||||
|
||||
<!ENTITY % dactylBase SYSTEM "chrome://dactyl/content/base.dtd">
|
||||
%dactylBase;
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
pref("extensions.dactyl.name", "teledactyl");
|
||||
pref("extensions.dactyl.appName", "Teledactyl");
|
||||
pref("extensions.dactyl.idName", "TELEDACTYL");
|
||||
pref("extensions.dactyl.fileExt", "tele");
|
||||
pref("extensions.dactyl.host", "Thunderbird");
|
||||
pref("extensions.dactyl.hostbin", "thunderbird");
|
||||
|
||||
@@ -165,13 +165,13 @@ or <ex>:help :set</ex>.
|
||||
|
||||
<p>
|
||||
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
|
||||
check the
|
||||
<link topic="http://code.google.com/p/dactyl/wiki">wiki</link> for
|
||||
<link topic="http://code.google.com/p/dactyl/wiki/FAQ">FAQ</link>.
|
||||
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>
|
||||
|
||||
</document>
|
||||
|
||||
Reference in New Issue
Block a user