partial fix for b41120 and b41123 - tooltips for navigator and taskbar

This commit is contained in:
ben%netscape.com 2006-09-14 05:50:51 +00:00
Родитель 4fca64bc63
Коммит 6e9572a39c
4 изменённых файлов: 43 добавлений и 22 удалений

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

@ -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