Bug 399539 - ""Applications" prefpane is too narrow" (add tooltips) [p=dao@mozilla.com (D��o Gottwald) r=gavin ui-r=beltzner a=blocking-firefox3+]

This commit is contained in:
reed%reedloden.com 2008-01-07 22:32:46 +00:00
Родитель 78beb3acf1
Коммит 9a5c105913
2 изменённых файлов: 19 добавлений и 7 удалений

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

@ -1248,6 +1248,7 @@ var gApplicationsPane = {
else
label = this._prefsBundle.getString("alwaysAsk");
askMenuItem.setAttribute("label", label);
askMenuItem.setAttribute("tooltiptext", label);
askMenuItem.setAttribute("image", ICON_URL_ASK);
menuPopup.appendChild(askMenuItem);
}
@ -1259,6 +1260,7 @@ var gApplicationsPane = {
let label = this._prefsBundle.getFormattedString("liveBookmarksInApp",
[this._brandShortName]);
internalMenuItem.setAttribute("label", label);
internalMenuItem.setAttribute("tooltiptext", label);
internalMenuItem.setAttribute("image", ICON_URL_LIVEMARK);
menuPopup.appendChild(internalMenuItem);
@ -1273,6 +1275,7 @@ var gApplicationsPane = {
var defaultMenuItem = document.createElementNS(kXULNS, "menuitem");
defaultMenuItem.setAttribute("action", Ci.nsIHandlerInfo.useSystemDefault);
defaultMenuItem.setAttribute("label", handlerInfo.defaultDescription);
defaultMenuItem.setAttribute("tooltiptext", handlerInfo.defaultDescription);
defaultMenuItem.setAttribute("image", this._getIconURLForSystemDefault(handlerInfo));
menuPopup.appendChild(defaultMenuItem);
@ -1289,10 +1292,13 @@ var gApplicationsPane = {
let menuItem = document.createElementNS(kXULNS, "menuitem");
menuItem.setAttribute("action", Ci.nsIHandlerInfo.useHelperApp);
let label;
if (possibleApp instanceof Ci.nsILocalHandlerApp)
menuItem.setAttribute("label", getDisplayNameForFile(possibleApp.executable));
label = getDisplayNameForFile(possibleApp.executable);
else
menuItem.setAttribute("label", possibleApp.name);
label = possibleApp.name;
menuItem.setAttribute("label", label);
menuItem.setAttribute("tooltiptext", label);
menuItem.setAttribute("image", this._getIconURLForHandlerApp(possibleApp));
// Attach the handler app object to the menu item so we can use it
@ -1311,6 +1317,7 @@ var gApplicationsPane = {
[handlerInfo.plugin.name,
this._brandShortName]);
pluginMenuItem.setAttribute("label", label);
pluginMenuItem.setAttribute("tooltiptext", label);
pluginMenuItem.setAttribute("image", ICON_URL_PLUGIN);
menuPopup.appendChild(pluginMenuItem);
}
@ -1319,7 +1326,9 @@ var gApplicationsPane = {
{
let menuItem = document.createElementNS(kXULNS, "menuitem");
menuItem.setAttribute("oncommand", "gApplicationsPane.chooseApp(event)");
menuItem.setAttribute("label", this._prefsBundle.getString("chooseApp"));
let label = this._prefsBundle.getString("chooseApp");
menuItem.setAttribute("label", label);
menuItem.setAttribute("tooltiptext", label);
menuPopup.appendChild(menuItem);
}
@ -1331,7 +1340,9 @@ var gApplicationsPane = {
handlerInfo.type != TYPE_MAYBE_FEED) {
var saveMenuItem = document.createElementNS(kXULNS, "menuitem");
saveMenuItem.setAttribute("action", Ci.nsIHandlerInfo.saveToDisk);
saveMenuItem.setAttribute("label", this._prefsBundle.getString("saveFile"));
let label = this._prefsBundle.getString("saveFile");
saveMenuItem.setAttribute("label", label);
saveMenuItem.setAttribute("tooltiptext", label);
saveMenuItem.setAttribute("image", ICON_URL_SAVE);
menuPopup.appendChild(saveMenuItem);
}

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

@ -61,12 +61,12 @@
<binding id="handler" extends="chrome://browser/content/preferences/handlers.xml#handler-base">
<content>
<xul:hbox flex="1" equalsize="always">
<xul:hbox flex="1" align="center">
<xul:hbox flex="1" align="center" xbl:inherits="tooltiptext=typeDescription">
<xul:image src="moz-icon://goat?size=16" class="typeIcon"
xbl:inherits="src=typeIcon" height="16" width="16"/>
<xul:label flex="1" crop="end" xbl:inherits="value=typeDescription"/>
</xul:hbox>
<xul:hbox flex="1" align="center">
<xul:hbox flex="1" align="center" xbl:inherits="tooltiptext=actionDescription">
<xul:image xbl:inherits="src=actionIcon" height="16" width="16" class="actionIcon"/>
<xul:label flex="1" crop="end" xbl:inherits="value=actionDescription"/>
</xul:hbox>
@ -77,13 +77,14 @@
<binding id="handler-selected" extends="chrome://browser/content/preferences/handlers.xml#handler-base">
<content>
<xul:hbox flex="1" equalsize="always">
<xul:hbox flex="1" align="center">
<xul:hbox flex="1" align="center" xbl:inherits="tooltiptext=typeDescription">
<xul:image src="moz-icon://goat?size=16" class="typeIcon"
xbl:inherits="src=typeIcon" height="16" width="16"/>
<xul:label flex="1" crop="end" xbl:inherits="value=typeDescription"/>
</xul:hbox>
<xul:hbox flex="1">
<xul:menulist class="actionsMenu" flex="1" crop="end" selectedIndex="1"
xbl:inherits="tooltiptext=actionDescription"
oncommand="gApplicationsPane.onSelectAction(event.originalTarget)">
<xul:menupopup/>
</xul:menulist>