зеркало из https://github.com/mozilla/pjs.git
Fix bug 86640 -- change helper app dialog to properly remember the selected
course of action, move the "neverAsk" information from prefs back to mimeTypes.rdf, remove the "Reset" button from helper app prefs, set up a way to select "use default OS helper" for a given type. Patch by Bill Law <law@netscape.com> and Philip K. Warren <pkw@us.ibm.com>, r=biesi, sr=bzbarsky, what passes for moa in helper apps=bzbarsky.
This commit is contained in:
Родитель
1f0e013d6c
Коммит
bb6ace680c
|
@ -138,7 +138,31 @@ HandlerOverride.prototype = {
|
||||||
else
|
else
|
||||||
changeMIMEStuff(HANDLER_URI(this.mimeType), "saveToDisk", aSavedToDisk);
|
changeMIMEStuff(HANDLER_URI(this.mimeType), "saveToDisk", aSavedToDisk);
|
||||||
this.setHandlerProcedure("handleInternal", "false");
|
this.setHandlerProcedure("handleInternal", "false");
|
||||||
|
this.setHandlerProcedure("useSystemDefault", "false");
|
||||||
},
|
},
|
||||||
|
|
||||||
|
get useSystemDefault()
|
||||||
|
{
|
||||||
|
return getHandlerInfoForType(this.URI, "useSystemDefault");
|
||||||
|
},
|
||||||
|
|
||||||
|
set useSystemDefault(aUseSystemDefault)
|
||||||
|
{
|
||||||
|
var handlerSource = gRDF.GetResource(HANDLER_URI(this.mimeType));
|
||||||
|
var handlerProperty = gRDF.GetResource(NC_RDF("useSystemDefault"));
|
||||||
|
var trueLiteral = gRDF.GetLiteral("true");
|
||||||
|
var hasUseSystemDefault = gDS.HasAssertion(handlerSource, handlerProperty, trueLiteral, true);
|
||||||
|
if (!hasUseSystemDefault) {
|
||||||
|
var falseLiteral = gRDF.GetLiteral("false");
|
||||||
|
hasUseSystemDefault = gDS.HasAssertion(handlerSource, handlerProperty, falseLiteral, true);
|
||||||
|
}
|
||||||
|
if (!this.mUpdateMode || !hasUseSystemDefault)
|
||||||
|
assertMIMEStuff(HANDLER_URI(this.mimeType), "useSystemDefault", aUseSystemDefault);
|
||||||
|
else
|
||||||
|
changeMIMEStuff(HANDLER_URI(this.mimeType), "useSystemDefault", aUseSystemDefault);
|
||||||
|
this.setHandlerProcedure("handleInternal", "false");
|
||||||
|
this.setHandlerProcedure("saveToDisk", "false");
|
||||||
|
},
|
||||||
|
|
||||||
get handleInternal()
|
get handleInternal()
|
||||||
{
|
{
|
||||||
|
@ -160,6 +184,7 @@ HandlerOverride.prototype = {
|
||||||
else
|
else
|
||||||
changeMIMEStuff(HANDLER_URI(this.mimeType), "handleInternal", aHandledInternally);
|
changeMIMEStuff(HANDLER_URI(this.mimeType), "handleInternal", aHandledInternally);
|
||||||
this.setHandlerProcedure("saveToDisk", "false");
|
this.setHandlerProcedure("saveToDisk", "false");
|
||||||
|
this.setHandlerProcedure("useSystemDefault", "false");
|
||||||
},
|
},
|
||||||
|
|
||||||
setHandlerProcedure: function (aHandlerProcedure, aValue)
|
setHandlerProcedure: function (aHandlerProcedure, aValue)
|
||||||
|
@ -317,7 +342,7 @@ function mimeHandlerExists(aMIMEType)
|
||||||
{
|
{
|
||||||
var valueProperty = gRDF.GetResource(NC_RDF("value"));
|
var valueProperty = gRDF.GetResource(NC_RDF("value"));
|
||||||
var mimeSource = gRDF.GetResource(MIME_URI(aMIMEType));
|
var mimeSource = gRDF.GetResource(MIME_URI(aMIMEType));
|
||||||
var mimeLiteral = gRDF.GetLiteral(gMIMEField.value);
|
var mimeLiteral = gRDF.GetLiteral(aMIMEType);
|
||||||
return gDS.HasAssertion(mimeSource, valueProperty, mimeLiteral, true);
|
return gDS.HasAssertion(mimeSource, valueProperty, mimeLiteral, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -349,7 +374,6 @@ function unassertMIMEStuff(aMIMEString, aPropertyString, aValueString)
|
||||||
|
|
||||||
function removeOverride(aMIMEType)
|
function removeOverride(aMIMEType)
|
||||||
{
|
{
|
||||||
dump("*** mimeType = " + aMIMEType + "\n");
|
|
||||||
// remove entry from seq
|
// remove entry from seq
|
||||||
var rdfc = Components.classes["@mozilla.org/rdf/container;1"].createInstance();
|
var rdfc = Components.classes["@mozilla.org/rdf/container;1"].createInstance();
|
||||||
if (rdfc) {
|
if (rdfc) {
|
||||||
|
@ -372,7 +396,7 @@ function removeOverride(aMIMEType)
|
||||||
// remove items from the graph
|
// remove items from the graph
|
||||||
var urns = [ [MIME_URI, ["description", "editable", "value", "fileExtensions", "smallIcon", "largeIcon"],
|
var urns = [ [MIME_URI, ["description", "editable", "value", "fileExtensions", "smallIcon", "largeIcon"],
|
||||||
[HANDLER_URI, "handlerProp"]],
|
[HANDLER_URI, "handlerProp"]],
|
||||||
[HANDLER_URI, ["handleInternal", "saveToDisk", "alwaysAsk"],
|
[HANDLER_URI, ["handleInternal", "saveToDisk", "alwaysAsk", "useSystemDefault"],
|
||||||
[APP_URI, "externalApplication"]],
|
[APP_URI, "externalApplication"]],
|
||||||
[APP_URI, ["path", "prettyName"]] ];
|
[APP_URI, ["path", "prettyName"]] ];
|
||||||
for (var i = 0; i < urns.length; i++) {
|
for (var i = 0; i < urns.length; i++) {
|
||||||
|
@ -396,7 +420,7 @@ function removeOverride(aMIMEType)
|
||||||
gDS.Unassert(mimeRes, propertyRes, mimeValue, true);
|
gDS.Unassert(mimeRes, propertyRes, mimeValue, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (urns[i][2]) {
|
if ("2" in urns[i] && urns[i][2]) {
|
||||||
var linkRes = gRDF.GetResource(NC_RDF(urns[i][2][1]), true);
|
var linkRes = gRDF.GetResource(NC_RDF(urns[i][2][1]), true);
|
||||||
var linkTarget = gRDF.GetResource(urns[i][2][0](aMIMEType), true);
|
var linkTarget = gRDF.GetResource(urns[i][2][0](aMIMEType), true);
|
||||||
gDS.Unassert(mimeRes, linkRes, linkTarget);
|
gDS.Unassert(mimeRes, linkRes, linkTarget);
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
style="width: 30em;"
|
style="width: 30em;"
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
title="&editType.label;"
|
title="&editType.label;"
|
||||||
|
newtitle="&newType.label;"
|
||||||
onload="Startup();"
|
onload="Startup();"
|
||||||
ondialogaccept="return onAccept();">
|
ondialogaccept="return onAccept();">
|
||||||
|
|
||||||
|
@ -41,28 +42,38 @@
|
||||||
<script type="application/x-javascript" src="chrome://communicator/content/pref/overrideHandler.js"/>
|
<script type="application/x-javascript" src="chrome://communicator/content/pref/overrideHandler.js"/>
|
||||||
<script type="application/x-javascript">
|
<script type="application/x-javascript">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
var gExtensionLabel = null;
|
var gExtension = null;
|
||||||
var gMIMEField = null;
|
var gMIMEField = null;
|
||||||
var gHandlerGroup = null;
|
var gHandlerGroup = null;
|
||||||
var gAppPath = null;
|
var gAppPath = null;
|
||||||
var gAskBeforeOpen = null;
|
var gAskBeforeOpen = null;
|
||||||
var gContentType = null;
|
var gDescription = null;
|
||||||
var gPrefApplicationsBundle = null;
|
var gPrefApplicationsBundle = null;
|
||||||
|
|
||||||
var gOldMIME = null;
|
var gOldMIME = null;
|
||||||
var gOldDesc = null;
|
var gOldDesc = null;
|
||||||
var gOldExtensions = null;
|
var gOldExtensions = null;
|
||||||
|
|
||||||
|
const nsIMIMEInfo = Components.interfaces.nsIMIMEInfo;
|
||||||
|
|
||||||
function Startup()
|
function Startup()
|
||||||
{
|
{
|
||||||
gContentType = document.getElementById("contentType");
|
gDescription = document.getElementById("description");
|
||||||
gExtensionLabel = document.getElementById("extension");
|
gExtension = document.getElementById("extension");
|
||||||
gMIMEField = document.getElementById("mimeType");
|
gMIMEField = document.getElementById("mimeType");
|
||||||
gHandlerGroup = document.getElementById("handler");
|
gHandlerGroup = document.getElementById("handler");
|
||||||
gAppPath = document.getElementById("appPath");
|
gAppPath = document.getElementById("appPath");
|
||||||
gAskBeforeOpen = document.getElementById("askBeforeOpen");
|
gAskBeforeOpen = document.getElementById("askBeforeOpen");
|
||||||
|
|
||||||
gPrefApplicationsBundle = document.getElementById("bundle_prefApplications");
|
gPrefApplicationsBundle = document.getElementById("bundle_prefApplications");
|
||||||
|
|
||||||
|
// Set values for radio items to nsIMIMEInfo constants
|
||||||
|
var rSaveToDisk = document.getElementById("saveToDisk");
|
||||||
|
var rUseHelperApp = document.getElementById("useHelperApp");
|
||||||
|
var rUseSystemDefault = document.getElementById("useSystemDefault");
|
||||||
|
rSaveToDisk.value = nsIMIMEInfo.saveToDisk;
|
||||||
|
rUseHelperApp.value = nsIMIMEInfo.useHelperApp;
|
||||||
|
rUseSystemDefault.value = nsIMIMEInfo.useSystemDefault;
|
||||||
|
|
||||||
var handlerInfo = window.arguments[0];
|
var handlerInfo = window.arguments[0];
|
||||||
|
|
||||||
|
@ -71,32 +82,70 @@
|
||||||
// Arg is an nsHelperAppDlg object in this case.
|
// Arg is an nsHelperAppDlg object in this case.
|
||||||
window.gHelperAppDlg = window.arguments[0];
|
window.gHelperAppDlg = window.arguments[0];
|
||||||
var info = window.arguments[0].mLauncher.MIMEInfo;
|
var info = window.arguments[0].mLauncher.MIMEInfo;
|
||||||
|
|
||||||
// Get mime type from which we can construct a HandlerInfo...
|
// Update entry (without dialog showing).
|
||||||
var mimeType = info.MIMEType.toLowerCase();
|
try {
|
||||||
|
updateEntry(info);
|
||||||
// Construct what we need from mime type URI.
|
} catch(e) { dump("updateEntry failed: " + e + "\n"); }
|
||||||
getDS();
|
|
||||||
handlerInfo = window.arguments[0] = new HandlerOverride( MIME_URI( mimeType ) );
|
// Close the dialog.
|
||||||
|
window.close();
|
||||||
// Don't let the user change the mime type; we ignore any such changes anyway.
|
|
||||||
gMIMEField.setAttribute( "readonly", "true" );
|
// Done.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Default to true in case the preference cannot be retrieved
|
||||||
|
var forceAlwaysAsk = true;
|
||||||
|
try {
|
||||||
|
var prefService = Components.classes["@mozilla.org/preferences;1"].getService(Components.interfaces.nsIPrefService);
|
||||||
|
var prefBranch = prefService.getBranch("browser.helperApps.alwaysAsk.");
|
||||||
|
forceAlwaysAsk = prefBranch.getBoolPref("force");
|
||||||
|
} catch(e) {
|
||||||
|
dump("forceAlwaysAsk defaulting to true since preference couldn't be opened\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !handlerInfo.URI )
|
||||||
|
{
|
||||||
|
// Opening for "New Type".
|
||||||
|
var newTitle = document.documentElement.getAttribute("newtitle");
|
||||||
|
document.documentElement.setAttribute("title", newTitle);
|
||||||
|
|
||||||
|
// Initialize some stuff to blank for new types.
|
||||||
|
gOldMIME = gOldDesc = gOldExtensions = "";
|
||||||
|
|
||||||
|
// Make default "use system default."
|
||||||
|
gHandlerGroup.selectedItem = gHandlerGroup.getElementsByAttribute("value",nsIMIMEInfo.useSystemDefault)[0];
|
||||||
|
|
||||||
|
// Always ask box default depends on pref.
|
||||||
|
gAskBeforeOpen.checked = forceAlwaysAsk;
|
||||||
|
gAskBeforeOpen.disabled = forceAlwaysAsk;
|
||||||
|
|
||||||
|
// Put focus on mime type field.
|
||||||
|
gMIMEField.focus();
|
||||||
|
|
||||||
|
// Size/position the dialog.
|
||||||
|
sizeToContent();
|
||||||
|
window.moveToAlertPosition();
|
||||||
|
|
||||||
|
// Avoid the normal "edit" case code.
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
gExtensionLabel.setAttribute("value", handlerInfo.extensions);
|
gExtension.setAttribute("value", handlerInfo.extensions);
|
||||||
gMIMEField.value = handlerInfo.mimeType;
|
gMIMEField.value = handlerInfo.mimeType;
|
||||||
gOldMIME = handlerInfo.mimeType;
|
gOldMIME = handlerInfo.mimeType;
|
||||||
gOldDesc = handlerInfo.description;
|
gOldDesc = handlerInfo.description;
|
||||||
gOldExtensions = handlerInfo.extensions;
|
gOldExtensions = handlerInfo.extensions;
|
||||||
|
|
||||||
// figure out how this type is handled
|
// figure out how this type is handled
|
||||||
var data = 0;
|
var data = nsIMIMEInfo.saveToDisk;
|
||||||
if (handlerInfo.handleInternal == "true")
|
if (handlerInfo.saveToDisk == "true")
|
||||||
data = 0;
|
data = nsIMIMEInfo.saveToDisk;
|
||||||
else if (handlerInfo.saveToDisk == "true")
|
else if (handlerInfo.useSystemDefault == "true")
|
||||||
data = 1;
|
data = nsIMIMEInfo.useSystemDefault;
|
||||||
else
|
else
|
||||||
data = 2;
|
data = nsIMIMEInfo.useHelperApp;
|
||||||
|
|
||||||
gHandlerGroup.selectedItem = gHandlerGroup.getElementsByAttribute("value", data)[0];
|
gHandlerGroup.selectedItem = gHandlerGroup.getElementsByAttribute("value", data)[0];
|
||||||
doEnabling();
|
doEnabling();
|
||||||
|
@ -105,11 +154,6 @@
|
||||||
if (appPath != undefined)
|
if (appPath != undefined)
|
||||||
gAppPath.value = appPath;
|
gAppPath.value = appPath;
|
||||||
|
|
||||||
var prefs = Components.classes["@mozilla.org/preferences;1"].
|
|
||||||
getService(Components.interfaces.nsIPrefBranch);
|
|
||||||
var forceAlwaysAsk = prefs.
|
|
||||||
getBoolPref("browser.helperApps.alwaysAsk.force");
|
|
||||||
|
|
||||||
if (forceAlwaysAsk)
|
if (forceAlwaysAsk)
|
||||||
{
|
{
|
||||||
gAskBeforeOpen.checked = true;
|
gAskBeforeOpen.checked = true;
|
||||||
|
@ -120,7 +164,7 @@
|
||||||
gAskBeforeOpen.checked = handlerInfo.alwaysAsk == "true" ? true : false;
|
gAskBeforeOpen.checked = handlerInfo.alwaysAsk == "true" ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
gContentType.setAttribute("value", handlerInfo.description);
|
gDescription.setAttribute("value", handlerInfo.description);
|
||||||
var ext;
|
var ext;
|
||||||
var posOfFirstSpace = handlerInfo.extensions.indexOf(" ");
|
var posOfFirstSpace = handlerInfo.extensions.indexOf(" ");
|
||||||
if (posOfFirstSpace > -1)
|
if (posOfFirstSpace > -1)
|
||||||
|
@ -169,8 +213,8 @@
|
||||||
|
|
||||||
function selectAppRadio()
|
function selectAppRadio()
|
||||||
{
|
{
|
||||||
if (gHandlerGroup.value != "2")
|
if (gHandlerGroup.value != nsIMIMEInfo.useHelperApp)
|
||||||
gHandlerGroup.selectedItem = gHandlerGroup.getElementsByAttribute("value", "2")[0];
|
gHandlerGroup.selectedItem = gHandlerGroup.getElementsByAttribute("value", nsIMIMEInfo.useHelperApp)[0];
|
||||||
doEnabling();
|
doEnabling();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -187,6 +231,64 @@
|
||||||
gDS = gRDF.GetDataSource(fileHandler.getURLSpecFromFile(file));
|
gDS = gRDF.GetDataSource(fileHandler.getURLSpecFromFile(file));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function updateEntry(info)
|
||||||
|
{
|
||||||
|
// Initialize data source.
|
||||||
|
getDS();
|
||||||
|
|
||||||
|
// Get mime type from which we can construct a HandlerInfo...
|
||||||
|
var mimeType = info.MIMEType.toLowerCase();
|
||||||
|
|
||||||
|
// Create HandlerOverride and populate it.
|
||||||
|
var entry = new HandlerOverride(MIME_URI(mimeType));
|
||||||
|
entry.mUpdateMode = mimeHandlerExists(mimeType);
|
||||||
|
entry.mimeType = mimeType;
|
||||||
|
entry.isEditable = true;
|
||||||
|
entry.alwaysAsk = info.alwaysAskBeforeHandling;
|
||||||
|
|
||||||
|
// If not updating (i.e., a newly encountered mime type),
|
||||||
|
// then update extension list and description.
|
||||||
|
if (!entry.mUpdateMode) {
|
||||||
|
var extCount = { value: 0 };
|
||||||
|
var extArray = { value: null };
|
||||||
|
info.GetFileExtensions(extCount, extArray);
|
||||||
|
for (var i = 0; i < extArray.value.length; i++) {
|
||||||
|
entry.addExtension(extArray.value[i]);
|
||||||
|
}
|
||||||
|
entry.description = info.Description;
|
||||||
|
entry.appDisplayName = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (info.preferredAction == nsIMIMEInfo.saveToDisk) {
|
||||||
|
entry.saveToDisk = true;
|
||||||
|
if (!entry.mUpdateMode) {
|
||||||
|
// Creating a new entry, set path.
|
||||||
|
entry.appPath = "";
|
||||||
|
}
|
||||||
|
} else if (info.preferredAction == nsIMIMEInfo.useSystemDefault ||
|
||||||
|
info.preferredApplicationHandler == null) {
|
||||||
|
entry.useSystemDefault = true;
|
||||||
|
if (!entry.mUpdateMode) {
|
||||||
|
// Creating a new entry, set path.
|
||||||
|
entry.appPath = "";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
entry.saveToDisk = false;
|
||||||
|
entry.useSystemDefault = false;
|
||||||
|
entry.handleInternal = false;
|
||||||
|
entry.appPath = info.preferredApplicationHandler.path;
|
||||||
|
entry.appDisplayName = info.applicationDescription;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Do RDF magic.
|
||||||
|
entry.buildLinks();
|
||||||
|
|
||||||
|
// flush the ds to disk.
|
||||||
|
var remoteDS = gDS.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);
|
||||||
|
if (remoteDS)
|
||||||
|
remoteDS.Flush();
|
||||||
|
}
|
||||||
|
|
||||||
function onAccept()
|
function onAccept()
|
||||||
{
|
{
|
||||||
// Validate input.
|
// Validate input.
|
||||||
|
@ -213,31 +315,34 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gOldMIME)
|
if (gOldMIME && gOldMIME != gMIMEField.value)
|
||||||
removeOverride(gOldMIME); // delete old handler
|
removeOverride(gOldMIME); // delete old handler
|
||||||
|
|
||||||
// now save the information
|
// now save the information
|
||||||
var handlerInfo = new HandlerOverride(MIME_URI(gMIMEField.value));
|
var handlerInfo = new HandlerOverride(MIME_URI(gMIMEField.value));
|
||||||
handlerInfo.mUpdateMode = mimeHandlerExists(gMIMEField.value);
|
handlerInfo.mUpdateMode = (gOldMIME == gMIMEField.value);
|
||||||
handlerInfo.mimeType = gMIMEField.value;
|
handlerInfo.mimeType = gMIMEField.value;
|
||||||
|
|
||||||
// set description, editable, and extensions
|
// set description, editable, and extensions
|
||||||
handlerInfo.description = gOldDesc
|
|
||||||
handlerInfo.isEditable = true;
|
handlerInfo.isEditable = true;
|
||||||
var extensions = gOldExtensions.toLowerCase().split(" ");
|
handlerInfo.description = gDescription.value;
|
||||||
|
var extensions = gExtension.value.toLowerCase().split(" ");
|
||||||
for (var i = 0; i < extensions.length; i++) {
|
for (var i = 0; i < extensions.length; i++) {
|
||||||
var currExtension = extensions[i];
|
var currExtension = extensions[i];
|
||||||
handlerInfo.addExtension(currExtension);
|
handlerInfo.addExtension(currExtension);
|
||||||
}
|
}
|
||||||
|
|
||||||
// other info we need to set (not reflected in UI)
|
// other info we need to set (not reflected in UI)
|
||||||
if (gHandlerGroup.value == "2") {
|
if (gHandlerGroup.value == nsIMIMEInfo.useHelperApp) {
|
||||||
handlerInfo.appPath = gAppPath.value;
|
handlerInfo.appPath = gAppPath.value;
|
||||||
handlerInfo.setHandlerProcedure("saveToDisk", "false");
|
handlerInfo.setHandlerProcedure("saveToDisk", "false");
|
||||||
|
handlerInfo.setHandlerProcedure("useSystemDefault", "false");
|
||||||
handlerInfo.setHandlerProcedure("handleInternal", "false");
|
handlerInfo.setHandlerProcedure("handleInternal", "false");
|
||||||
}
|
}
|
||||||
else if (gHandlerGroup.value == "1")
|
else if (gHandlerGroup.value == nsIMIMEInfo.saveToDisk)
|
||||||
handlerInfo.saveToDisk = true;
|
handlerInfo.saveToDisk = true;
|
||||||
|
else if (gHandlerGroup.value == nsIMIMEInfo.useSystemDefault)
|
||||||
|
handlerInfo.useSystemDefault = true;
|
||||||
else
|
else
|
||||||
handlerInfo.handleInternal = true;
|
handlerInfo.handleInternal = true;
|
||||||
|
|
||||||
|
@ -253,7 +358,7 @@
|
||||||
if (file) {
|
if (file) {
|
||||||
try {
|
try {
|
||||||
file.initWithPath(gAppPath.value);
|
file.initWithPath(gAppPath.value);
|
||||||
handlerInfo.appDisplayName = file.unicodeLeafName;
|
handlerInfo.appDisplayName = file.leafName;
|
||||||
}
|
}
|
||||||
catch(e) {
|
catch(e) {
|
||||||
handlerInfo.appDisplayName = gAppPath.value;
|
handlerInfo.appDisplayName = gAppPath.value;
|
||||||
|
@ -268,83 +373,60 @@
|
||||||
if (remoteDS)
|
if (remoteDS)
|
||||||
remoteDS.Flush();
|
remoteDS.Flush();
|
||||||
|
|
||||||
// See if invoked on behalf of helper app dialog...
|
|
||||||
if ( "gHelperAppDlg" in window ) {
|
|
||||||
// Get mime info.
|
|
||||||
var info = gHelperAppDlg.mLauncher.MIMEInfo;
|
|
||||||
|
|
||||||
// Update fields that might have changed.
|
|
||||||
if ( gHandlerGroup.value == "1" ) {
|
|
||||||
info.preferredAction = Components.interfaces.nsIMIMEInfo.saveToDisk;
|
|
||||||
} else if ( gHandlerGroup.value == "2" ) {
|
|
||||||
info.preferredAction = Components.interfaces.nsIMIMEInfo.useHelperApp;
|
|
||||||
info.preferredApplicationHandler = file;
|
|
||||||
info.applicationDescription = handlerInfo.appDisplayName;
|
|
||||||
} else {
|
|
||||||
info.preferredAction = Components.interfaces.nsIMIMEInfo.handleInternally;
|
|
||||||
}
|
|
||||||
|
|
||||||
// tell the helper app dialog to update itself
|
|
||||||
gHelperAppDlg.updateSelf = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
window.opener.gUpdateTypeRV = true;
|
window.opener.gUpdateTypeRV = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
]]>
|
]]>
|
||||||
</script>
|
</script>
|
||||||
|
<vbox>
|
||||||
<hbox align="center">
|
<hbox align="center">
|
||||||
<image id="contentTypeImage"/>
|
<image id="contentTypeImage"/>
|
||||||
<label id="contentType" crop="right"/>
|
<grid flex="1">
|
||||||
|
<columns>
|
||||||
|
<column/>
|
||||||
|
<column flex="1"/>
|
||||||
|
</columns>
|
||||||
|
<rows>
|
||||||
|
<row align="center">
|
||||||
|
<label value="&mimetype.label;" accesskey="&mimetype.accesskey;" control="mimeType"/>
|
||||||
|
<textbox id="mimeType"/>
|
||||||
|
</row>
|
||||||
|
<row align="center">
|
||||||
|
<label value="&description.label;" accesskey="&description.accesskey;" control="description"/>
|
||||||
|
<textbox id="description" crop="right" flex="1"/>
|
||||||
|
</row>
|
||||||
|
<row align="center">
|
||||||
|
<label value="&extension.label;" accesskey="&extension.accesskey;" control="extension"/>
|
||||||
|
<textbox id="extension"/>
|
||||||
|
</row>
|
||||||
|
</rows>
|
||||||
|
</grid>
|
||||||
</hbox>
|
</hbox>
|
||||||
|
|
||||||
<separator class="thin"/>
|
<separator class="thin"/>
|
||||||
|
|
||||||
<separator class="groove"/>
|
|
||||||
|
|
||||||
<separator class="thin"/>
|
|
||||||
|
|
||||||
<grid>
|
|
||||||
<columns>
|
|
||||||
<column flex="1"/>
|
|
||||||
<column flex="3"/>
|
|
||||||
</columns>
|
|
||||||
|
|
||||||
<rows>
|
|
||||||
<row align="center">
|
|
||||||
<label value="&extension.label;"/>
|
|
||||||
<label id="extension"/>
|
|
||||||
</row>
|
|
||||||
<row align="center">
|
|
||||||
<label value="&mimetype.label;" accesskey="&mimetype.accesskey;"
|
|
||||||
control="mimeType"/>
|
|
||||||
<textbox id="mimeType" flex="1"/>
|
|
||||||
</row>
|
|
||||||
</rows>
|
|
||||||
</grid>
|
|
||||||
|
|
||||||
<separator class="thin"/>
|
|
||||||
|
|
||||||
<groupbox>
|
<groupbox>
|
||||||
<caption label="&handledby.label;"/>
|
<description value="&handling.label;"/>
|
||||||
|
|
||||||
<radiogroup id="handler">
|
<radiogroup id="handler">
|
||||||
<!-- Turn this off since we can't make it work yet
|
<radio id="useSystemDefault" label="&useDefault.label;" accesskey="&useDefault.accesskey;" oncommand="doEnabling();"/>
|
||||||
<radio value="4" label="&useDefault.label;" accesskey="&useDefault.accesskey;" oncommand="doEnabling();"/>
|
|
||||||
-->
|
|
||||||
<radio value="1" label="&saveToDisk.label;" accesskey="&saveToDisk.accesskey;" oncommand="doEnabling();"/>
|
|
||||||
<hbox align="center">
|
<hbox align="center">
|
||||||
<radio value="2" label="&application.label;" accesskey="&application.accesskey;" oncommand="doEnabling();"/>
|
<radio id="useHelperApp" label="&application.label;" accesskey="&application.accesskey;" oncommand="doEnabling();"/>
|
||||||
<textbox id="appPath" flex="1" onchange="selectAppRadio();"/>
|
<textbox id="appPath" flex="1" onchange="selectAppRadio();"/>
|
||||||
<button label="&browse.label;" accesskey="&browse.accesskey;"
|
<button label="&browse.label;" accesskey="&browse.accesskey;"
|
||||||
oncommand="chooseApp();"/>
|
oncommand="chooseApp();"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
|
<radio id="saveToDisk" label="&saveToDisk.label;" accesskey="&saveToDisk.accesskey;" oncommand="doEnabling();"/>
|
||||||
</radiogroup>
|
</radiogroup>
|
||||||
|
|
||||||
</groupbox>
|
</groupbox>
|
||||||
|
|
||||||
|
<separator class="thin"/>
|
||||||
|
|
||||||
<hbox align="center">
|
<hbox align="center">
|
||||||
<checkbox id="askBeforeOpen" label="&askBeforeOpen.label;" accesskey="&askBeforeOpen.accesskey;"/>
|
<checkbox id="askBeforeOpen" label="&askBeforeOpen.label;" accesskey="&askBeforeOpen.accesskey;"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
|
</vbox>
|
||||||
|
|
||||||
|
<separator class="thin"/>
|
||||||
</dialog>
|
</dialog>
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ var gDS = null;
|
||||||
var gPrefApplicationsBundle = null;
|
var gPrefApplicationsBundle = null;
|
||||||
|
|
||||||
var gExtensionField = null;
|
var gExtensionField = null;
|
||||||
var gMIMETypeField = null;
|
var gMIMEDescField = null;
|
||||||
var gHandlerField = null;
|
var gHandlerField = null;
|
||||||
var gNewTypeButton = null;
|
var gNewTypeButton = null;
|
||||||
var gEditButton = null;
|
var gEditButton = null;
|
||||||
|
@ -33,7 +33,8 @@ var gRemoveButton = null;
|
||||||
|
|
||||||
function newType()
|
function newType()
|
||||||
{
|
{
|
||||||
window.openDialog("chrome://communicator/content/pref/pref-applications-new.xul", "appEdit", "chrome,modal=yes,resizable=no");
|
var handlerOverride = new HandlerOverride();
|
||||||
|
window.openDialog("chrome://communicator/content/pref/pref-applications-edit.xul", "appEdit", "chrome,modal=yes,resizable=no", handlerOverride);
|
||||||
if (gNewTypeRV) {
|
if (gNewTypeRV) {
|
||||||
//gList.builder.rebuild();
|
//gList.builder.rebuild();
|
||||||
gList.setAttribute("ref", "urn:mimetypes");
|
gList.setAttribute("ref", "urn:mimetypes");
|
||||||
|
@ -43,17 +44,22 @@ function newType()
|
||||||
|
|
||||||
function removeType()
|
function removeType()
|
||||||
{
|
{
|
||||||
var titleMsg = gPrefApplicationsBundle.getString("removeHandlerTitle");
|
// Only prompt if setting is "useHelperApp".
|
||||||
var dialogMsg = gPrefApplicationsBundle.getString("removeHandler");
|
var uri = gList.selectedItems[0].id;
|
||||||
dialogMsg = dialogMsg.replace(/%n/g, "\n");
|
var handlerOverride = new HandlerOverride(uri);
|
||||||
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
|
if ( !handlerOverride.useSystemDefault && !handlerOverride.saveToDisk ) {
|
||||||
var remove = promptService.confirm(window, titleMsg, dialogMsg);
|
var titleMsg = gPrefApplicationsBundle.getString("removeHandlerTitle");
|
||||||
if (remove) {
|
var dialogMsg = gPrefApplicationsBundle.getString("removeHandler");
|
||||||
var uri = gList.selectedItems[0].id;
|
dialogMsg = dialogMsg.replace(/%n/g, "\n");
|
||||||
var handlerOverride = new HandlerOverride(uri);
|
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
|
||||||
removeOverride(handlerOverride.mimeType);
|
var remove = promptService.confirm(window, titleMsg, dialogMsg);
|
||||||
gList.setAttribute("ref", "urn:mimetypes");
|
if (!remove) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
removeOverride(handlerOverride.mimeType);
|
||||||
|
gList.setAttribute("ref", "urn:mimetypes");
|
||||||
|
selectApplication();
|
||||||
}
|
}
|
||||||
|
|
||||||
function editType()
|
function editType()
|
||||||
|
@ -66,6 +72,89 @@ function editType()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const xmlSinkObserver = {
|
||||||
|
onBeginLoad: function(aSink)
|
||||||
|
{
|
||||||
|
},
|
||||||
|
onInterrupt: function(aSink)
|
||||||
|
{
|
||||||
|
},
|
||||||
|
onResume: function(aSink)
|
||||||
|
{
|
||||||
|
},
|
||||||
|
// This is called when the RDF data source has finished loading.
|
||||||
|
onEndLoad: function(aSink)
|
||||||
|
{
|
||||||
|
// Unhook observer.
|
||||||
|
aSink.removeXMLSinkObserver(this);
|
||||||
|
|
||||||
|
// Convert old "don't ask" pref info to helper app pref entries
|
||||||
|
try {
|
||||||
|
var prefService = Components.classes["@mozilla.org/preferences;1"].getService(Components.interfaces.nsIPrefService);
|
||||||
|
var prefBranch = prefService.getBranch("browser.helperApps.neverAsk.");
|
||||||
|
if (!prefBranch) return;
|
||||||
|
} catch(e) { return; }
|
||||||
|
|
||||||
|
var neverAskSave = new Array();
|
||||||
|
var neverAskOpen = new Array();
|
||||||
|
try {
|
||||||
|
neverAskSave = prefBranch.getCharPref("saveToDisk").split(",");
|
||||||
|
} catch(e) {}
|
||||||
|
try {
|
||||||
|
neverAskOpen = prefBranch.getCharPref("openFile").split(",");
|
||||||
|
} catch(e) {}
|
||||||
|
|
||||||
|
var i;
|
||||||
|
var newEntries = {};
|
||||||
|
for ( i = 0; i < neverAskSave.length; i++ ) {
|
||||||
|
// See if mime type is in data source.
|
||||||
|
var type = unescape(neverAskSave[i]);
|
||||||
|
if (type != "" && !mimeHandlerExists(type)) {
|
||||||
|
// Not in there, need to create an entry now so user can edit it.
|
||||||
|
newEntries[type] = "saveToDisk";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for ( i = 0; i < neverAskOpen.length; i++ ) {
|
||||||
|
// See if mime type is in data source.
|
||||||
|
var type = unescape(neverAskOpen[i]);
|
||||||
|
if (type != "" && !mimeHandlerExists(type)) {
|
||||||
|
// Not in there, need to create an entry now so user can edit it.
|
||||||
|
newEntries[type] = "useSystemDefault";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Now create all new entries.
|
||||||
|
for ( var newEntry in newEntries ) {
|
||||||
|
this.createNewEntry(newEntry, newEntries[newEntry]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Don't need these any more!
|
||||||
|
try { prefBranch.clearUserPref("saveToDisk"); } catch(e) {}
|
||||||
|
try { prefBranch.clearUserPref("openFile"); } catch(e) {}
|
||||||
|
},
|
||||||
|
onError: function(aSink, aStatus, aMsg)
|
||||||
|
{
|
||||||
|
},
|
||||||
|
createNewEntry: function(mimeType, action)
|
||||||
|
{
|
||||||
|
// Create HandlerOverride and populate it.
|
||||||
|
var entry = new HandlerOverride(MIME_URI(mimeType));
|
||||||
|
entry.mUpdateMode = false;
|
||||||
|
entry.mimeType = mimeType;
|
||||||
|
entry.description = "";
|
||||||
|
entry.isEditable = true;
|
||||||
|
entry.alwaysAsk = false;
|
||||||
|
entry.appPath = "";
|
||||||
|
entry.appDisplayName = "";
|
||||||
|
// This sets preferred action.
|
||||||
|
entry[action] = true;
|
||||||
|
|
||||||
|
// Do RDF magic.
|
||||||
|
entry.buildLinks();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function Startup()
|
function Startup()
|
||||||
{
|
{
|
||||||
// set up the string bundle
|
// set up the string bundle
|
||||||
|
@ -74,7 +163,7 @@ function Startup()
|
||||||
// set up the elements
|
// set up the elements
|
||||||
gList = document.getElementById("appList");
|
gList = document.getElementById("appList");
|
||||||
gExtensionField = document.getElementById("extension");
|
gExtensionField = document.getElementById("extension");
|
||||||
gMIMETypeField = document.getElementById("mimeType");
|
gMIMEDescField = document.getElementById("mimeDesc");
|
||||||
gHandlerField = document.getElementById("handler");
|
gHandlerField = document.getElementById("handler");
|
||||||
gNewTypeButton = document.getElementById("newTypeButton");
|
gNewTypeButton = document.getElementById("newTypeButton");
|
||||||
gEditButton = document.getElementById("editButton");
|
gEditButton = document.getElementById("editButton");
|
||||||
|
@ -90,12 +179,20 @@ function Startup()
|
||||||
|
|
||||||
var ioService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
|
var ioService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
|
||||||
var fileHandler = ioService.getProtocolHandler("file").QueryInterface(Components.interfaces.nsIFileProtocolHandler);
|
var fileHandler = ioService.getProtocolHandler("file").QueryInterface(Components.interfaces.nsIFileProtocolHandler);
|
||||||
dump("spec is " + fileHandler.getURLSpecFromFile(file));
|
|
||||||
gDS = gRDF.GetDataSource(fileHandler.getURLSpecFromFile(file));
|
gDS = gRDF.GetDataSource(fileHandler.getURLSpecFromFile(file));
|
||||||
|
|
||||||
// intialize the listbox
|
// intialize the listbox
|
||||||
gList.database.AddDataSource(gDS);
|
gList.database.AddDataSource(gDS);
|
||||||
gList.setAttribute("ref", "urn:mimetypes");
|
gList.setAttribute("ref", "urn:mimetypes");
|
||||||
|
|
||||||
|
// Test whether the data source is already loaded.
|
||||||
|
if (gDS.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource).loaded) {
|
||||||
|
// Do it now.
|
||||||
|
xmlSinkObserver.onEndLoad(gDS.QueryInterface(Components.interfaces.nsIRDFXMLSink));
|
||||||
|
} else {
|
||||||
|
// Add observer that will kick in when data source load completes.
|
||||||
|
gDS.QueryInterface(Components.interfaces.nsIRDFXMLSink).addXMLSinkObserver( xmlSinkObserver );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function selectApplication()
|
function selectApplication()
|
||||||
|
@ -104,7 +201,7 @@ function selectApplication()
|
||||||
var uri = gList.selectedItems[0].id;
|
var uri = gList.selectedItems[0].id;
|
||||||
var handlerOverride = new HandlerOverride(uri);
|
var handlerOverride = new HandlerOverride(uri);
|
||||||
gExtensionField.setAttribute("value", handlerOverride.extensions);
|
gExtensionField.setAttribute("value", handlerOverride.extensions);
|
||||||
gMIMETypeField.setAttribute("value", handlerOverride.mimeType);
|
gMIMEDescField.setAttribute("value", handlerOverride.description);
|
||||||
|
|
||||||
// figure out how this type is handled
|
// figure out how this type is handled
|
||||||
if (handlerOverride.handleInternal == "true")
|
if (handlerOverride.handleInternal == "true")
|
||||||
|
@ -113,8 +210,12 @@ function selectApplication()
|
||||||
else if (handlerOverride.saveToDisk == "true")
|
else if (handlerOverride.saveToDisk == "true")
|
||||||
gHandlerField.setAttribute("value",
|
gHandlerField.setAttribute("value",
|
||||||
gPrefApplicationsBundle.getString("saveToDisk"));
|
gPrefApplicationsBundle.getString("saveToDisk"));
|
||||||
|
else if (handlerOverride.useSystemDefault == "true")
|
||||||
|
gHandlerField.setAttribute("value",
|
||||||
|
gPrefApplicationsBundle.getString("useSystemDefault"));
|
||||||
else
|
else
|
||||||
gHandlerField.setAttribute("value", handlerOverride.appDisplayName);
|
gHandlerField.setAttribute("value",
|
||||||
|
gPrefApplicationsBundle.getFormattedString("useHelperApp", [handlerOverride.appDisplayName]));
|
||||||
var ext;
|
var ext;
|
||||||
var posOfFirstSpace = handlerOverride.extensions.indexOf(" ");
|
var posOfFirstSpace = handlerOverride.extensions.indexOf(" ");
|
||||||
if (posOfFirstSpace > -1)
|
if (posOfFirstSpace > -1)
|
||||||
|
@ -130,7 +231,7 @@ function selectApplication()
|
||||||
gHandlerField.removeAttribute("value");
|
gHandlerField.removeAttribute("value");
|
||||||
document.getElementById("contentTypeImage").removeAttribute("src");
|
document.getElementById("contentTypeImage").removeAttribute("src");
|
||||||
gExtensionField.removeAttribute("value");
|
gExtensionField.removeAttribute("value");
|
||||||
gMIMETypeField.removeAttribute("value");
|
gMIMEDescField.removeAttribute("value");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,12 +253,3 @@ function updateLockedButtonState(handlerEditable)
|
||||||
gRemoveButton.disabled = false;
|
gRemoveButton.disabled = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function clearRememberedSettings()
|
|
||||||
{
|
|
||||||
var prefBranch = Components.classes["@mozilla.org/preferences;1"].getService(Components.interfaces.nsIPrefBranch);
|
|
||||||
if (prefBranch) {
|
|
||||||
prefBranch.setCharPref("browser.helperApps.neverAsk.saveToDisk", "");
|
|
||||||
prefBranch.setCharPref("browser.helperApps.neverAsk.openFile", "");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -45,8 +45,8 @@
|
||||||
<groupbox flex="1">
|
<groupbox flex="1">
|
||||||
<caption label="&descript;"/>
|
<caption label="&descript;"/>
|
||||||
<label value="&fileTypes.label;"/>
|
<label value="&fileTypes.label;"/>
|
||||||
<hbox flex="1">
|
<vbox>
|
||||||
<vbox flex="1">
|
<hbox flex="1">
|
||||||
<listbox id="appList" flex="1"
|
<listbox id="appList" flex="1"
|
||||||
sortResource="http://home.netscape.com/NC-rdf#value"
|
sortResource="http://home.netscape.com/NC-rdf#value"
|
||||||
sortDirection="ascending"
|
sortDirection="ascending"
|
||||||
|
@ -73,48 +73,47 @@
|
||||||
</rule>
|
</rule>
|
||||||
</template>
|
</template>
|
||||||
</listbox>
|
</listbox>
|
||||||
|
<vbox>
|
||||||
<hbox>
|
<button id="newTypeButton"
|
||||||
|
label="&newTypeButton.label;" accesskey="&newTypeButton.accesskey;"
|
||||||
|
oncommand="newType();"/>
|
||||||
|
<button id="editButton"
|
||||||
|
label="&editButton.label;" accesskey="&editButton.accesskey;"
|
||||||
|
oncommand="editType();"/>
|
||||||
|
<button id="removeButton"
|
||||||
|
label="&removeButton.label;" accesskey="&removeButton.accesskey;"
|
||||||
|
oncommand="removeType();"/>
|
||||||
|
</vbox>
|
||||||
|
</hbox>
|
||||||
|
<groupbox orient="horizontal">
|
||||||
|
<caption label="&file;"/>
|
||||||
|
<hbox flex="1">
|
||||||
<vbox style="width: 40px; height: 40px;" pack="center" align="center">
|
<vbox style="width: 40px; height: 40px;" pack="center" align="center">
|
||||||
<image id="contentTypeImage"/>
|
<image id="contentTypeImage"/>
|
||||||
</vbox>
|
</vbox>
|
||||||
<grid orient="horizontal">
|
<grid flex="1">
|
||||||
<columns>
|
<columns>
|
||||||
<column/>
|
<column/>
|
||||||
<column flex="1"/>
|
<column flex="1"/>
|
||||||
</columns>
|
</columns>
|
||||||
<rows>
|
<rows>
|
||||||
<row>
|
<row align="center">
|
||||||
|
<label value="&mimeDesc;"/>
|
||||||
|
<label id="mimeDesc" crop="right" flex="1"/>
|
||||||
|
</row>
|
||||||
|
<row align="center">
|
||||||
<label value="&exten;"/>
|
<label value="&exten;"/>
|
||||||
<label id="extension"/>
|
<label id="extension" crop="right"/>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row align="center">
|
||||||
<label value="&mimeType;"/>
|
|
||||||
<label id="mimeType"/>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<label value="&handle;"/>
|
<label value="&handle;"/>
|
||||||
<textbox id="handler" readonly="true" style="width: 175px" />
|
<textbox id="handler" readonly="true" flex="1"/>
|
||||||
</row>
|
</row>
|
||||||
</rows>
|
</rows>
|
||||||
</grid>
|
</grid>
|
||||||
</hbox>
|
</hbox>
|
||||||
</vbox>
|
</groupbox>
|
||||||
<vbox>
|
</vbox>
|
||||||
<button id="newTypeButton"
|
|
||||||
label="&newTypeButton.label;" accesskey="&newTypeButton.accesskey;"
|
|
||||||
oncommand="newType();"
|
|
||||||
prefstring="pref.application.disable_button.new_type"/>
|
|
||||||
<button id="editButton"
|
|
||||||
label="&editButton.label;" accesskey="&editButton.accesskey;"
|
|
||||||
oncommand="editType();"
|
|
||||||
prefstring="pref.application.disable_button.edit"/>
|
|
||||||
<button id="removeButton"
|
|
||||||
label="&removeButton.label;" accesskey="&removeButton.accesskey;"
|
|
||||||
oncommand="removeType();"
|
|
||||||
prefstring="pref.application.disable_button.remove"/>
|
|
||||||
</vbox>
|
|
||||||
</hbox>
|
|
||||||
</groupbox>
|
</groupbox>
|
||||||
<groupbox id="pluginFinderBox">
|
<groupbox id="pluginFinderBox">
|
||||||
<caption label="&plugins.label;"/>
|
<caption label="&plugins.label;"/>
|
||||||
|
@ -126,12 +125,4 @@
|
||||||
<description>&pluginFinderDesc.label;</description>
|
<description>&pluginFinderDesc.label;</description>
|
||||||
</vbox>
|
</vbox>
|
||||||
</groupbox>
|
</groupbox>
|
||||||
<groupbox>
|
|
||||||
<caption label="&fileOpening.label;"/>
|
|
||||||
<hbox pack="start" align="center">
|
|
||||||
<description flex="1">&resetText.label;</description>
|
|
||||||
<spacer flex="1"/>
|
|
||||||
<button label="&resetButton.label;" oncommand="clearRememberedSettings();"/>
|
|
||||||
</hbox>
|
|
||||||
</groupbox>
|
|
||||||
</page>
|
</page>
|
||||||
|
|
|
@ -1,31 +1,24 @@
|
||||||
|
|
||||||
<!ENTITY editType.label "Edit Type">
|
<!ENTITY editType.label "Edit Type">
|
||||||
|
<!ENTITY newType.label "New Type">
|
||||||
<!ENTITY extension.label "Extension:">
|
<!ENTITY extension.label "Extension:">
|
||||||
|
<!ENTITY extension.accesskey "e">
|
||||||
|
<!--LOCALIZATION NOTE (mimeType): 'MIME' should not be translated -->
|
||||||
<!ENTITY mimetype.label "MIME Type:">
|
<!ENTITY mimetype.label "MIME Type:">
|
||||||
<!ENTITY mimetype.accesskey "m">
|
<!ENTITY mimetype.accesskey "m">
|
||||||
|
<!ENTITY description.label "Description:">
|
||||||
|
<!ENTITY description.accesskey "d">
|
||||||
|
|
||||||
<!ENTITY handledby.label "Handled By">
|
<!ENTITY handling.label "When a file of this type is encountered:">
|
||||||
|
<!ENTITY useDefault.label "Open it using the default application">
|
||||||
<!ENTITY useDefault.label "Use system default">
|
<!ENTITY useDefault.accesskey "o">
|
||||||
<!ENTITY useDefault.accesskey "u">
|
<!ENTITY saveToDisk.label "Save it to Disk">
|
||||||
<!ENTITY saveToDisk.label "Save to Disk">
|
|
||||||
<!ENTITY saveToDisk.accesskey "s">
|
<!ENTITY saveToDisk.accesskey "s">
|
||||||
<!ENTITY application.label "Application">
|
<!ENTITY application.label "Open it with:">
|
||||||
<!ENTITY application.accesskey "a">
|
<!ENTITY application.accesskey "w">
|
||||||
|
|
||||||
<!ENTITY browse.label "Choose...">
|
<!ENTITY browse.label "Choose...">
|
||||||
<!ENTITY browse.accesskey "c">
|
<!ENTITY browse.accesskey "c">
|
||||||
|
|
||||||
<!ENTITY askBeforeOpen.label "Ask me before opening downloaded files of this type">
|
<!ENTITY askBeforeOpen.label "Always ask me before handling files of this type">
|
||||||
<!ENTITY askBeforeOpen.accesskey "k">
|
<!ENTITY askBeforeOpen.accesskey "k">
|
||||||
|
|
||||||
<!ENTITY newDescription.label "Description of type:">
|
|
||||||
<!ENTITY newDescription.accesskey "d">
|
|
||||||
<!ENTITY newExtensions.label "File extension:">
|
|
||||||
<!ENTITY newExtensions.accesskey "e">
|
|
||||||
<!ENTITY newMIME.label "MIME type:">
|
|
||||||
<!ENTITY newMIME.accesskey "m">
|
|
||||||
<!ENTITY newAppPath.label "Application to use:">
|
|
||||||
<!ENTITY newAppPath.accesskey "a">
|
|
||||||
<!ENTITY newTypeTitle.label "New Type">
|
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
<!--LOCALIZATION NOTE : FILE The Applications prefs dialog -->
|
<!--LOCALIZATION NOTE : FILE The Applications prefs dialog -->
|
||||||
<!ENTITY lHeader "Helper Applications">
|
<!ENTITY lHeader "Helper Applications">
|
||||||
<!ENTITY descript "Specify which application should handle each file type">
|
<!ENTITY descript "Specify how to handle files of each file type">
|
||||||
<!ENTITY fileTypes.label "File types:">
|
<!ENTITY fileTypes.label "File types:">
|
||||||
<!ENTITY aimLaunchSelect.label "AOL Instant Messenger Launch">
|
<!ENTITY aimLaunchSelect.label "AOL Instant Messenger Launch">
|
||||||
<!ENTITY newTypeButton.label "New Type...">
|
<!ENTITY newTypeButton.label "New Type...">
|
||||||
|
@ -12,12 +12,9 @@
|
||||||
<!ENTITY removeButton.label "Remove">
|
<!ENTITY removeButton.label "Remove">
|
||||||
<!ENTITY removeButton.accesskey "r">
|
<!ENTITY removeButton.accesskey "r">
|
||||||
<!ENTITY file "File Type Details">
|
<!ENTITY file "File Type Details">
|
||||||
<!ENTITY exten "Extension:">
|
<!ENTITY exten "Extension(s):">
|
||||||
<!--LOCALIZATION NOTE (mimeType): 'MIME' should not be translated -->
|
<!ENTITY mimeDesc "Description:">
|
||||||
<!ENTITY mimeType "MIME type:">
|
<!ENTITY handle "When encountered:">
|
||||||
<!ENTITY handle "Handled by:">
|
|
||||||
<!ENTITY resetText.label "Click "Reset" to clear your file-opening preferences and be asked before opening files.">
|
|
||||||
<!ENTITY resetButton.label "Reset">
|
|
||||||
<!ENTITY fileOpening.label "Opening files">
|
<!ENTITY fileOpening.label "Opening files">
|
||||||
<!ENTITY plugins.label "Plug-in Finder Service">
|
<!ENTITY plugins.label "Plug-in Finder Service">
|
||||||
<!ENTITY pluginFinder.label "Always use the Netscape Plug-in Finder Service (PFS) to get plug-ins.">
|
<!ENTITY pluginFinder.label "Always use the Netscape Plug-in Finder Service (PFS) to get plug-ins.">
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
# foo
|
# foo
|
||||||
|
|
||||||
saveToDisk=Save to Disk
|
saveToDisk=Save these files to disk
|
||||||
handleInternally=Handled Internally
|
useSystemDefault=Open these files using the default application
|
||||||
|
useHelperApp=Open these files with %S
|
||||||
|
handleInternally=Display files of this type in the browser
|
||||||
|
|
||||||
chooseHandler=Choose Application Helper
|
chooseHandler=Choose Application Helper
|
||||||
programsFilter=Programs
|
programsFilter=Programs
|
||||||
|
|
||||||
handlerExists=A helper already exists for the MIME type '%mime%'. Do you want to replace it?
|
handlerExists=A helper already exists for the MIME type '%mime%'. Do you want to replace it?
|
||||||
handlerExistsTitle=Helper Application Exists
|
handlerExistsTitle=Helper Application Exists
|
||||||
|
|
||||||
emptyMIMEType=You must specify a MIME type.
|
emptyMIMEType=You must specify a MIME type.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче