Bug 877856 - Remove obsolete defaultset attributes from default toolbars, r=gijs

MozReview-Commit-ID: Ve8PWDg96

--HG--
extra : rebase_source : 47db228a26b9253b60327a8d833da3bacd9e8b64
This commit is contained in:
Akshat Kedia 2016-06-11 17:53:35 +05:30
Родитель 4cf0c2b256
Коммит c984b99b67
2 изменённых файлов: 10 добавлений и 9 удалений

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

@ -560,7 +560,6 @@
<toolbox id="navigator-toolbox" mode="icons">
<!-- Menu -->
<toolbar type="menubar" id="toolbar-menubar" class="chromeclass-menubar" customizable="true"
defaultset="menubar-items"
mode="icons" iconsize="small"
#ifdef MENUBAR_CAN_AUTOHIDE
toolbarname="&menubarCmd.label;"
@ -592,7 +591,6 @@
iconsize="small"
aria-label="&tabsToolbar.label;"
context="toolbar-context-menu"
defaultset="tabbrowser-tabs,new-tab-button,alltabs-button"
collapsed="true">
#if defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_QT)
@ -674,11 +672,6 @@
aria-label="&navbarCmd.label;"
fullscreentoolbar="true" mode="icons" customizable="true"
iconsize="small"
#ifdef MOZ_DEV_EDITION
defaultset="urlbar-container,search-container,developer-button,bookmarks-menu-button,downloads-button,home-button,loop-button"
#else
defaultset="urlbar-container,search-container,bookmarks-menu-button,downloads-button,home-button,loop-button"
#endif
customizationtarget="nav-bar-customization-target"
overflowable="true"
overflowbutton="nav-bar-overflow-button"
@ -979,7 +972,6 @@
mode="icons" iconsize="small"
class="chromeclass-directories"
context="toolbar-context-menu"
defaultset="personal-bookmarks"
toolbarname="&personalbarCmd.label;" accesskey="&personalbarCmd.accesskey;"
collapsed="true"
customizable="true">

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

@ -1927,7 +1927,7 @@ BrowserGlue.prototype = {
},
_migrateUI: function BG__migrateUI() {
const UI_VERSION = 38;
const UI_VERSION = 39;
const BROWSER_DOCURL = "chrome://browser/content/browser.xul";
let currentUIVersion;
@ -2296,6 +2296,15 @@ BrowserGlue.prototype = {
if (currentUIVersion < 38) {
LoginHelper.removeLegacySignonFiles();
}
if (currentUIVersion < 39) {
// Remove the 'defaultset' value for all the toolbars
let toolbars = ["nav-bar", "PersonalToolbar",
"addon-bar", "TabsToolbar", "toolbar-menubar"];
for (let toolbarId of toolbars) {
xulStore.removeValue(BROWSER_DOCURL, toolbarId, "defaultset");
}
}
// Update the migration version.
Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
},