From 4166f78b73eda3de797ba0eea2d1d52ed111535e Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Sun, 24 Apr 2011 11:07:10 -0400 Subject: [PATCH] =?UTF-8?q?Fix=20missing=20ancestor=20modes=20in=20:listke?= =?UTF-8?q?ys,=20recognize=20paths=20like=20c:/=20on=20Windows=C2=AE,=20an?= =?UTF-8?q?d=20elide=20redundant=20-group=3Duser=20in=20:style=20serializa?= =?UTF-8?q?tion.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/content/dactyl.js | 2 +- common/content/mappings.js | 2 +- common/modules/io.jsm | 5 ++++- common/modules/styles.jsm | 5 ++--- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/common/content/dactyl.js b/common/content/dactyl.js index 1bb6a68a..6b567acd 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -1296,7 +1296,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { return urls.map(function (url) { url = url.trim(); - if (/^(\.{0,2}|~)(\/|$)/.test(url)) { + if (/^(\.{0,2}|~)(\/|$)/.test(url) || util.OS.isWindows && /^[a-z]:/i.test(url)) { try { // Try to find a matching file. let file = io.File(url); diff --git a/common/content/mappings.js b/common/content/mappings.js index e7badaa8..5ed26659 100644 --- a/common/content/mappings.js +++ b/common/content/mappings.js @@ -689,7 +689,7 @@ var Mappings = Module("mappings", { iterate: function (args, mainOnly) { let modes = [this.getMode(args)]; if (!mainOnly) - modes = modes.concat(modes[0].bases); + modes = modes.concat(modes[0].allBases); let seen = {}; // Bloody hell. --Kris diff --git a/common/modules/io.jsm b/common/modules/io.jsm index f5af1188..c2cc45ea 100644 --- a/common/modules/io.jsm +++ b/common/modules/io.jsm @@ -992,7 +992,10 @@ unlet s:cpo_save } } if (!match || match.scheme === "resource" && match.path) - if (/^(\.{0,2}|~)\/|^file:/.test(context.filter) || util.getFile(context.filter) || io.isJarURL(context.filter)) + if (/^(\.{0,2}|~)\/|^file:/.test(context.filter) + || util.OS.isWindows && /^[a-z]:/i.test(url) + || util.getFile(context.filter) + || io.isJarURL(context.filter)) completion.file(context, full); }); }, diff --git a/common/modules/styles.jsm b/common/modules/styles.jsm index d267565f..69d7476a 100644 --- a/common/modules/styles.jsm +++ b/common/modules/styles.jsm @@ -609,9 +609,8 @@ var Styles = Module("Styles", { command: "style", arguments: [style.sites.join(",")], literalArg: style.css, - options: update({ - "-group": hive.name, - }, + options: update( + hive.name == "user" ? {} : { "-group": hive.name }, style.name ? { "-name": style.name } : {}) }))) .flatten().array