mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 07:48:00 +01:00
Fix :version for non-XPI installs. Fix :extensions in FF 3.6.
This commit is contained in:
@@ -6,6 +6,7 @@ BUILD_DATE = $(shell date "+%Y/%m/%d %H:%M:%S")
|
||||
BASE = $(TOP)/../common
|
||||
GOOGLE_PROJ = dactyl
|
||||
GOOGLE = https://$(GOOGLE_PROJ).googlecode.com/files
|
||||
VERSION = $(shell sed -n 's/.*<em:version>\(.*\)<.*/\1/p' $(TOP)/install.rdf)
|
||||
|
||||
LOCALEDIR = locale
|
||||
DOC_FILES = $(wildcard $(LOCALEDIR)/*/*.xml)
|
||||
|
||||
@@ -114,6 +114,7 @@ function Dactyl() {
|
||||
this.HELP_TAGS = {};
|
||||
this.FILE_MAP = {};
|
||||
this.OVERLAY_MAP = {};
|
||||
this.addonID = this.name + "@dactyl.googlecode.com";
|
||||
}
|
||||
Dactyl.prototype = {
|
||||
contractID: "@mozilla.org/network/protocol;1?name=dactyl",
|
||||
|
||||
@@ -72,7 +72,7 @@ const Dactyl = Module("dactyl", {
|
||||
forceNewWindow: false,
|
||||
|
||||
/** @property {string} The Dactyl version string. */
|
||||
version: "@VERSION@ (created: @DATE@)", // these VERSION and DATE tokens are replaced by the Makefile
|
||||
version: null,
|
||||
|
||||
/**
|
||||
* @property {Object} The map of command-line options. These are
|
||||
@@ -1421,12 +1421,14 @@ const Dactyl = Module("dactyl", {
|
||||
|
||||
if (typeof AddonManager == "undefined")
|
||||
modules.AddonManager = {
|
||||
getAddonById: function (id, callback) {
|
||||
getAddonByID: function (id, callback) {
|
||||
callback = callback || util.identity;
|
||||
let addon = id;
|
||||
if (!isobject(addon))
|
||||
addon = services.get("extensionManager").getItemForID(id);
|
||||
if (!addon)
|
||||
return callback(null);
|
||||
addon = Object.create(addon);
|
||||
|
||||
function getRdfProperty(item, property) {
|
||||
let resource = services.get("rdf").GetResource("urn:mozilla:item:" + item.id);
|
||||
@@ -1444,7 +1446,7 @@ const Dactyl = Module("dactyl", {
|
||||
|
||||
["aboutURL", "creator", "description", "developers",
|
||||
"homepageURL", "iconURL", "installDate", "name",
|
||||
"optionsURL", "releaseNotesURI", "updateDate"].forEach(function (item) {
|
||||
"optionsURL", "releaseNotesURI", "updateDate", "version"].forEach(function (item) {
|
||||
addon[item] = getRdfProperty(addon, item);
|
||||
});
|
||||
addon.isActive = getRdfProperty(addon, "isDisabled") != "true";
|
||||
@@ -1453,7 +1455,7 @@ const Dactyl = Module("dactyl", {
|
||||
services.get("extensionManager").uninstallItem(this.id);
|
||||
};
|
||||
addon.appDisabled = false;
|
||||
addon.__defineGetter("userDisabled", function() getRdfProperty("userDisabled") == "true");
|
||||
addon.__defineGetter__("userDisabled", function() getRdfProperty("userDisabled") == "true");
|
||||
addon.__defineSetter__("userDisabled", function(val) {
|
||||
services.get("extensionManager")[val ? "enableItem" : "disableItem"](this.id);
|
||||
});
|
||||
@@ -1465,8 +1467,8 @@ const Dactyl = Module("dactyl", {
|
||||
for (let [,type] in Iterator(types))
|
||||
for (let [,item] in Iterator(services.get("extensionManager")
|
||||
.getItemList(Ci.nsIUpdateItem["TYPE_" + type.toUpperCase()], {})))
|
||||
res.append(this.getAddonById(item));
|
||||
return res;
|
||||
res.push(this.getAddonByID(item));
|
||||
callback(res);
|
||||
},
|
||||
getInstallForFile: function (file, callback, mimetype) {
|
||||
callback({
|
||||
@@ -1975,6 +1977,12 @@ const Dactyl = Module("dactyl", {
|
||||
|
||||
dactyl.log("All modules loaded", 3);
|
||||
|
||||
AddonManager.getAddonByID(services.get("dactyl:").addonID, function (addon) {
|
||||
// @DATE@ token replaced by the Makefile
|
||||
// TODO: Find it automatically
|
||||
dactyl.version = addon.version + " (created: @DATE@)";
|
||||
});
|
||||
|
||||
services.add("commandLineHandler", "@mozilla.org/commandlinehandler/general-startup;1?type=" + config.name);
|
||||
|
||||
let commandline = services.get("commandLineHandler").optionValue;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#### configuration
|
||||
|
||||
VERSION = 1.0pre
|
||||
NAME = pentadactyl
|
||||
|
||||
include ../common/Makefile
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<Description about="urn:mozilla:install-manifest">
|
||||
<em:id>pentadactyl@dactyl.googlecode.com</em:id>
|
||||
<em:name>Pentadactyl</em:name>
|
||||
<em:version>@VERSION@</em:version>
|
||||
<em:version>1.0b1pre</em:version>
|
||||
<em:description>Firefox for Vim and Links addicts</em:description>
|
||||
<em:creator>Kris Maglione</em:creator>
|
||||
<em:homepageURL>http://dactyl.sf.net/Pentadactyl</em:homepageURL>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#### configuration
|
||||
|
||||
VERSION = 0.6a1pre
|
||||
NAME = muttator
|
||||
NAME = teledactyl
|
||||
|
||||
include ../common/Makefile
|
||||
|
||||
@@ -2,3 +2,7 @@
|
||||
<!ENTITY dactyl.name "muttator">
|
||||
<!ENTITY dactyl.statusBefore "">
|
||||
<!ENTITY dactyl.statusAfter "statusText">
|
||||
|
||||
<!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">
|
||||
|
||||
@@ -11,3 +11,7 @@
|
||||
<!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">
|
||||
|
||||
|
||||
@@ -4,17 +4,12 @@
|
||||
<Description about="urn:mozilla:install-manifest">
|
||||
<em:id>teledactyl@dactyl.googlecode.com</em:id>
|
||||
<em:name>Teledactyl</em:name>
|
||||
<em:version>###VERSION###</em:version>
|
||||
<em:version>0.5b1pre</em:version>
|
||||
<em:description>Thunderbird for Mutt and Vim addicts</em:description>
|
||||
<em:creator>Kris Maglione</em:creator>
|
||||
<em:homepageURL>http://dactyl.sf.net/Teledactyl</em:homepageURL>
|
||||
<em:iconURL>chrome://muttator/skin/icon.png</em:iconURL>
|
||||
<em:iconURL>chrome://teledactyl/skin/icon.png</em:iconURL>
|
||||
<em:optionsURL>chrome://dactyl/content/preferences.xul</em:optionsURL>
|
||||
<em:file>
|
||||
<Description about="urn:mozilla:extension:file:teledactyl.jar">
|
||||
<em:package>content/teledactyl/</em:package>
|
||||
</Description>
|
||||
</em:file>
|
||||
<em:targetApplication>
|
||||
<Description>
|
||||
<em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#### configuration
|
||||
|
||||
VERSION = 0.2a1pre
|
||||
NAME = xulmus
|
||||
|
||||
include ../common/Makefile
|
||||
|
||||
@@ -11,3 +11,6 @@
|
||||
<!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">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<em:id>xulmus@vimperator.org</em:id>
|
||||
<em:type>2</em:type>
|
||||
<em:name>Xulmus</em:name>
|
||||
<em:version>###VERSION###</em:version>
|
||||
<em:version>0.2a1pre</em:version>
|
||||
<em:description>Makes Songbird behave like Vim and CMus.</em:description>
|
||||
<em:creator>Prathyush Thota</em:creator>
|
||||
<em:homepageURL>http://vimperator.org</em:homepageURL>
|
||||
|
||||
Reference in New Issue
Block a user