mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-11 22:25:47 +01:00
Merge default.
--HG-- branch : key-processing
This commit is contained in:
@@ -9,6 +9,9 @@ GOOGLE = https://$(GOOGLE_PROJ).googlecode.com/files
|
||||
VERSION ?= $(shell sed -n 's/.*em:version\(>\|="\)\(.*\)["<].*/\2/p' $(TOP)/install.rdf | sed 1q)
|
||||
UUID := $(shell sed -n 's/.*em:id\(>\|="\)\(.*\)["<].*/\2/p' $(TOP)/install.rdf | sed 1q)
|
||||
MANGLE := $(shell date '+%s' | awk '{ printf "%x", $$1 }')
|
||||
MOZMILL = mozmill
|
||||
HOSTAPP_PATH = $(shell which $(HOSTAPP))
|
||||
TEST_DIR = $(BASE)/tests/functional
|
||||
|
||||
LOCALEDIR = locale
|
||||
DOC_FILES = $(wildcard $(LOCALEDIR)/*/*.xml)
|
||||
@@ -48,7 +51,7 @@ CURL ?= curl
|
||||
|
||||
#### rules
|
||||
|
||||
TARGETS = all help info jar xpi install clean distclean install installxpi $(CHROME) $(JAR)
|
||||
TARGETS = all help info jar xpi install clean distclean install installxpi test $(CHROME) $(JAR)
|
||||
$(TARGETS:%=\%.%):
|
||||
echo MAKE $* $(@:$*.%=%)
|
||||
$(MAKE) -C $* $(@:$*.%=%)
|
||||
@@ -71,6 +74,7 @@ help:
|
||||
@echo " make dist - uploads to Google Code (this is not for you)"
|
||||
@echo " make clean - clean up"
|
||||
@echo " make distclean - clean up more"
|
||||
@echo " make test - run functional tests"
|
||||
@echo
|
||||
@echo "running some commands with V=1 will show more build details"
|
||||
|
||||
@@ -158,6 +162,11 @@ distclean:
|
||||
@echo "More $(NAME) cleanup..."
|
||||
rm -rf $(BUILD_DIR)
|
||||
|
||||
# TODO: generalize log path
|
||||
test: $(XPI)
|
||||
@echo "Running functional tests..."
|
||||
$(MOZMILL) --show-all -l /tmp/dactyl-test.log -b $(HOSTAPP_PATH) --addons $(XPI) -t $(TEST_DIR)
|
||||
|
||||
#### xpi
|
||||
|
||||
$(XPI): $(CHROME)
|
||||
|
||||
@@ -105,7 +105,7 @@ var Bookmarks = Module("bookmarks", {
|
||||
*/
|
||||
addSearchKeyword: function (elem) {
|
||||
if (elem instanceof HTMLFormElement || elem.form)
|
||||
var [url, post,, charset] = util.parseForm(elem);
|
||||
var [url, post, charset] = util.parseForm(elem);
|
||||
else
|
||||
var [url, post, charset] = [elem.href || elem.src, null, elem.ownerDocument.characterSet];
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ var StatusLine = Module("statusline", {
|
||||
init: function () {
|
||||
this._statusLine = document.getElementById("status-bar");
|
||||
this.statusBar = document.getElementById("addon-bar") || this._statusLine;
|
||||
this.statusBar.collapsed = true; // it is later restored unless the user sets laststatus=0
|
||||
this.statusBar.collapsed = true;
|
||||
this.baseGroup = this.statusBar == this._statusLine ? "StatusLine " : "";
|
||||
|
||||
if (this.statusBar.localName == "toolbar") {
|
||||
|
||||
@@ -211,8 +211,9 @@
|
||||
<h2 tag="status-line status-bar">Status line</h2>
|
||||
|
||||
<p>
|
||||
The status line appears at the bottom of each window. The <o>laststatus</o>
|
||||
option can be used to specify when the status line appears.
|
||||
The status line appears at the bottom of each window. You can use
|
||||
<o>guioptions</o> to specify if and when the status line appears, as well
|
||||
as its relation to the command line and messages.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
||||
@@ -169,8 +169,12 @@ function endModule() {
|
||||
|
||||
function require(obj, name, from) {
|
||||
try {
|
||||
if (arguments.length === 1)
|
||||
[obj, name] = [{}, obj];
|
||||
|
||||
defineModule.loadLog.push((from || "require") + ": loading " + name + " into " + obj.NAME);
|
||||
JSMLoader.load(name + ".jsm", obj);
|
||||
return obj;
|
||||
}
|
||||
catch (e) {
|
||||
defineModule.dump("loading " + String.quote(name + ".jsm") + "\n");
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
try {
|
||||
|
||||
let global = this;
|
||||
Components.utils.import("resource://dactyl/bootstrap.jsm");
|
||||
defineModule("config", {
|
||||
exports: ["ConfigBase", "Config", "config"],
|
||||
@@ -54,7 +55,7 @@ var ConfigBase = Class("ConfigBase", {
|
||||
addon: Class.memoize(function () {
|
||||
let addon = services.fuel.storage.get("dactyl.bootstrap", {}).addon;
|
||||
if (!addon)
|
||||
addon = AddonManager.getAddonByID(this.addonID);
|
||||
addon = require("addons").AddonManager.getAddonByID(this.addonID);
|
||||
return addon;
|
||||
}),
|
||||
|
||||
|
||||
@@ -145,10 +145,10 @@ var Highlights = Module("Highlight", {
|
||||
|
||||
let highlight = this.highlight[key] || this._create(false, [key]);
|
||||
|
||||
let extends = extend || highlight.extend;
|
||||
let bases = extend || highlight.extend;
|
||||
if (append) {
|
||||
newStyle = Styles.append(highlight.value || "", newStyle);
|
||||
extends = highlight.extends.concat(extends);
|
||||
bases = highlight.extends.concat(bases);
|
||||
}
|
||||
|
||||
if (/^\s*$/.test(newStyle))
|
||||
@@ -161,11 +161,11 @@ var Highlights = Module("Highlight", {
|
||||
return null;
|
||||
}
|
||||
newStyle = highlight.defaultValue;
|
||||
extends = highlight.defaultExtends;
|
||||
bases = highlight.defaultExtends;
|
||||
}
|
||||
|
||||
highlight.set("value", newStyle || "");
|
||||
highlight.extends = array.uniq(extends, true);
|
||||
highlight.extends = array.uniq(bases, true);
|
||||
if (force)
|
||||
highlight.style.enabled = true;
|
||||
this.highlight[highlight.class] = highlight;
|
||||
|
||||
@@ -836,7 +836,7 @@ unlet s:cpo_save
|
||||
|
||||
let result = io.system(arg);
|
||||
if (result.returnValue != 0)
|
||||
result.output += "\nshell returned " + res;
|
||||
result.output += "\nshell returned " + result.returnValue;
|
||||
|
||||
modules.commandline.command = "!" + arg;
|
||||
modules.commandline.commandOutput(<span highlight="CmdOutput">{result.output}</span>);
|
||||
|
||||
@@ -1179,7 +1179,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
|
||||
}
|
||||
}
|
||||
if (post)
|
||||
return [url, elems.join('&'), elems, charset];
|
||||
return [url, elems.join('&'), charset, elems];
|
||||
return [url + "?" + elems.join('&'), null, charset];
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user