TagSpaces is an offline, open source, document manager with tagging support
Functionality for upgrading of the settings implemented
uggrockdc9830751970
diff --git a/build.number b/build.numberindex 465583499..1cb6ca0f2 100644--- a/build.number+++ b/build.number@@ -1,3 +1,3 @@#Build Number for ANT. Do not edit!-#Fri Jan 11 10:59:54 CET 2013-build.number=1211+#Tue Jan 15 23:06:03 CET 2013+build.number=1221diff --git a/data/js/main.js b/data/js/main.jsindex 6134584ca..7c9e640e9 100644--- a/data/js/main.js+++ b/data/js/main.js@@ -68,6 +68,8 @@ var initApp = function(){if(TSSETTINGS.Settings == undefined) {TSSETTINGS.Settings = TSSETTINGS.DefaultSettings;}++ TSSETTINGS.upgradeSettings();// Init viewsUIAPI.ViewManager.initViews();diff --git a/data/js/settings.api.js b/data/js/settings.api.jsindex d62eb3beb..b11cf9617 100644--- a/data/js/settings.api.js+++ b/data/js/settings.api.js@@ -44,9 +44,9 @@ TSSETTINGS.DefaultSettings = {"appBuild": "@VERSION@.@BUILD@","settingsVersion": 1,"supportedFileTypeThumnailing": ['jpg','jpeg','png','gif'],- "newTextFileContent": "Text file created with tagspaces(@VERSION@.@BUILD@)...",- "newHTMLFileContent": "<html><head><meta http-equiv='content-type' content='text/html; charset=utf-8'><title>Tagspaces File</title></head><body>File created with tagspaces(@VERSION@.@BUILD@)...</body></html>",- "newMDFileContent": '#File created with tagspaces(@VERSION@.@BUILD@)...',+ "newTextFileContent": "Text file created with tagspaces!",+ "newHTMLFileContent": "<html><head><meta http-equiv='content-type' content='text/html; charset=utf-8'><title>Tagspaces File</title></head><body>File created with tagspaces!</body></html>",+ "newMDFileContent": '#File created with tagspaces!',"showUnixHiddenEntries": false,"lastOpenedTSID": 0,"lastOpenedDirectory": "",@@ -126,13 +126,30 @@ TSSETTINGS.Settings = undefined;//{"title":"2010","isFolder":true,"isLazy":true,"key":"z:\\Chronique\\2010"},//];-TSSETTINGS.getExtensionPath = function() {- // TODO if setting not existing create it automatically with directory- return TSSETTINGS.Settings["extensionsPath"];+TSSETTINGS.upgradeSettings = function() {+ if(TSSETTINGS.Settings["appBuild"].localeCompare(TSSETTINGS.DefaultSettings["appBuild"]) < 0) {+ console.debug("Upgrading settings");+ TSSETTINGS.Settings["extensions"] = TSSETTINGS.DefaultSettings["extensions"];+ TSSETTINGS.Settings["appVersion"] = TSSETTINGS.DefaultSettings["appVersion"];+ TSSETTINGS.Settings["appBuild"] = TSSETTINGS.DefaultSettings["appBuild"];+ TSSETTINGS.getExtensions();+ TSSETTINGS.getExtensionPath();+ TSSETTINGS.saveSettings();+ }}-TSSETTINGS.setExtensionPath = function(extPath) {- return TSSETTINGS.Settings["extensionsPath"] = extPath;+TSSETTINGS.getExtensions = function() {+ if(TSSETTINGS.Settings["extensions"] == null) {+ TSSETTINGS.Settings["extensions"] = TSSETTINGS.DefaultSettings["extensions"];+ }+ return TSSETTINGS.Settings["extensions"];+}++TSSETTINGS.getExtensionPath = function() {+ if(TSSETTINGS.Settings["extensionsPath"] == null) {+ TSSETTINGS.Settings["extensionsPath"] = TSSETTINGS.DefaultSettings["extensionsPath"];+ }+ return TSSETTINGS.Settings["extensionsPath"];}TSSETTINGS.getNewTextFileContent = function() {@@ -284,7 +301,6 @@ TSSETTINGS.createTag = function(tagData, newTagName) {TSSETTINGS.editTagGroup = function(tagData, tagGroupName) {for(var i=0; i < TSSETTINGS.Settings["tagGroups"].length; i++) {if(TSSETTINGS.Settings["tagGroups"][i].key == tagData.key) {-// console.debug("Deleting taggroup "+TSSETTINGS.Settings["tagGroups"][i].key);TSSETTINGS.Settings["tagGroups"][i].title = tagGroupName;break;}diff --git a/data/manifest.json b/data/manifest.jsonindex a24d8e96c..8145ce38e 100644--- a/data/manifest.json+++ b/data/manifest.json@@ -1,6 +1,6 @@{"name": "TagSpaces",- "version": "1.2.1209",+ "version": "1.3.1219","manifest_version": 2,"description": "TagSpaces Explorer","icons": {@@ -22,7 +22,7 @@{"path": "chrome/npapi-fileio/npapi-file-io-64.so", "public": false}],"permissions": [- "tabs", "http://*/*", "file://*/*"+ "tabs", "http://*/*", "file://*/*"],"content_security_policy": "script-src 'self' ; object-src 'self'","web_accessible_resources": [diff --git a/package.json b/package.jsonindex 046217aea..a13da2155 100644--- a/package.json+++ b/package.json@@ -2,7 +2,7 @@"name": "tagspaces","license": "AGPL 3.0","author": "Ugg Rock",- "version": "1.2.1210",+ "version": "1.3.1219","fullName": "TagSpaces","id": "jid1-FBaMKxTifTSahQ","description": "TagSpaces is a firefox addon, which allows you to browse your local file system and add tags to your files.",diff --git a/update.rdf b/update.rdfindex 04d7d3700..b3aec52da 100644--- a/update.rdf+++ b/update.rdf@@ -7,14 +7,14 @@<r:Seq><r:li><r:Description>- <version>1.2.1210</version>+ <version>1.3.1219</version><targetApplication><r:Description><id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</id><minVersion>16.0</minVersion><maxVersion>*</maxVersion>- <updateLink>http://tagspaces.com/releases/1.2/tagspaces.1.2.1210.xpi</updateLink>- <updateInfoURL>http://tagspaces.com/releases/1.2/updateInfo.xml</updateInfoURL>+ <updateLink>http://tagspaces.com/releases/1.3/tagspaces.1.3.1219.xpi</updateLink>+ <updateInfoURL>http://tagspaces.com/releases/1.3/updateInfo.xml</updateInfoURL></r:Description></targetApplication></r:Description>