mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-24 11:27:49 +00:00
Opening the "Advanced" dialog and cancelling it should not change the
helper app dialog contents. Bug 124723, r=law, sr=jag
This commit is contained in:
parent
3125ae9530
commit
073e999f03
@ -62,6 +62,7 @@ function nsHelperAppDialog() {
|
||||
this.givenDefaultApp = false;
|
||||
this.strings = new Array;
|
||||
this.elements = new Array;
|
||||
this.updateSelf = true;
|
||||
}
|
||||
|
||||
nsHelperAppDialog.prototype = {
|
||||
@ -502,14 +503,17 @@ nsHelperAppDialog.prototype = {
|
||||
}
|
||||
|
||||
// Open whichever dialog is appropriate, passing this dialog object as argument.
|
||||
this.updateSelf = false; // dialog will reset to true onOK
|
||||
this.mDialog.openDialog( dlgUrl,
|
||||
"_blank",
|
||||
"chrome,modal=yes,resizable=no",
|
||||
this );
|
||||
|
||||
// Refresh dialog with updated info about the default action.
|
||||
this.initIntro();
|
||||
this.initAppAndSaveToDiskValues();
|
||||
if (this.updateSelf) {
|
||||
// Refresh dialog with updated info about the default action.
|
||||
this.initIntro();
|
||||
this.initAppAndSaveToDiskValues();
|
||||
}
|
||||
},
|
||||
|
||||
// updateMIMEInfo: This is called from the pref-applications-edit dialog when the user
|
||||
|
@ -282,6 +282,9 @@
|
||||
} else {
|
||||
info.preferredAction = Components.interfaces.nsIMIMEInfo.handleInternally;
|
||||
}
|
||||
|
||||
// tell the helper app dialog to update itself
|
||||
gHelperAppDlg.updateSelf = true;
|
||||
}
|
||||
|
||||
window.opener.gUpdateTypeRV = true;
|
||||
|
@ -45,7 +45,8 @@ function Startup()
|
||||
gDescriptionField.value = info.Description;
|
||||
gExtensionField.value = info.primaryExtension;
|
||||
gMIMEField.value = info.MIMEType;
|
||||
var app = info.preferredApplicationHandler;
|
||||
// an app may have been selected in the opening dialog but not in the mimeinfo
|
||||
var app = info.preferredApplicationHandler || window.arguments[0].chosenApp;
|
||||
if ( app ) {
|
||||
gAppPath.value = app.unicodePath;
|
||||
}
|
||||
@ -169,6 +170,9 @@ function onOK()
|
||||
info.Description = gDescriptionField.value;
|
||||
info.preferredApplicationHandler = file;
|
||||
info.applicationDescription = handlerInfo.appDisplayName;
|
||||
|
||||
// Tell the nsIHelperAppLauncherDialog to update to the changes
|
||||
window.arguments[0].updateSelf = true;
|
||||
}
|
||||
|
||||
window.opener.gNewTypeRV = gMIMEField.value;
|
||||
|
Loading…
x
Reference in New Issue
Block a user