Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteGroovyScriptFromFile.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteGroovyScriptFromFile.java	(revision 439)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteGroovyScriptFromFile.java	(revision 440)
@@ -60,7 +60,7 @@
 		ISelection selection = HandlerUtil.getCurrentSelection(event);
 		Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event).getShell();
 
-		String scriptCurrentDir = TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.USER_TXM_HOME)+ "/scripts";
+		String scriptCurrentDir = TXMPreferences.getString(TBXPreferences.USER_TXM_HOME, TBXPreferences.PREFERENCES_NODE)+ "/scripts";
 
 		FileDialog dialog = new FileDialog(shell, SWT.OPEN);
 
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteScript.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteScript.java	(revision 439)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteScript.java	(revision 440)
@@ -110,7 +110,7 @@
 			}
 			dialog.setFilterExtensions(new String[] { "*.groovy" }); //$NON-NLS-1$
 
-			String scriptCurrentDir = TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.USER_TXM_HOME)+ "/scripts";
+			String scriptCurrentDir = TXMPreferences.getString(TBXPreferences.USER_TXM_HOME, TBXPreferences.PREFERENCES_NODE)+ "/scripts";
 
 			dialog.setFilterPath(scriptCurrentDir);
 			result = dialog.open();
@@ -120,7 +120,7 @@
 
 		if (executionFromEditor && txteditor != null) { // save file if needed 
 			if (txteditor.isSaveOnCloseNeeded()) { // check if file need to be saved
-				boolean doit = TXMPreferences.getBoolean(RCPPreferences.PREFERENCES_NODE, RCPPreferences.SAVE_BEFORE_EXECUTION);
+				boolean doit = TXMPreferences.getBoolean(RCPPreferences.SAVE_BEFORE_EXECUTION, RCPPreferences.PREFERENCES_NODE);
 				//System.out.println("Save file? "+doit);
 				if (!doit) { // ask user
 					MessageDialog dialog = new MessageDialog(shell, Messages.ExecuteScript_0+result, null,
@@ -132,7 +132,7 @@
 						    Composite container = (Composite) super.createDialogArea(parent);
 						    checkDefault = new Button(container, SWT.CHECK);
 						    checkDefault.setText(Messages.ExecuteScript_6);
-						    boolean b = TXMPreferences.getBoolean(RCPPreferences.PREFERENCES_NODE, RCPPreferences.SAVE_BEFORE_EXECUTION);
+						    boolean b = TXMPreferences.getBoolean(RCPPreferences.SAVE_BEFORE_EXECUTION, RCPPreferences.PREFERENCES_NODE);
 						    checkDefault.setSelection(b);
 						    
 						    checkDefault.addSelectionListener(new SelectionListener() {
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ImportSelectedText.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ImportSelectedText.java	(revision 439)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ImportSelectedText.java	(revision 440)
@@ -160,7 +160,8 @@
 //		} else { System.out.println(Messages.ImportSelectedText_12+corpusElem.getAttribute("lang"));}  //$NON-NLS-1$
 		
 		String locale = Locale.getDefault().getLanguage();
-		String lang = TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.IMPORT_DEFAULT_LANG, locale);
+		//FIXME: the default value should be computed in the preferences initializer
+		String lang = TXMPreferences.getString(TBXPreferences.IMPORT_DEFAULT_LANG, null, TBXPreferences.PREFERENCES_NODE, locale);
 		if (lang.length() == 0) lang = locale;
 		if ("??".equals(lang)) { //$NON-NLS-1$
 			LangDetector detector = new LangDetector(quicksrc);
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenManual.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenManual.java	(revision 439)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenManual.java	(revision 440)
@@ -66,7 +66,7 @@
 
 	public static void open() {
 		String locale = Locale.getDefault().getLanguage();
-		String installdir = TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.INSTALL_DIR, ""); //$NON-NLS-1$
+		String installdir = TXMPreferences.getString(TBXPreferences.INSTALL_DIR, TBXPreferences.PREFERENCES_NODE);
 
 		String file = files.get(locale);
 		if (file == null) file = files.get(default_locale);
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteGroovyText.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteGroovyText.java	(revision 439)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteGroovyText.java	(revision 440)
@@ -110,7 +110,7 @@
 					scriptfile));
 			return null;
 		}
-		final String scriptRootDir = TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.USER_TXM_HOME)+ "/scripts";
+		final String scriptRootDir = TXMPreferences.getString(TBXPreferences.USER_TXM_HOME, TBXPreferences.PREFERENCES_NODE)+ "/scripts";
 
 		// get current selection of the corpora view
 				final Object corpusViewSelection = CorporaView.getSelection();
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CreateMacro.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CreateMacro.java	(revision 439)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CreateMacro.java	(revision 440)
@@ -63,7 +63,7 @@
 	public Object execute(ExecutionEvent event) throws ExecutionException {
 
 		//get scripts dir
-		String scriptRootDir = TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.USER_TXM_HOME)+ "/scripts";
+		String scriptRootDir = TXMPreferences.getString(TBXPreferences.USER_TXM_HOME, TBXPreferences.PREFERENCES_NODE)+ "/scripts";
 		File currentRootDir = new File(scriptRootDir, "macro"); //$NON-NLS-1$
 
 		//if selection is a file, get its path
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CreateFolder.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CreateFolder.java	(revision 439)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CreateFolder.java	(revision 440)
@@ -62,7 +62,8 @@
 				.getActivePage().getActivePart();
 
 		//get scripts dir
-		String dir = TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.USER_TXM_HOME, System.getProperty("user.home")); //$NON-NLS-1$
+		//FIXME: the default value should be defined in the preferences initializer
+		String dir = TXMPreferences.getString(TBXPreferences.USER_TXM_HOME, null, TBXPreferences.PREFERENCES_NODE, System.getProperty("user.home")); //$NON-NLS-1$
 
 		//if selection is a file, get its path
 		ISelection selection = HandlerUtil.getCurrentSelection(event);
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CreateFile.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CreateFile.java	(revision 439)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CreateFile.java	(revision 440)
@@ -62,7 +62,7 @@
 	public Object execute(ExecutionEvent event) throws ExecutionException {
 
 		//get scripts dir
-		String scriptCurrentDir = TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.USER_TXM_HOME)+ "/scripts";
+		String scriptCurrentDir = TXMPreferences.getString(TBXPreferences.USER_TXM_HOME, TBXPreferences.PREFERENCES_NODE)+ "/scripts";
 
 		boolean useSavedValue = true; // if a file/folder is selected, dont use the saved value
 		
