mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 17:23:59 +00:00
partial fix for b41120 and b41123 - tooltips for navigator and taskbar
This commit is contained in:
parent
e9b5165dca
commit
5049019203
@ -252,19 +252,21 @@ nsXULBrowserWindow.prototype =
|
||||
},
|
||||
onProgress : function (channel, current, max)
|
||||
{
|
||||
if(!statusMeter)
|
||||
statusMeter = document.getElementById("statusbar-icon");
|
||||
if(!statusMeter)
|
||||
statusMeter = document.getElementById("statusbar-icon");
|
||||
var percentage = 0;
|
||||
if (max > 0)
|
||||
{
|
||||
percentage = (current * 100) / max ;
|
||||
statusMeter.setAttribute("mode", "normal");
|
||||
if (statusMeter.getAttribute("mode") != "normal")
|
||||
statusMeter.setAttribute("mode", "normal");
|
||||
statusMeter.value = percentage;
|
||||
statusMeter.progresstext = Math.round(percentage) + "%";
|
||||
}
|
||||
else
|
||||
statusMeter.setAttribute("mode","undetermined");
|
||||
|
||||
else {
|
||||
if (statusMeter.getAttribute("mode") != "undetermined")
|
||||
statusMeter.setAttribute("mode","undetermined");
|
||||
}
|
||||
},
|
||||
onStatusChange : function(channel, status)
|
||||
{
|
||||
@ -425,6 +427,17 @@ function Startup()
|
||||
onLoadViaOpenDialog();
|
||||
}
|
||||
gURLBar = document.getElementById("urlbar");
|
||||
|
||||
// set home button tooltip text
|
||||
var homepage;
|
||||
try {
|
||||
homepage = pref.CopyUnicharPref("browser.startup.homepage");
|
||||
}
|
||||
catch(e) {
|
||||
homepage = null;
|
||||
}
|
||||
if (homepage)
|
||||
setTooltipText("homebutton", homepage);
|
||||
}
|
||||
|
||||
function Shutdown()
|
||||
@ -1467,4 +1480,4 @@ function dumpMemoryLeaks() {
|
||||
if (leakDetector != null)
|
||||
leakDetector.dumpLeaks();
|
||||
}
|
||||
|
||||
|
@ -227,24 +227,28 @@ Contributor(s): ______________________________________. -->
|
||||
<!-- Menu -->
|
||||
<menubar id="main-menubar"/>
|
||||
|
||||
<toolbar id="nav-bar" class="toolbar-primary chromeclass-toolbar" persist="collapsed" grippytooltiptext="&navigationBar.tooltip;">
|
||||
<toolbar id="nav-bar" class="toolbar-primary chromeclass-toolbar" persist="collapsed" grippytooltip="aTooltip" grippytooltiptext="&navigationBar.tooltip;">
|
||||
<box id="nav-bar-inner" autostretch="never" flex="1" style="min-width: 0px;">
|
||||
<menubutton class="menubutton-dual top toolbar" id="back-button" value="&backButton.label;"
|
||||
crop="right" observes="canGoBack" oncommand="gotoHistoryIndex(event);"
|
||||
tooltip="aTooltip"
|
||||
buttonaction="BrowserBack();" buttontooltiptext="&backButton.tooltip;">
|
||||
<menupopup oncreate="BrowserBackMenu(event);"/>
|
||||
</menubutton>
|
||||
<menubutton class="menubutton-dual top toolbar" id="forward-button"
|
||||
crop="right" observes="canGoForward"
|
||||
crop="right" observes="canGoForward" tooltip="aTooltip"
|
||||
oncommand="gotoHistoryIndex(event);" buttonaction="BrowserForward();"
|
||||
value="&forwardButton.label;" buttontooltiptext="&forwardButton.tooltip;">
|
||||
<menupopup oncreate="BrowserForwardMenu(event);"/>
|
||||
</menubutton>
|
||||
<button class="button-toolbar-1 top" id="reload-button" crop="right" observes="canReload" value="&reloadButton.label;" tooltiptext="&reloadButton.tooltip;"/>
|
||||
<button class="button-toolbar-1 top" id="stop-button" crop="right" observes="canStop" onclick="BrowserStop()" value="&stopButton.label;" tooltiptext="&stopButton.tooltip;"/>
|
||||
<button class="button-toolbar-1 top" id="reload-button" crop="right" observes="canReload" value="&reloadButton.label;"
|
||||
tooltip="aTooltip" tooltiptext="&reloadButton.tooltip;"/>
|
||||
<button class="button-toolbar-1 top" id="stop-button" crop="right" observes="canStop" onclick="BrowserStop()" value="&stopButton.label;"
|
||||
tooltip="aTooltip" tooltiptext="&stopButton.tooltip;"/>
|
||||
|
||||
<box class="box-toolbar-group" flex="1">
|
||||
<menubutton class="menubutton-icon button-toolbar-3" id="ubhist-keyword-popup" tooltiptext="&internetKeyword.tooltip;">
|
||||
<menubutton class="menubutton-icon button-toolbar-3" id="ubhist-keyword-popup"
|
||||
tooltip="aTooltip" tooltiptext="&internetKeyword.tooltip;">
|
||||
<menupopup class="button-toolbar-3" oncreate="createUBHistoryMenu(event);" oncommand="executeKeywordCommand(event);"/>
|
||||
</menubutton>
|
||||
|
||||
@ -252,31 +256,32 @@ Contributor(s): ______________________________________. -->
|
||||
<box autostretch="never" valign="middle" flex="1">
|
||||
<image id="page-proxy-button" ondraggesture="nsDragAndDrop.startDrag(event, proxyIconDNDObserver);"/>
|
||||
<textfield autocomplete="true" timeout="300" class="plain chromeclass-location"
|
||||
searchSessionType="urlbar" id="urlbar" tooltiptext="&locationBar.tooltip;"
|
||||
searchSessionType="urlbar" id="urlbar" tooltip="aTooltip" tooltiptext="&locationBar.tooltip;"
|
||||
onkeypress="if( event.which == 13 ) { addToUrlbarHistory(); BrowserLoadURL(); }" flex="1"/>
|
||||
<button class="button-toolbar-3" id="search-button" value="&searchButton.label;"
|
||||
oncommand="OpenSearch('internet',false, document.getElementById('urlbar').value);"
|
||||
tooltiptext="&searchButton.tooltip;"/>
|
||||
tooltip="aTooltip" tooltiptext="&searchButton.tooltip;"/>
|
||||
<button class="button-toolbar-3" id="go-button" value="&goButton.label;" oncommand="addToUrlbarHistory(); BrowserLoadURL();"
|
||||
tooltiptext="&goButton.tooltip;"/>
|
||||
tooltip="aTooltip" tooltiptext="&goButton.tooltip;"/>
|
||||
</box>
|
||||
</box>
|
||||
|
||||
</box>
|
||||
<button class="plain" id="navigator-throbber" oncommand="goClickThrobber('browser.throbber.url')" tooltiptext="&throbber.tooltip;"/>
|
||||
<button class="plain" id="navigator-throbber" oncommand="goClickThrobber('browser.throbber.url')" tooltip="aTooltip" tooltiptext="&throbber.tooltip;"/>
|
||||
</toolbar>
|
||||
|
||||
<toolbar id="PersonalToolbar" class="chromeclass-directories" persist="collapsed" dragdroparea="innermostBox"
|
||||
ondraggesture="return BeginDragPersonalToolbar(event);"
|
||||
ondragdrop="return DropPersonalToolbar(event);"
|
||||
ondragover="return DragOverPersonalToolbar(event);"
|
||||
grippytooltip="aTooltip"
|
||||
grippytooltiptext="&personalBar.tooltip;">
|
||||
|
||||
<!-- "Bookmarks" button on personal toolbar -->
|
||||
<menubutton class="button-toolbar bookmarkfolder" id="PersonalMenu"
|
||||
datasources="rdf:bookmarks rdf:files rdf:localsearch rdf:internetsearch rdf:httpindex"
|
||||
ref="NC:BookmarksRoot" container="true" value="&bookmarksButton.label;"
|
||||
tooltiptext="&bookmarksButton.tooltip;">
|
||||
tooltip="aTooltip" tooltiptext="&bookmarksButton.tooltip;">
|
||||
<template>
|
||||
<rule iscontainer="true">
|
||||
<menupopup>
|
||||
@ -316,6 +321,7 @@ Contributor(s): ______________________________________. -->
|
||||
<template>
|
||||
<rule parent="box" iscontainer="true">
|
||||
<menubutton class="button-toolbar bookmarkfolder" uri="rdf:*"
|
||||
tooltip="aTooltip" tooltiptext="rdf:http://home.netscape.com/NC-rdf#URL"
|
||||
value="rdf:http://home.netscape.com/NC-rdf#Name">
|
||||
<menupopup/>
|
||||
</menubutton>
|
||||
@ -323,6 +329,7 @@ Contributor(s): ______________________________________. -->
|
||||
|
||||
<rule parent="box">
|
||||
<button class="button-toolbar bookmarkitem" uri="rdf:*"
|
||||
tooltip="aTooltip" tooltiptext="rdf:http://home.netscape.com/NC-rdf#URL"
|
||||
value="rdf:http://home.netscape.com/NC-rdf#Name"
|
||||
oncommand="OpenBookmarkURL(event.target, document.getElementById('innermostBox').database);"/>
|
||||
</rule>
|
||||
@ -350,6 +357,7 @@ Contributor(s): ______________________________________. -->
|
||||
</template>
|
||||
|
||||
<button class="button-toolbar" id="homebutton" value="&homeButton.label;"
|
||||
tooltip="aTooltip"
|
||||
ondraggesture="nsDragAndDrop.startDrag(event, homeButtonObserver);"
|
||||
ondragover="nsDragAndDrop.dragOver(event, homeButtonObserver);"
|
||||
ondragdrop="nsDragAndDrop.drop(event, homeButtonObserver);"
|
||||
|
@ -363,8 +363,11 @@ var homeButtonObserver = {
|
||||
}
|
||||
else
|
||||
setHomepage = true;
|
||||
if (setHomepage)
|
||||
nsPreferences.setUnicharPref("browser.startup.homepage", url);
|
||||
if (setHomepage)
|
||||
{
|
||||
nsPreferences.setUnicharPref("browser.startup.homepage", url);
|
||||
setTooltipText("homebutton", url);
|
||||
}
|
||||
},
|
||||
|
||||
onDragOver: function (aEvent, aFlavour)
|
||||
|
@ -18,6 +18,3 @@ droponhomemsg2=to be your new home page?
|
||||
dontremindme=Always check when I drag an address to the Home button (This can also be set in the 'Navigator' category of Preferences)
|
||||
droponhomeokbutton=Set Home Page
|
||||
|
||||
gooffline=Work Offline
|
||||
goonline=Work Online
|
||||
|
||||
|
@ -14,14 +14,17 @@ function setOfflineStatus(aToggleFlag)
|
||||
if (aToggleFlag)
|
||||
ioService.offline = !ioService.offline;
|
||||
|
||||
var bundle = srGetStrBundle("chrome://communicator/locale/utilityOverlay.properties");
|
||||
if (ioService.offline && broadcaster)
|
||||
{
|
||||
broadcaster.setAttribute("offline", "true");
|
||||
broadcaster.setAttribute("tooltiptext", bundle.GetStringFromName("offlineTooltip"));
|
||||
broadcaster.setAttribute("value", bundle.GetStringFromName("goonline"));
|
||||
}
|
||||
else if (broadcaster)
|
||||
{
|
||||
broadcaster.removeAttribute("offline");
|
||||
broadcaster.setAttribute("tooltiptext", bundle.GetStringFromName("onlineTooltip"));
|
||||
broadcaster.setAttribute("value", bundle.GetStringFromName("gooffline"));
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
<broadcaster id="Communicator:Synchronize" value="&offlineSynchronizeCmd.label;" disabled="true" />
|
||||
<broadcaster id="Communicator:WorkMode" value="&offlineGoOfflineCmd.label;" oncommand="setOfflineStatus(true);"/>
|
||||
</broadcasterset>
|
||||
<statusbarpanel id="offline-status" observes="Communicator:WorkMode"/>
|
||||
<statusbarpanel id="offline-status" tooltip="aTooltip" observes="Communicator:WorkMode"/>
|
||||
<menu id="offlineMenu" value="&offlineMenu.label;" accesskey="&offlineMenu.accesskey;">
|
||||
<menupopup id="offlineMenuPopup">
|
||||
<menuitem position="1" accesskey="&offlineGoOfflineCmd.accesskey;" observes="Communicator:WorkMode"/>
|
||||
|
@ -1 +1,2 @@
|
||||
utilityOverlay.dtd
|
||||
utilityOverlay.properties
|
||||
|
@ -37,6 +37,7 @@ CHROME_MISC = \
|
||||
|
||||
CHROME_L10N = \
|
||||
utilityOverlay.dtd \
|
||||
utilityOverlay.properties \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
@ -32,6 +32,7 @@ CHROME_MISC = \
|
||||
|
||||
CHROME_L10N = \
|
||||
.\utilityOverlay.dtd \
|
||||
.\utilityOverlay.properties \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
@ -0,0 +1,7 @@
|
||||
|
||||
onlineTooltip=You are online. Click the icon to go offline.
|
||||
offlineTooltip=You are offline. Click the icon to go online.
|
||||
|
||||
gooffline=Work Offline
|
||||
goonline=Work Online
|
||||
|
@ -93,6 +93,13 @@ function goOnEvent(node, event)
|
||||
}
|
||||
}
|
||||
|
||||
function setTooltipText(aID, aTooltipText)
|
||||
{
|
||||
var element = document.getElementById(aID);
|
||||
if (element)
|
||||
element.setAttribute("tooltiptext", aTooltipText);
|
||||
}
|
||||
|
||||
function FillInTooltip ( tipElement )
|
||||
{
|
||||
var retVal = false;
|
||||
|
@ -83,48 +83,85 @@
|
||||
<xul:button class="menubutton-dual-button top" allowevents="true"
|
||||
inherits="buttontooltiptext:tooltiptext,buttonaction:oncommand,src,value,crop,accesskey"/>
|
||||
<xul:box class="menubutton-dual-dropmarker-box" autostretch="never" valign="middle">
|
||||
<xul:image class="menubutton-dropmarker"/>
|
||||
<xul:image class="menubutton-dropmarker" inherits="disabled"/>
|
||||
</xul:box>
|
||||
</xul:box>
|
||||
</content>
|
||||
<handlers>
|
||||
<handler type="mouseover">
|
||||
<![CDATA[
|
||||
this.setAttribute("mouseover","true"); // hack to pass mouseover event inwards
|
||||
]]>
|
||||
</handler>
|
||||
<handler type="mouseout">
|
||||
<![CDATA[
|
||||
this.removeAttribute("mouseover");
|
||||
]]>
|
||||
</handler>
|
||||
</handlers>
|
||||
</binding>
|
||||
|
||||
<binding id="menubutton-dual-left">
|
||||
<binding id="menubutton-dual-left" extends="chrome://global/content/menulistBindings.xml#menubutton-dual-top">
|
||||
<content excludes="template,observes,menupopup">
|
||||
<xul:box class="menubutton-internal-box">
|
||||
<xul:button class="menubutton-dual-button left" allowevents="true"
|
||||
inherits="buttontooltiptext:tooltiptext,buttonaction:oncommand,src,value,crop,accesskey"/>
|
||||
<xul:box class="menubutton-dual-dropmarker-box" autostretch="never" valign="middle">
|
||||
<xul:image class="menubutton-dropmarker"/>
|
||||
<xul:image class="menubutton-dropmarker" inherits="disabled"/>
|
||||
</xul:box>
|
||||
</xul:box>
|
||||
</content>
|
||||
</binding>
|
||||
|
||||
<binding id="menubutton-dual-right">
|
||||
<binding id="menubutton-dual-right" extends="chrome://global/content/menulistBindings.xml#menubutton-dual-top">
|
||||
<content excludes="template,observes,menupopup">
|
||||
<xul:box class="menubutton-internal-box">
|
||||
<xul:button class="menubutton-dual-button right" allowevents="true"
|
||||
inherits="buttontooltiptext:tooltiptext,buttonaction:oncommand,src,value,crop,accesskey"/>
|
||||
<xul:box class="menubutton-dual-dropmarker-box" autostretch="never" valign="middle">
|
||||
<xul:image class="menubutton-dropmarker"/>
|
||||
<xul:image class="menubutton-dropmarker" inherits="disabled"/>
|
||||
</xul:box>
|
||||
</xul:box>
|
||||
</content>
|
||||
</binding>
|
||||
|
||||
<binding id="menubutton-dual-bottom">
|
||||
<binding id="menubutton-dual-bottom" extends="chrome://global/content/menulistBindings.xml#menubutton-dual-top">
|
||||
<content excludes="template,observes,menupopup">
|
||||
<xul:box class="menubutton-internal-box">
|
||||
<xul:button class="menubutton-dual-button bottom" allowevents="true"
|
||||
inherits="buttontooltiptext:tooltiptext,buttonaction:oncommand,src,value,crop,accesskey"/>
|
||||
<xul:box class="menubutton-dual-dropmarker-box" autostretch="never" valign="middle">
|
||||
<xul:image class="menubutton-dropmarker"/>
|
||||
<xul:image class="menubutton-dropmarker" inherits="disabled"/>
|
||||
</xul:box>
|
||||
</xul:box>
|
||||
</content>
|
||||
</binding>
|
||||
|
||||
<!-- need ability to fire events -->
|
||||
<binding id="menubutton-toolbar">
|
||||
<content excludes="observes,template,menupopup">
|
||||
<xul:button class="menubutton-dual-button button-toolbar-1 top" allowevents="true"
|
||||
inherits="buttontooltiptext:tooltiptext,buttonaction:oncommand,src,value,crop,accesskey,disabled"
|
||||
onmouseover="parentNode.setAttribute('buttonover','true');"
|
||||
onmouseout="parentNode.removeAttribute('buttonover');"/>
|
||||
<xul:box class="menubutton-dual-dropmarker-box" autostretch="never" valign="middle" flex="1">
|
||||
<xul:image class="menubutton-dual-dropmarker" inherits="disabled"/>
|
||||
</xul:box>
|
||||
</content>
|
||||
<handlers>
|
||||
<handler type="mouseover">
|
||||
<![CDATA[
|
||||
this.setAttribute('markerover','true');
|
||||
]]>
|
||||
</handler>
|
||||
<handler type="mouseout">
|
||||
<![CDATA[
|
||||
this.removeAttribute('markerover');
|
||||
]]>
|
||||
</handler>
|
||||
</handlers>
|
||||
</binding>
|
||||
|
||||
<!--
|
||||
BINDING : menubutton-item
|
||||
XUL REPRESENTATION : menuitem
|
||||
|
@ -1,6 +1,11 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<!DOCTYPE window SYSTEM "chrome://global/locale/taskbarOverlay.dtd">
|
||||
<!DOCTYPE window [
|
||||
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
|
||||
%brandDTD;
|
||||
<!ENTITY % taskbarDTD SYSTEM "chrome://global/locale/taskbarOverlay.dtd" >
|
||||
%taskbarDTD;
|
||||
]>
|
||||
|
||||
<overlay id="taskbarOverlay"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
@ -59,6 +64,7 @@
|
||||
to display all of the open windows -->
|
||||
<menubutton oncommand="ShowWindowFromResource(event.target)"
|
||||
datasources="rdf:window-mediator" ref="NC:WindowMediatorRoot"
|
||||
tooltip="aTooltip" tooltiptext="&taskWindowList.tooltip;"
|
||||
value="&openWinButton.label;" class="button-toolbar-4 plain">
|
||||
<template>
|
||||
<menupopup>
|
||||
|
@ -2,7 +2,12 @@
|
||||
<?xml-stylesheet href="chrome://global/skin/tasksOverlay.css" type="text/css"?>
|
||||
<?xul-overlay href="chrome://global/content/PSMTaskMenu.xul"?>
|
||||
|
||||
<!DOCTYPE window SYSTEM "chrome://global/locale/tasksOverlay.dtd">
|
||||
<!DOCTYPE window [
|
||||
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
|
||||
%brandDTD;
|
||||
<!ENTITY % tasksDTD SYSTEM "chrome://global/locale/tasksOverlay.dtd" >
|
||||
%tasksDTD;
|
||||
]>
|
||||
|
||||
<?xul-overlay href="chrome://global/content/taskbarOverlay.xul"?>
|
||||
|
||||
@ -99,12 +104,17 @@
|
||||
</menu>
|
||||
|
||||
<toolbox id="taskbar">
|
||||
<toolbar class="toolbar-standard chromeclass-status" persist="collapsed" style="min-width: 1px;">
|
||||
<toolbar class="toolbar-standard chromeclass-status" persist="collapsed" style="min-width: 1px;"
|
||||
grippytooltip="aTooltip" grippytooltiptext="&taskBar.tooltip;">
|
||||
<box id="taskButtons">
|
||||
<button class="button-toolbar-4 plain taskbutton" id="mini-nav" onclick="toNavigator();"/>
|
||||
<button class="button-toolbar-4 plain taskbutton" id="mini-mail" onclick="toMessengerWindow()"/>
|
||||
<button class="button-toolbar-4 plain taskbutton" id="mini-comp" onclick="toEditor();" />
|
||||
<button class="button-toolbar-4 plain taskbutton" id="mini-addr" onclick="toAddressBook()"/>
|
||||
<button class="button-toolbar-4 plain taskbutton" id="mini-nav" onclick="toNavigator();"
|
||||
tooltip="aTooltip" tooltiptext="&taskNavigator.tooltip;"/>
|
||||
<button class="button-toolbar-4 plain taskbutton" id="mini-mail" onclick="toMessengerWindow()"
|
||||
tooltip="aTooltip" tooltiptext="&taskMessenger.tooltip;"/>
|
||||
<button class="button-toolbar-4 plain taskbutton" id="mini-comp" onclick="toEditor();"
|
||||
tooltip="aTooltip" tooltiptext="&taskComposer.tooltip;"/>
|
||||
<button class="button-toolbar-4 plain taskbutton" id="mini-addr" onclick="toAddressBook()"
|
||||
tooltip="aTooltip" tooltiptext="&taskAddressBook.tooltip;"/>
|
||||
</box>
|
||||
<box id="taskbarMenuBox"/>
|
||||
<box id="taskbarGotoMenuBox" align="right"/>
|
||||
|
@ -379,7 +379,7 @@
|
||||
|
||||
<binding id="toolbar">
|
||||
<content>
|
||||
<xul:toolbargrippy inherits="grippytooltiptext:tooltiptext"
|
||||
<xul:toolbargrippy inherits="grippytooltiptext:tooltiptext,grippytooltip:tooltip"
|
||||
onclick="var v = parentNode;
|
||||
var attr = v.getAttribute('collapsed');
|
||||
if (attr == 'true') {
|
||||
|
@ -6,3 +6,5 @@
|
||||
<!-- taskbar popups -->
|
||||
<!-- LOCALIZATION NOTE (tinderboxButton.label): Do NOT translate "Tinderbox" -->
|
||||
<!ENTITY tinderboxButton.label "Look at Tinderbox">
|
||||
|
||||
<!ENTITY taskWindowList.tooltip "List of open windows">
|
@ -46,3 +46,10 @@
|
||||
<!ENTITY walletObscureCmd.label "Obscure Stored Data">
|
||||
<!ENTITY walletCookieManager.label "Cookie Manager">
|
||||
<!ENTITY walletImageManager.label "Image Manager">
|
||||
|
||||
<!ENTITY taskNavigator.tooltip "Navigator">
|
||||
<!ENTITY taskMessenger.tooltip "&brandShortName; Mail">
|
||||
<!ENTITY taskComposer.tooltip "Composer">
|
||||
<!ENTITY taskAddressBook.tooltip "Address Book">
|
||||
<!ENTITY taskBar.tooltip "Taskbar">
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user