Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow .cmd as editor executable. Fixes #2271 #2272

Merged
merged 2 commits into from
Sep 24, 2015

Conversation

jerone
Copy link
Contributor

@jerone jerone commented Sep 13, 2015

Fixes: #2271

2015-09-13 10_51_44-comparing master issues_ 2271-allow-cmd jerone_greasemonkey

@@ -27,6 +27,7 @@ function setEditor(aScratchpad) {
filePicker.init(
GM_util.getBrowserWindow(), EDITOR_PROMPT, nsIFilePicker.modeOpen);
filePicker.appendFilters(nsIFilePicker.filterApps);
filePicker.appendFilter("*.cmd", "*.cmd");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest this supplement:

    if (Services.appShell.hiddenDOMWindow.navigator.platform
        .indexOf("Win") != -1) {
      filePicker.appendFilter("*.cmd", "*.cmd");
    }

And add this line:
https://github.com/greasemonkey/greasemonkey/tree/master/modules/util/setEditor.js#L3:

Components.utils.import("resource://gre/modules/Services.jsm");

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 this will look weird on mac/linux.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@janekptacijarabaci Thanks, changed.

@arantius arantius added this to the 3.5 milestone Sep 23, 2015
@arantius arantius merged commit ec4a6d5 into greasemonkey:master Sep 24, 2015
@jerone jerone deleted the issues/#2271-allow-cmd branch October 16, 2015 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants