add: }  if ( applicationDescription  && this.appLauncher.MIMEInfo.preferredAction != this.nsIMIMEInfo.saveToDisk ) { document.getElementById( "runApp" ).checked = true; } else {  document.getElementById( "saveToDisk" ).checked = true;  document.getElementById( "chooseApp" ).setAttribute( "disabled", "true" ); 
context:     initDialog : function () {        // "Always ask me" is always set (or else we wouldn't have got here!).        document.getElementById( "alwaysAskMe" ).checked = true;        document.getElementById( "alwaysAskMe" ).setAttribute( "disabled", "true" );        // Pre-select the choice the user made last time.        this.chosenApp = this.appLauncher.MIMEInfo.preferredApplicationHandler;        if ( this.chosenApp && this.appLauncher.MIMEInfo.preferredAction != this.nsIMIMEInfo.saveToDisk ) {            // Run app.            document.getElementById( "runApp" ).checked = true;                    } else {            // Save to disk.            document.getElementById( "saveToDisk" ).checked = true;            // Disable choose app button.            document.getElementById( "chooseApp" ).setAttribute( "disabled", "true" );        }        var applicationDescription = this.appLauncher.MIMEInfo.applicationDescription;        if (applicationDescription != "")           document.getElementById( "appName" ).value = applicationDescription;        else if (this.chosenApp)        {          // If a user-chosen application, show its path.          document.getElementById( "appName" ).value = this.chosenApp.unicodePath;        }        // Put content type into dialog text.        var html = document.getElementById( "intro" );        if ( html && html.childNodes && html.childNodes.length ) {            // Get raw text.            var text = html.childNodes[ 0 ].nodeValue;            // Substitute content type for "#1".            text = text.replace( /#1/, this.appLauncher.MIMEInfo.MIMEType );            // Replace #2 with product name.            var brandBundle = srGetStrBundle("chrome://global/locale/brand.properties");            if ( brandBundle ) {                var product = brandBundle.GetStringFromName( "brandShortName" );                text = text.replace( /#2/, product );            }            // Replace text in document.            html.childNodes[ 0 ].nodeValue = text;        }        // Set up dialog button callbacks.        var object = this;        doSetOKCancel( function () { return object.onOK(); },                       function () { return object.onCancel(); } );        moveToAlertPosition();    },
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/41960b6568f052007a527495dba66b671c344945/helperAppLauncher.js/buggy/xpfe/components/ucth/resources/helperAppLauncher.js