TagSpaces is an offline, open source, document manager with tagging support
opening the last opened location on startup as propesed in #29
Ilian14db7da538eb
diff --git a/data/js/directories.ui.js b/data/js/directories.ui.jsindex 805f2f44c..4b5d91746 100644--- a/data/js/directories.ui.js+++ b/data/js/directories.ui.js@@ -34,6 +34,10 @@ define(function(require, exports, module) {// Handle open default perspective for a locationvar defaultPerspective = currentLocation.perspective;TSCORE.PerspectiveManager.changePerspective(defaultPerspective);++ // Saving the last opened location path in the settings+ TSCORE.Config.setLastOpenedLocation(path);+ TSCORE.Config.saveSettings();}// Updates the directory subtree@@ -631,6 +635,7 @@ define(function(require, exports, module) {$( "#createNewLocation" ).click(function() {showLocationCreateDialog();});+}// Public API definitiondiff --git a/data/js/perspective.manager.js b/data/js/perspective.manager.jsindex dcb3033a3..8e92a2d82 100644--- a/data/js/perspective.manager.js+++ b/data/js/perspective.manager.js@@ -60,6 +60,12 @@ var initPerspectives = function () {} finally {if( perspectives.length == extensions.length) {initPerspectiveSwitcher();++ // Opening last saved location by the start of the application+ var lastLocation = TSCORE.Config.getLastOpenedLocation();+ if(lastLocation != undefined && lastLocation.length > 1) {+ TSCORE.openLocation(lastLocation);+ }}}});diff --git a/data/js/settings.default.js b/data/js/settings.default.jsindex 934e3e678..1c98f0557 100644--- a/data/js/settings.default.js+++ b/data/js/settings.default.js@@ -7,8 +7,8 @@ define(function(require, exports, module) {exports.defaultSettings = {"appName": "TagSpaces","appVersion": "1.7",- "appBuild": "5",- "appBuildID": "201402281342",+ "appBuild": "6",+ "appBuildID": "201402281346","settingsVersion": 2,"newTextFileContent": "Text file created with TagSpaces!","newHTMLFileContent": "<html><head><title>Created with TagSpaces!</title></head><body>Feel free to change this text...</body></html>",