[Pkg-mozext-commits] [greasemonkey] 04/55: Only add .cmd on Windows
David Prévot
taffit at moszumanska.debian.org
Thu Oct 29 15:38:01 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository greasemonkey.
commit ec4a6d532486eaf7e101799752ab6f3c10ca99b4
Author: Jeroen van Warmerdam <jeronevw at hotmail.com>
Date: Sun Sep 13 15:42:26 2015 +0200
Only add .cmd on Windows
---
modules/util/setEditor.js | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/modules/util/setEditor.js b/modules/util/setEditor.js
index 3506691..df3dcf7 100644
--- a/modules/util/setEditor.js
+++ b/modules/util/setEditor.js
@@ -1,5 +1,6 @@
Components.utils.import('chrome://greasemonkey-modules/content/prefmanager.js');
Components.utils.import('chrome://greasemonkey-modules/content/util.js');
+Components.utils.import("resource://gre/modules/Services.jsm");
var EXPORTED_SYMBOLS = ['setEditor'];
@@ -27,8 +28,11 @@ function setEditor(aScratchpad) {
filePicker.init(
GM_util.getBrowserWindow(), EDITOR_PROMPT, nsIFilePicker.modeOpen);
filePicker.appendFilters(nsIFilePicker.filterApps);
- filePicker.appendFilter("*.cmd", "*.cmd");
-
+ if (Services.appShell.hiddenDOMWindow.navigator.platform
+ .indexOf("Win") != -1) {
+ filePicker.appendFilter("*.cmd", "*.cmd");
+ }
+
var editor = GM_util.getEditor();
if (editor) {
filePicker.defaultString = editor.leafName;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/greasemonkey.git
More information about the Pkg-mozext-commits
mailing list