bug 397690: display full executable name instead of leaf name for applications in Applications prefpane; Patch by Jim Mathies, r=myk, a=mconnor

This commit is contained in:
myk%mozilla.org 2007-09-28 22:50:24 +00:00
Родитель 89e1cf49de
Коммит 01b1c6e5eb
1 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

@ -1005,7 +1005,7 @@ var gApplicationsPane = {
return this._prefsBundle.getString("saveFile");
case Ci.nsIHandlerInfo.useHelperApp:
return aHandlerInfo.preferredApplicationHandler.name;
return getDisplayNameForFile(aHandlerInfo.preferredApplicationHandler.executable);
case Ci.nsIHandlerInfo.handleInternally:
// For the feed type, handleInternally means live bookmarks.
@ -1150,6 +1150,9 @@ var gApplicationsPane = {
let menuItem = document.createElementNS(kXULNS, "menuitem");
menuItem.setAttribute("action", Ci.nsIHandlerInfo.useHelperApp);
if (possibleApp instanceof Ci.nsILocalHandlerApp)
menuItem.setAttribute("label", getDisplayNameForFile(possibleApp.executable));
else
menuItem.setAttribute("label", possibleApp.name);
menuItem.setAttribute("image", this._getIconURLForHandlerApp(possibleApp));