зеркало из https://github.com/mozilla/pjs.git
More refinements for bug 52454, et al
This commit is contained in:
Родитель
93afc41b85
Коммит
d57d41bc51
|
@ -192,7 +192,7 @@ nsHelperAppDialog.prototype = {
|
||||||
prompt.setAttribute( "onclick", "dialog.doDebug()" );
|
prompt.setAttribute( "onclick", "dialog.doDebug()" );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Put explanation into text box.
|
// Put explanation of default action into text box.
|
||||||
this.initExplanation();
|
this.initExplanation();
|
||||||
|
|
||||||
// Set default selection (always the "default").
|
// Set default selection (always the "default").
|
||||||
|
@ -209,7 +209,7 @@ nsHelperAppDialog.prototype = {
|
||||||
this.option();
|
this.option();
|
||||||
|
|
||||||
// Set up dialog button callbacks.
|
// Set up dialog button callbacks.
|
||||||
var object = this; // "this.onOK()" doesn't work ?!
|
var object = this; // "this.onOK()" doesn't work!
|
||||||
this.mDialog.doSetOKCancel( function () { return object.onOK(); },
|
this.mDialog.doSetOKCancel( function () { return object.onOK(); },
|
||||||
function () { return object.onCancel(); } );
|
function () { return object.onCancel(); } );
|
||||||
|
|
||||||
|
@ -243,19 +243,21 @@ nsHelperAppDialog.prototype = {
|
||||||
if ( this.mLauncher.MIMEInfo.preferredAction == Components.interfaces.nsIMIMEInfo.saveToDisk ) {
|
if ( this.mLauncher.MIMEInfo.preferredAction == Components.interfaces.nsIMIMEInfo.saveToDisk ) {
|
||||||
expl.value = this.getString( "explanation.saveToDisk" );
|
expl.value = this.getString( "explanation.saveToDisk" );
|
||||||
} else {
|
} else {
|
||||||
// Default is to open with application.
|
// Default is to "open with system default."
|
||||||
var appDesc = this.mLauncher.MIMEInfo.applicationDescription;
|
var appDesc = this.getString( "explanation.defaultApp" );
|
||||||
if ( appDesc != "" ) {
|
if ( this.mLauncher.MIMEInfo.preferredAction != Components.interfaces.nsIMIMEInfo.useSystemDefault ) {
|
||||||
// Use application description.
|
// If opening using the app, we prefer to use the app description.
|
||||||
expl.value= this.replaceInsert( this.getString( "explanation.openUsing" ), 1, appDesc );
|
appDesc = this.mLauncher.MIMEInfo.applicationDescription;
|
||||||
} else {
|
if ( appDesc != "" ) {
|
||||||
var app = this.mLauncher.MIMEInfo.preferredApplicationHandler;
|
// Use application description.
|
||||||
if ( app ) {
|
expl.value= this.replaceInsert( this.getString( "explanation.openUsing" ), 1, appDesc );
|
||||||
// Use application path.
|
|
||||||
expl.value = this.replaceInsert( this.getString( "explanation.openUsing" ), 1, app.unicodePath );
|
|
||||||
} else {
|
} else {
|
||||||
// Use vague "default app for this type"
|
// If no description, use the app executable name.
|
||||||
expl.value = this.getString( "explanation.defaultApp" );
|
var app = this.mLauncher.MIMEInfo.preferredApplicationHandler;
|
||||||
|
if ( app ) {
|
||||||
|
// Use application path.
|
||||||
|
expl.value = this.replaceInsert( this.getString( "explanation.openUsing" ), 1, app.unicodePath );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,10 +64,12 @@
|
||||||
accesskey="&default.set.accesskey;"
|
accesskey="&default.set.accesskey;"
|
||||||
oncommand="dialog.setDefault()"/>
|
oncommand="dialog.setDefault()"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
|
<!-- Make user go to Set Default... for this (for now)
|
||||||
<checkbox id="alwaysAsk"
|
<checkbox id="alwaysAsk"
|
||||||
label="&alwaysAsk.label;"
|
label="&alwaysAsk.label;"
|
||||||
accesskey="&alwaysAsk.accesskey;"
|
accesskey="&alwaysAsk.accesskey;"
|
||||||
checked="true"/>
|
checked="true"/>
|
||||||
|
-->
|
||||||
</vbox>
|
</vbox>
|
||||||
<radio id="different"
|
<radio id="different"
|
||||||
group="option"
|
group="option"
|
||||||
|
|
Загрузка…
Ссылка в новой задаче