dangtrinhnt / evoluspencil

Automatically exported from code.google.com/p/evoluspencil
3 stars 1 forks source link

OSX File picker for Loading Developer Stencil does not allow you to choose "Default.xml" #539

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Select from Menu: Tools/Developer Tools/Load Developer Stencil Directory...
2. Browse to folder with you Default.xml file

What is the expected output? What do you see instead?
I should be able to pick my Default.xml file, but instead all files including 
Default.xml are "grayed out" and can not be selected.

What version of the product are you using? On what operating system?
Pencil 2.0.3 OSX Lion 10.7.5

Please provide any additional information below.
I was able to fix the issue by changing this file:
Pencil.app/Contents/Resources/content/pencil/mainWindow.js     Line: 188

  Pencil.selectDeveloperStencilDir = function () {
    //alert("Please select the directory that contains the 'Definition.xml' file of your stencil");
    var nsIFilePicker = Components.interfaces.nsIFilePicker;
    var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker);
    fp.init(window, "Select Developer Stencil 'Definition.xml' file", nsIFilePicker.modeGetFile);
//    fp.appendFilter("Definition.xml", "Definition.xml");
// JJ: .appendfilter seems to only accept filters in the format of *.???
    fp.appendFilter("Definition.xml", "*.xml");

Original issue reported on code.google.com by j...@saec-kv.com on 10 Feb 2013 at 7:58