package org.reldb.dbrowser.ui.preferences;

import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.util.Util;

/**
 * This class creates a preference page
 */
public class PreferencePageGeneral extends FieldEditorPreferencePage {
	public static final String LARGE_ICONS = "general.double_icons";
	public static final String DEFAULT_CMD_MODE = "general.default_cmd_mode";

	/**
	 * Constructor
	 */
	public PreferencePageGeneral() {
		setTitle("General");
		setDescription("General settings.");
	}

	protected void createFieldEditors() {
		String reloadPrompt = "";
		if (!Util.isMac())
			reloadPrompt = "  Restart after changing to see the full effect.";
		addField(new BooleanFieldEditor(LARGE_ICONS, "&Larger icons." + reloadPrompt, getFieldEditorParent()));
		
		addField(new BooleanFieldEditor(DEFAULT_CMD_MODE, "Default to command-line mode.", getFieldEditorParent()));
	}

}

@@ -452,16 +452,99 @@
 d_mode%22;
+%0A%09public static final String SKIP_DEFAULT_DB_LOAD = %22general.skip_default_db_load%22;
 %0A%0A%09/**%0A%09
@@ -1041,14 +1041,153 @@
 nt()));%0A
+%09%09%0A%09%09addField(new BooleanFieldEditor(SKIP_DEFAULT_DB_LOAD, %22Do not automatically load user's default database.%22, getFieldEditorParent()));%0A
 %09%7D%0A%0A%7D%0A

Add preference to not load user's default database.