diff options
author | Kris Maglione <maglione.k@gmail.com> | 2011-01-14 23:32:27 -0500 |
---|---|---|
committer | Kris Maglione <maglione.k@gmail.com> | 2011-01-14 23:32:27 -0500 |
commit | 67e2a23c5a5f7dc7859175ac6e9edb878b66cea6 (patch) | |
tree | 1aa9b6726273b6ddf9442173d50263aae3d9854d /common | |
parent | 74ae88b10f272f9f45e86c7082273cc033dd5e1e (diff) | |
download | pentadactyl-67e2a23c5a5f7dc7859175ac6e9edb878b66cea6.tar.gz |
Fix zoom level display for fractional percentages.
Diffstat (limited to 'common')
-rwxr-xr-x | common/bootstrap.js | 11 | ||||
-rw-r--r-- | common/content/autocommands.js | 2 | ||||
-rw-r--r-- | common/content/dactyl.js | 3 | ||||
-rw-r--r-- | common/content/statusline.js | 2 |
4 files changed, 4 insertions, 14 deletions
diff --git a/common/bootstrap.js b/common/bootstrap.js index 9edd298c..027552f8 100755 --- a/common/bootstrap.js +++ b/common/bootstrap.js @@ -31,17 +31,6 @@ function httpGet(url) { return xmlhttp; } -function writeFile(file, buf) { - let fstream = Cc["@mozilla.org/network/file-output-stream;1"].createInstance(Ci.nsIFileOutputStream); - let stream = Cc["@mozilla.org/intl/converter-output-stream;1"].createInstance(Ci.nsIConverterOutputStream); - - fstream.init(file, 0x02 | 0x08 | 0x20, parseInt("0644", 8), 0); - stream.init(fstream, "UTF-8", 0, "?"); - stream.writeString(buf); - stream.close(); - fstream.close(); -} - let initialized = false; let addon = null; let basePath = null; diff --git a/common/content/autocommands.js b/common/content/autocommands.js index 532bccd4..84e9f8c2 100644 --- a/common/content/autocommands.js +++ b/common/content/autocommands.js @@ -31,7 +31,7 @@ var AutoCommands = Module("autocommands", { */ add: function (events, regexp, cmd) { events.forEach(function (event) { - this._store.push(AutoCommand(event, Option.parse.regexplist(regexp), cmd)); + this._store.push(AutoCommand(event, Option.parse.regexplist(regexp.source || regexp), cmd)); }, this); }, diff --git a/common/content/dactyl.js b/common/content/dactyl.js index 75e43856..cf9e9eb9 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -1181,8 +1181,9 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { */ reportError: function reportError(error, echo) { if (error instanceof FailedAssertion || error.message === "Interrupted") { + let prefix = io.sourcing ? io.sourcing.file + ":" + io.sourcing.line + ": " : ""; if (error.message) - dactyl.echoerr(template.linkifyHelp(error.message)); + dactyl.echoerr(template.linkifyHelp(prefix + error.message)); else dactyl.beep(); return; diff --git a/common/content/statusline.js b/common/content/statusline.js index 0d623666..f78a3691 100644 --- a/common/content/statusline.js +++ b/common/content/statusline.js @@ -309,7 +309,7 @@ var StatusLine = Module("statusline", { if (percent == 100) this.widgets.zoomlevel.value = ""; else { - percent = (" " + percent).substr(-3); + percent = (" " + Math.round(percent)).substr(-3); if (full) this.widgets.zoomlevel.value = " [" + percent + "%]"; else |