/************************************************************************** * * @@@BUILDINFO@@@ 91generalPrefs-2.jsx 2.0.1.62 22-Mar-2007 * Copyright 2006-2007 Adobe Systems Incorporated * All Rights Reserved. * * NOTICE: All information contained herein is, and remains the property of * Adobe Systems Incorporated and its suppliers, if any. The intellectual * and technical concepts contained herein are proprietary to Adobe Systems * Incorporated and its suppliers and may be covered by U.S. and Foreign * Patents,patents in process,and are protected by trade secret or copyright * law. Dissemination of this information or reproduction of this material * is strictly forbidden unless prior written permission is obtained from * Adobe Systems Incorporated. **************************************************************************/ // Each Prefs object needs five methods: // prefsObject.create (parentPane) - create the pane and return the Pane object. // prefsObject.preProcess() - preprocess the pane just before being shown. // prefsObject.postProcess() - do any work just before the pane is being hidden. // prefsObject.store() - store the preferences. Return true if the Next Time dialog is needed. // prefsObject.toDefault() - set back to default values var generalPrefs = {}; generalPrefs.create = function (parentPane) { this.pane = parentPane.add ( "group { \ orientation : 'column', \ alignChildren : 'left', \ visible : false, \ alignment : ['left','top'], \ startup : Group \ { \ orientation : 'column', \ alignChildren : 'left', \ opt1 : RadioButton \ { \ text : '$$$/ESToolkit/PreferencesDlg/startNewDoc=Open New &Document', \ helpTip : '$$$/ESToolkit/PreferencesDlg/htStartNewDoc=Open a new blank JavaScript document at startup.' \ }, \ opt2 : RadioButton \ { \ text : '$$$/ESToolkit/PreferencesDlg/startLastDoc=Open Last &Open Documents', \ helpTip : '$$$/ESToolkit/PreferencesDlg/htLastDoc=Open the documents which were opened at last shutdown.' \ }, \ opt3 : RadioButton \ { \ text : '$$$/ESToolkit/PreferencesDlg/startNoDoc=&No Document', \ helpTip : '$$$/ESToolkit/PreferencesDlg/htNoDoc=Open no document at startup.' \ } \ }, \ autolaunch : Checkbox \ { \ text : '$$$/ESToolkit/PreferencesDlg/autolaunch=Auto-Launch Application when Setting Target', \ helpTip : '$$$/ESToolkit/PreferencesDlg/htAutolaunch=Automatically launches application when setting target.' \ }, \ locale : Group \ { \ orientation : 'row', \ lbl : StaticText \ { \ text : '$$$/ESToolkit/PreferencesDlg/languages=&Languages:' \ }, \ list : DropDownList \ { \ helpTip : '$$$/ESToolkit/PreferencesDlg/htLanguage=Select the language to use in the user interface'\ } \ } \ }"); this.pane.locale.list.minimumSize.width = 120; /* if (_win) { var fontSize = this.pane.locale.list.graphics.font.size; // Make sure to select a Unicode font for Japanese and other languages this.pane.locale.list.graphics.font = ScriptUI.newFont( "Arial Unicode MS", fontSize ); } */ this.pane.prefsObj = this; this.pane.preProcess = function() { if (!this.prefsObj.loaded) this.prefsObj.load(); } this.pane.postProcess = function() {} this.pane.toDefault = function() { this.startup.opt1.value = PrefUtils.getDefaultValue( 'prefs.startup.newDoc', 'Boolean' ); this.startup.opt2.value = PrefUtils.getDefaultValue( 'prefs.startup.oldDocs', 'Boolean' ); this.startup.opt3.value = PrefUtils.getDefaultValue( 'prefs.startup.noDocs', 'Boolean' ); this.autolaunch.value = PrefUtils.getDefaultValue( 'prefs.autolaunch', 'Boolean' ); this.locale.list.selection = 0; } this.loaded = false; return this.pane; } ///////////////////////////////////////////////////////////////////////// // Load prefs into the general prefs pane generalPrefs.load = function() { if (this.loaded) return; this.loaded = true; if( locales.length == 0 ) { // // take only estk dat files // var datFiles = Folder( app.requiredFolder ).getFiles( '??_??.dat' ); for( var i=0; i