Skip to content

Commit

Permalink
tweak defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
bgrins committed Feb 26, 2014
1 parent 48cddf3 commit 2b611b4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion chrome/content/itchpad-window.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function init() {
gItchpad = pad;

// USAGE::
window.postMessage("/Users/bgrinstead/Sites/itchpad|Project Name|Version|icon-sample.png|http://localhost", "*");
// window.postMessage("/bin/|Project Name|Version|icon-sample.png|http://localhost", "*");
});
}

Expand Down
2 changes: 1 addition & 1 deletion lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ var ItchpadLoader = Class({
projectID = projectID || "default";

// XXX: Temporarily do not return the real project, just a fake one.
return promise.resolve(new Itchpad.Itchpad(window, null, toolbox));
// return promise.resolve(new Itchpad.Itchpad(window, null, toolbox));

return Projects.projectForID(projectID).then(project => {
return new Itchpad.Itchpad(window, project, toolbox);
Expand Down
8 changes: 5 additions & 3 deletions lib/stores/local.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ const promise = require("helpers/promise");
const Task = require("helpers/task");
const URL = require("sdk/url");
const OS = require("helpers/osfile");
const { FileUtils } = Cu.import("resource://gre/modules/FileUtils.jsm", {});
const mimeService = Cc["@mozilla.org/mime;1"].getService(Ci.nsIMIMEService);


const CHECK_LINKED_DIRECTORY_DELAY = 2000;
const CHECK_LINKED_DIRECTORY_DELAY = 5000;
const SHOULD_LIVE_REFRESH = true;
const spawn = Task.spawn;

Expand Down Expand Up @@ -125,7 +127,9 @@ var LocalStore = Class({

let worker = new ChromeWorker(data.url("readdir.js"));
let start = Date.now();

worker.onmessage = evt => {
// console.log("Directory read finished in " + ( Date.now() - start ) +"ms", evt);
for (path in evt.data) {
let info = evt.data[path];
info.path = path;
Expand Down Expand Up @@ -293,8 +297,6 @@ var FileResource = Class({
return "x-directory/normal";
}
try {
const { FileUtils } = Cu.import("resource://gre/modules/FileUtils.jsm", {});
const mimeService = Cc["@mozilla.org/mime;1"].getService(Ci.nsIMIMEService);
this._contentType = mimeService.getTypeFromFile(new FileUtils.File(this.path));
} catch(ex) {
console.error(ex);
Expand Down

0 comments on commit 2b611b4

Please sign in to comment.