Importing and saving css files: Filter for css files in code, but missing from file picker

RESOLVED WONTFIX

Status

()

Firefox
Developer Tools: Style Editor
RESOLVED WONTFIX
6 years ago
4 years ago

People

(Reporter: aryx, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Firefox trunk 2012-03-24, Windows XP SP 3 32-bit

There is code for the Style Editor to have a file filter in the file picker for importing and saving CSS files, but it is missing from the file picker (both for importing and saving).

According to the nsIFilePicker documentation https://developer.mozilla.org/en/nsIFilePicker 
fp.appendFilters(_(key + ".filter"), "*.css");
should be
fp.appendFilter(_(key + ".filter"), "*.css");

appendFilters is for predefined filters, appendFilter for custom ones.

The following test case worked for me in the scratchpad:

let fp = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker);
let mode = fp.modeOpen;

fp.init(this, "Import Title", mode);
fp.appendFilter("Import Filter", "*.css");
fp.appendFilters(fp.filterAll);

let rv = fp.show();

I tried to verify that the fix is simply removing the 's', but even with
pref("nglayout.debug.disable_xul_cache", true);
pref("nglayout.debug.disable_xul_fastload", true);
set, the problem remained.
Thanks for looking into this.

I think now that we're showing original sources (Sass, LESS files) we don't want to limit the extensions.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.