зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
78beb3acf1
Коммит
9a5c105913
|
@ -1248,6 +1248,7 @@ var gApplicationsPane = {
|
||||||
else
|
else
|
||||||
label = this._prefsBundle.getString("alwaysAsk");
|
label = this._prefsBundle.getString("alwaysAsk");
|
||||||
askMenuItem.setAttribute("label", label);
|
askMenuItem.setAttribute("label", label);
|
||||||
|
askMenuItem.setAttribute("tooltiptext", label);
|
||||||
askMenuItem.setAttribute("image", ICON_URL_ASK);
|
askMenuItem.setAttribute("image", ICON_URL_ASK);
|
||||||
menuPopup.appendChild(askMenuItem);
|
menuPopup.appendChild(askMenuItem);
|
||||||
}
|
}
|
||||||
|
@ -1259,6 +1260,7 @@ var gApplicationsPane = {
|
||||||
let label = this._prefsBundle.getFormattedString("liveBookmarksInApp",
|
let label = this._prefsBundle.getFormattedString("liveBookmarksInApp",
|
||||||
[this._brandShortName]);
|
[this._brandShortName]);
|
||||||
internalMenuItem.setAttribute("label", label);
|
internalMenuItem.setAttribute("label", label);
|
||||||
|
internalMenuItem.setAttribute("tooltiptext", label);
|
||||||
internalMenuItem.setAttribute("image", ICON_URL_LIVEMARK);
|
internalMenuItem.setAttribute("image", ICON_URL_LIVEMARK);
|
||||||
menuPopup.appendChild(internalMenuItem);
|
menuPopup.appendChild(internalMenuItem);
|
||||||
|
|
||||||
|
@ -1273,6 +1275,7 @@ var gApplicationsPane = {
|
||||||
var defaultMenuItem = document.createElementNS(kXULNS, "menuitem");
|
var defaultMenuItem = document.createElementNS(kXULNS, "menuitem");
|
||||||
defaultMenuItem.setAttribute("action", Ci.nsIHandlerInfo.useSystemDefault);
|
defaultMenuItem.setAttribute("action", Ci.nsIHandlerInfo.useSystemDefault);
|
||||||
defaultMenuItem.setAttribute("label", handlerInfo.defaultDescription);
|
defaultMenuItem.setAttribute("label", handlerInfo.defaultDescription);
|
||||||
|
defaultMenuItem.setAttribute("tooltiptext", handlerInfo.defaultDescription);
|
||||||
defaultMenuItem.setAttribute("image", this._getIconURLForSystemDefault(handlerInfo));
|
defaultMenuItem.setAttribute("image", this._getIconURLForSystemDefault(handlerInfo));
|
||||||
|
|
||||||
menuPopup.appendChild(defaultMenuItem);
|
menuPopup.appendChild(defaultMenuItem);
|
||||||
|
@ -1289,10 +1292,13 @@ var gApplicationsPane = {
|
||||||
|
|
||||||
let menuItem = document.createElementNS(kXULNS, "menuitem");
|
let menuItem = document.createElementNS(kXULNS, "menuitem");
|
||||||
menuItem.setAttribute("action", Ci.nsIHandlerInfo.useHelperApp);
|
menuItem.setAttribute("action", Ci.nsIHandlerInfo.useHelperApp);
|
||||||
|
let label;
|
||||||
if (possibleApp instanceof Ci.nsILocalHandlerApp)
|
if (possibleApp instanceof Ci.nsILocalHandlerApp)
|
||||||
menuItem.setAttribute("label", getDisplayNameForFile(possibleApp.executable));
|
label = getDisplayNameForFile(possibleApp.executable);
|
||||||
else
|
else
|
||||||
menuItem.setAttribute("label", possibleApp.name);
|
label = possibleApp.name;
|
||||||
|
menuItem.setAttribute("label", label);
|
||||||
|
menuItem.setAttribute("tooltiptext", label);
|
||||||
menuItem.setAttribute("image", this._getIconURLForHandlerApp(possibleApp));
|
menuItem.setAttribute("image", this._getIconURLForHandlerApp(possibleApp));
|
||||||
|
|
||||||
// Attach the handler app object to the menu item so we can use it
|
// Attach the handler app object to the menu item so we can use it
|
||||||
|
@ -1311,6 +1317,7 @@ var gApplicationsPane = {
|
||||||
[handlerInfo.plugin.name,
|
[handlerInfo.plugin.name,
|
||||||
this._brandShortName]);
|
this._brandShortName]);
|
||||||
pluginMenuItem.setAttribute("label", label);
|
pluginMenuItem.setAttribute("label", label);
|
||||||
|
pluginMenuItem.setAttribute("tooltiptext", label);
|
||||||
pluginMenuItem.setAttribute("image", ICON_URL_PLUGIN);
|
pluginMenuItem.setAttribute("image", ICON_URL_PLUGIN);
|
||||||
menuPopup.appendChild(pluginMenuItem);
|
menuPopup.appendChild(pluginMenuItem);
|
||||||
}
|
}
|
||||||
|
@ -1319,7 +1326,9 @@ var gApplicationsPane = {
|
||||||
{
|
{
|
||||||
let menuItem = document.createElementNS(kXULNS, "menuitem");
|
let menuItem = document.createElementNS(kXULNS, "menuitem");
|
||||||
menuItem.setAttribute("oncommand", "gApplicationsPane.chooseApp(event)");
|
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);
|
menuPopup.appendChild(menuItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1331,7 +1340,9 @@ var gApplicationsPane = {
|
||||||
handlerInfo.type != TYPE_MAYBE_FEED) {
|
handlerInfo.type != TYPE_MAYBE_FEED) {
|
||||||
var saveMenuItem = document.createElementNS(kXULNS, "menuitem");
|
var saveMenuItem = document.createElementNS(kXULNS, "menuitem");
|
||||||
saveMenuItem.setAttribute("action", Ci.nsIHandlerInfo.saveToDisk);
|
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);
|
saveMenuItem.setAttribute("image", ICON_URL_SAVE);
|
||||||
menuPopup.appendChild(saveMenuItem);
|
menuPopup.appendChild(saveMenuItem);
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,12 +61,12 @@
|
||||||
<binding id="handler" extends="chrome://browser/content/preferences/handlers.xml#handler-base">
|
<binding id="handler" extends="chrome://browser/content/preferences/handlers.xml#handler-base">
|
||||||
<content>
|
<content>
|
||||||
<xul:hbox flex="1" equalsize="always">
|
<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"
|
<xul:image src="moz-icon://goat?size=16" class="typeIcon"
|
||||||
xbl:inherits="src=typeIcon" height="16" width="16"/>
|
xbl:inherits="src=typeIcon" height="16" width="16"/>
|
||||||
<xul:label flex="1" crop="end" xbl:inherits="value=typeDescription"/>
|
<xul:label flex="1" crop="end" xbl:inherits="value=typeDescription"/>
|
||||||
</xul:hbox>
|
</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:image xbl:inherits="src=actionIcon" height="16" width="16" class="actionIcon"/>
|
||||||
<xul:label flex="1" crop="end" xbl:inherits="value=actionDescription"/>
|
<xul:label flex="1" crop="end" xbl:inherits="value=actionDescription"/>
|
||||||
</xul:hbox>
|
</xul:hbox>
|
||||||
|
@ -77,13 +77,14 @@
|
||||||
<binding id="handler-selected" extends="chrome://browser/content/preferences/handlers.xml#handler-base">
|
<binding id="handler-selected" extends="chrome://browser/content/preferences/handlers.xml#handler-base">
|
||||||
<content>
|
<content>
|
||||||
<xul:hbox flex="1" equalsize="always">
|
<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"
|
<xul:image src="moz-icon://goat?size=16" class="typeIcon"
|
||||||
xbl:inherits="src=typeIcon" height="16" width="16"/>
|
xbl:inherits="src=typeIcon" height="16" width="16"/>
|
||||||
<xul:label flex="1" crop="end" xbl:inherits="value=typeDescription"/>
|
<xul:label flex="1" crop="end" xbl:inherits="value=typeDescription"/>
|
||||||
</xul:hbox>
|
</xul:hbox>
|
||||||
<xul:hbox flex="1">
|
<xul:hbox flex="1">
|
||||||
<xul:menulist class="actionsMenu" flex="1" crop="end" selectedIndex="1"
|
<xul:menulist class="actionsMenu" flex="1" crop="end" selectedIndex="1"
|
||||||
|
xbl:inherits="tooltiptext=actionDescription"
|
||||||
oncommand="gApplicationsPane.onSelectAction(event.originalTarget)">
|
oncommand="gApplicationsPane.onSelectAction(event.originalTarget)">
|
||||||
<xul:menupopup/>
|
<xul:menupopup/>
|
||||||
</xul:menulist>
|
</xul:menulist>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче