Bug 404109: Move the home button to the Bookmarks toolbar, and change the toolbar ID to reset customization state, patch by Dão Gottwald <dao@mozilla.com>, r=me, sr=mconnor, a=mconnor/beltzner
git-svn-id: svn://10.0.0.236/trunk@244520 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
4f19e9c6fe
commit
85ef0734c2
@ -949,6 +949,7 @@ function delayedStartup()
|
||||
|
||||
gPrefService.addObserver(gHomeButton.prefDomain, gHomeButton, false);
|
||||
gHomeButton.updateTooltip();
|
||||
gHomeButton.setPersonalToolbarStyle();
|
||||
|
||||
#ifdef HAVE_SHELL_SERVICE
|
||||
// Perform default browser checking (after window opens).
|
||||
@ -3073,6 +3074,8 @@ function BrowserCustomizeToolbar()
|
||||
if (splitter)
|
||||
splitter.parentNode.removeChild(splitter);
|
||||
|
||||
gHomeButton.unsetPersonalToolbarStyle();
|
||||
|
||||
#ifdef TOOLBAR_CUSTOMIZATION_SHEET
|
||||
var sheetFrame = document.getElementById("customizeToolbarSheetIFrame");
|
||||
sheetFrame.hidden = false;
|
||||
@ -3119,6 +3122,8 @@ function BrowserToolboxCustomizeDone(aToolboxChanged)
|
||||
|
||||
UpdateUrlbarSearchSplitterState();
|
||||
|
||||
gHomeButton.setPersonalToolbarStyle();
|
||||
|
||||
// Update the urlbar
|
||||
if (gURLBar) {
|
||||
URLBarSetURI();
|
||||
@ -4199,6 +4204,20 @@ var gHomeButton = {
|
||||
}
|
||||
|
||||
return url;
|
||||
},
|
||||
|
||||
setPersonalToolbarStyle: function ()
|
||||
{
|
||||
var homeButton = document.getElementById("home-button");
|
||||
if (homeButton && homeButton.parentNode.id == "personal-toolbar")
|
||||
homeButton.className = homeButton.className.replace("toolbarbutton-1", "bookmark-item");
|
||||
},
|
||||
|
||||
unsetPersonalToolbarStyle: function ()
|
||||
{
|
||||
var homeButton = document.getElementById("home-button");
|
||||
if (homeButton)
|
||||
homeButton.className = homeButton.className.replace("bookmark-item", "toolbarbutton-1");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -423,14 +423,14 @@
|
||||
|
||||
</toolbarpalette>
|
||||
|
||||
<toolbar id="nav-bar" class="toolbar-primary chromeclass-toolbar"
|
||||
<toolbar id="navigation-toolbar" class="toolbar-primary chromeclass-toolbar"
|
||||
toolbarname="&navbarCmd.label;" accesskey="&navbarCmd.accesskey;"
|
||||
fullscreentoolbar="true" mode="icons"
|
||||
customizable="true"
|
||||
#ifdef XP_MACOSX
|
||||
defaultset="unified-back-forward-button,reload-button,stop-button,home-button,urlbar-container,splitter,search-container,throbber-box"
|
||||
defaultset="unified-back-forward-button,reload-button,stop-button,urlbar-container,search-container,throbber-box"
|
||||
#else
|
||||
defaultset="unified-back-forward-button,reload-button,stop-button,home-button,urlbar-container,splitter,search-container,fullscreenflex,window-controls"
|
||||
defaultset="unified-back-forward-button,reload-button,stop-button,urlbar-container,search-container,fullscreenflex,window-controls"
|
||||
#endif
|
||||
context="toolbar-context-menu">
|
||||
#ifndef XP_MACOSX
|
||||
@ -453,10 +453,10 @@
|
||||
|
||||
<toolbarset id="customToolbars" context="toolbar-context-menu"/>
|
||||
|
||||
<toolbar id="PersonalToolbar" mode="icons" iconsize="small"
|
||||
<toolbar id="personal-toolbar" mode="icons" iconsize="small"
|
||||
class="chromeclass-directories"
|
||||
context="toolbar-context-menu"
|
||||
defaultset="bookmarksBarShowPlaces,personal-bookmarks"
|
||||
defaultset="home-button,personal-bookmarks"
|
||||
toolbarname="&personalbarCmd.label;" accesskey="&personalbarCmd.accesskey;"
|
||||
customizable="true"/>
|
||||
</toolbox>
|
||||
|
||||
@ -56,7 +56,7 @@
|
||||
-moz-box-flex: 1; /* make menu items expand to fill toolbar height */
|
||||
}
|
||||
|
||||
#PersonalToolbar {
|
||||
#personal-toolbar {
|
||||
min-height: 26px;
|
||||
}
|
||||
|
||||
@ -80,7 +80,7 @@
|
||||
}
|
||||
|
||||
#navigator-toolbox[inFullscreen="true"],
|
||||
#navigator-toolbox[inFullscreen="true"] > #nav-bar {
|
||||
#navigator-toolbox[inFullscreen="true"] > #navigation-toolbar {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
@ -642,10 +642,12 @@ toolbar[iconsize="small"] #reload-button[disabled="true"] {
|
||||
list-style-image: url("moz-icon://stock/gtk-refresh?size=menu&state=disabled");
|
||||
}
|
||||
|
||||
toolbar[iconsize="small"] #home-button {
|
||||
toolbar[iconsize="small"] #home-button ,
|
||||
#personal-toolbar > #home-button {
|
||||
list-style-image: url("moz-icon://stock/gtk-home?size=menu");
|
||||
}
|
||||
toolbar[iconsize="small"] #home-button[disabled="true"] {
|
||||
toolbar[iconsize="small"] #home-button[disabled="true"] ,
|
||||
#personal-toolbar > #home-button[disabled="true"] {
|
||||
list-style-image: url("moz-icon://stock/gtk-home?size=menu&state=disabled");
|
||||
}
|
||||
|
||||
|
||||
@ -66,7 +66,7 @@
|
||||
|
||||
/* ----- BOOKMARK TOOLBAR ----- */
|
||||
|
||||
#PersonalToolbar {
|
||||
#personal-toolbar {
|
||||
background: url("chrome://browser/skin/bookmark_toolbar_background.gif") repeat-x center center;
|
||||
border-top: 1px solid #DDDDDD;
|
||||
border-bottom: 2px solid;
|
||||
@ -274,7 +274,7 @@ toolbar[mode="text"] .toolbarbutton-1 > .toolbarbutton-text {
|
||||
margin: 4px;
|
||||
}
|
||||
|
||||
#nav-bar .toolbarbutton-1 {
|
||||
#navigation-toolbar .toolbarbutton-1 {
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
@ -935,7 +935,7 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#nav-bar {
|
||||
#navigation-toolbar {
|
||||
background-color: #969696;
|
||||
border-bottom: 1px solid #404040;
|
||||
background-image: url("chrome://global/skin/toolbar/toolbar-background.gif");
|
||||
@ -944,7 +944,7 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
#nav-bar[mode="full"] {
|
||||
#navigation-toolbar[mode="full"] {
|
||||
background-image: url("chrome://global/skin/toolbar/toolbar-background-tall.gif");
|
||||
}
|
||||
|
||||
|
||||
@ -54,7 +54,7 @@
|
||||
-moz-box-flex: 1; /* make menu items expand to fill toolbar height */
|
||||
}
|
||||
|
||||
#PersonalToolbar {
|
||||
#personal-toolbar {
|
||||
min-height: 26px;
|
||||
}
|
||||
|
||||
@ -78,7 +78,7 @@
|
||||
}
|
||||
|
||||
#navigator-toolbox[inFullscreen="true"],
|
||||
#navigator-toolbox[inFullscreen="true"] > #nav-bar {
|
||||
#navigator-toolbox[inFullscreen="true"] > #navigation-toolbar {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
@ -758,16 +758,23 @@ toolbar[iconsize="small"] #reload-button:not([disabled="true"]):hover:active {
|
||||
toolbar[iconsize="small"] #home-button .toolbarbutton-icon {
|
||||
padding-left: 1px;
|
||||
}
|
||||
toolbar[iconsize="small"] #home-button {
|
||||
#personal-toolbar > #home-button {
|
||||
list-style-image: url("chrome://browser/skin/Toolbar-small.png");
|
||||
}
|
||||
toolbar[iconsize="small"] #home-button ,
|
||||
#personal-toolbar > #home-button {
|
||||
-moz-image-region: rect(0px 80px 16px 64px);
|
||||
}
|
||||
toolbar[iconsize="small"] #home-button:not([disabled="true"]):hover {
|
||||
toolbar[iconsize="small"] #home-button:not([disabled="true"]):hover ,
|
||||
#personal-toolbar > #home-button:not([disabled="true"]):hover {
|
||||
-moz-image-region: rect(16px 80px 32px 64px);
|
||||
}
|
||||
toolbar[iconsize="small"] #home-button[disabled="true"] {
|
||||
toolbar[iconsize="small"] #home-button[disabled="true"] ,
|
||||
#personal-toolbar > #home-button[disabled="true"] {
|
||||
-moz-image-region: rect(32px 80px 48px 64px);
|
||||
}
|
||||
toolbar[iconsize="small"] #home-button:not([disabled="true"]):hover:active {
|
||||
toolbar[iconsize="small"] #home-button:not([disabled="true"]):hover:active ,
|
||||
#personal-toolbar > #home-button:not([disabled="true"]):hover:active {
|
||||
-moz-image-region: rect(64px 80px 80px 64px);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user