/************************************************************************** * * @@@BUILDINFO@@@ 68windowMenu-2.jsx 2.0.1.68 18-May-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. **************************************************************************/ ///////////////////////////////////////////////////////////////////////////// // The Window menu menus.window = new MenuElement ("menu", "$$$/ESToolkit/Menu/Window=&Window", "at the end of menubar", "window"); // Add this setup to the late startup tasks. addDelayedTask( setupHelpMenu ); function setupHelpMenu() { menus.updateWindowMenu(); } // The Window menu is recreated every time a document opens or closes to // reflect the list of open documents. // Note: do not call before 69helpMenu has been loaded. menus.updateWindowMenu = function() { // // remove all menu items of window menu // for( menuItem in menus.window ) { if( menus.window[menuItem] instanceof MenuElement ) { menus.window[menuItem].remove(); menus.window[menuItem] = null; } } // remove menu items for documents (separat array, so they don't appear in shortcut prefs) if( menus.window.docs ) { for( var i=0; i 1); } var separator = "---"; menus.window.docs = []; for (i = 0; i < documents.length; i++) { var doc = documents [i]; var win = doc.parent; var text = ""; if (i < 9) text = "&" + (i+1) + " "; text += doc.paneTitle; menus.window.docs[i] = new MenuElement ("command", text, separator + "at the end of window"); separator = ""; menus.window.docs[i].window = win; menus.window.docs[i].onSelect = function() { this.window.active = true; this.window.minimized = false; } } // Reload all hot keys menus.loadKeys(); }