changeset 35:4be5f7a5316f database-connection-manager

Suppress output messages on preferences loading and saving
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Mon, 05 Dec 2011 16:20:06 +0100
parents 03d92954b939
children 5eb86f6881ef
files m-toolbox/classes/@LTPDAprefs/loadPrefs.m src/MPipeline2/src/mpipeline/ltpdapreferences/LTPDAPreferences.java
diffstat 2 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/m-toolbox/classes/@LTPDAprefs/loadPrefs.m	Mon Dec 05 16:20:06 2011 +0100
+++ b/m-toolbox/classes/@LTPDAprefs/loadPrefs.m	Mon Dec 05 16:20:06 2011 +0100
@@ -10,7 +10,6 @@
 %
 
 function loadPrefs(varargin)
-  fprintf('Loading LTPDA preferences from %s ...\n', LTPDAprefs.preffile);
   v = ver('LTPDA');
   nv = utils.helper.ver2num(v(1).Version);
   prefs = mpipeline.ltpdapreferences.LTPDAPreferences.loadFromDisk(LTPDAprefs.preffile, nv);
--- a/src/MPipeline2/src/mpipeline/ltpdapreferences/LTPDAPreferences.java	Mon Dec 05 16:20:06 2011 +0100
+++ b/src/MPipeline2/src/mpipeline/ltpdapreferences/LTPDAPreferences.java	Mon Dec 05 16:20:06 2011 +0100
@@ -141,10 +141,10 @@
   public static LTPDAPreferences loadFromDisk(String filepath, float version) {
 
     LTPDAPreferences loadedPrefs = null;
-
     File filename = new File(filepath);
 
     if (filename.exists()) {
+      Utils.dmsg("Loading preferences from " + filepath);
       try {
         DocumentBuilderFactory parserFactory = DocumentBuilderFactory.newInstance();
         parserFactory.setValidating(false);
@@ -198,9 +198,8 @@
   }
 
   public void writeToDisk() {
-    Utils.msg("Saving preferences to " + filename);
-
     if (filename != null) {
+      Utils.dmsg("Saving preferences to " + filename);
       try {
         Document doc = XMLUtils.createDocument("LTPDAPreferences");
         Element root = doc.getDocumentElement();