Save/restore tabs

This commit is contained in:
Nicholas O'Leary
2013-10-25 21:34:00 +01:00
parent f3e33f4c29
commit 3604286793
5 changed files with 115 additions and 67 deletions

View File

@@ -292,9 +292,11 @@ var parseConfig = function() {
missingTypes = [];
for (var i in activeConfig) {
var type = activeConfig[i].type;
var nt = node_type_registry.get(type);
if (!nt && missingTypes.indexOf(type) == -1) {
missingTypes.push(type);
if (type != "workspace") {
var nt = node_type_registry.get(type);
if (!nt && missingTypes.indexOf(type) == -1) {
missingTypes.push(type);
}
}
};
if (missingTypes.length > 0) {
@@ -309,19 +311,21 @@ var parseConfig = function() {
events.emit("nodes-starting");
for (var i in activeConfig) {
var nn = null;
var nt = node_type_registry.get(activeConfig[i].type);
if (nt) {
try {
nn = new nt(activeConfig[i]);
if (activeConfig[i].type != "workspace") {
var nt = node_type_registry.get(activeConfig[i].type);
if (nt) {
try {
nn = new nt(activeConfig[i]);
}
catch (err) {
util.log("[red] "+activeConfig[i].type+" : "+err);
}
}
catch (err) {
util.log("[red] "+activeConfig[i].type+" : "+err);
// console.log(nn);
if (nn == null) {
util.log("[red] unknown type: "+activeConfig[i].type);
}
}
// console.log(nn);
if (nn == null) {
util.log("[red] unknown type: "+activeConfig[i].type);
}
}
// Clean up any orphaned credentials
var deletedCredentials = false;