Bug 1243591 - Create a pref to enable/disable the Synced Tabs UI refresh and enable it for Nightly r=markh

This commit is contained in:
Zachary Carter 2016-01-28 00:52:56 -08:00
Родитель 06aef9d35c
Коммит 3f462c3a37
4 изменённых файлов: 18 добавлений и 1 удалений

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

@ -1309,6 +1309,12 @@ pref("services.sync.prefs.sync.signon.rememberSignons", true);
pref("services.sync.prefs.sync.spellchecker.dictionary", true); pref("services.sync.prefs.sync.spellchecker.dictionary", true);
pref("services.sync.prefs.sync.xpinstall.whitelist.required", true); pref("services.sync.prefs.sync.xpinstall.whitelist.required", true);
#ifdef NIGHTLY_BUILD
pref("services.sync.syncedTabsUIRefresh", true);
#else
pref("services.sync.syncedTabsUIRefresh", false);
#endif
// Developer edition preferences // Developer edition preferences
#ifdef MOZ_DEV_EDITION #ifdef MOZ_DEV_EDITION
sticky_pref("lightweightThemes.selectedThemeID", "firefox-devedition@mozilla.org"); sticky_pref("lightweightThemes.selectedThemeID", "firefox-devedition@mozilla.org");

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

@ -190,6 +190,7 @@
<broadcaster id="sync-reauth-state" hidden="true"/> <broadcaster id="sync-reauth-state" hidden="true"/>
<broadcaster id="viewTabsSidebar" autoCheck="false" sidebartitle="&syncedTabs.sidebar.label;" <broadcaster id="viewTabsSidebar" autoCheck="false" sidebartitle="&syncedTabs.sidebar.label;"
type="checkbox" group="sidebar" type="checkbox" group="sidebar"
hidden="true"
sidebarurl="chrome://browser/content/syncedtabs/sidebar.xhtml" sidebarurl="chrome://browser/content/syncedtabs/sidebar.xhtml"
oncommand="SidebarUI.toggle('viewTabsSidebar');"/> oncommand="SidebarUI.toggle('viewTabsSidebar');"/>
<broadcaster id="workOfflineMenuitemState"/> <broadcaster id="workOfflineMenuitemState"/>

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

@ -81,6 +81,12 @@ var gSyncUI = {
let broadcaster = document.getElementById("sync-status"); let broadcaster = document.getElementById("sync-status");
broadcaster.setAttribute("label", this._stringBundle.GetStringFromName("syncnow.label")); broadcaster.setAttribute("label", this._stringBundle.GetStringFromName("syncnow.label"));
// Initialize the Synced Tabs Sidebar
if (Services.prefs.getBoolPref("services.sync.syncedTabsUIRefresh")) {
let sidebarBroadcaster = document.getElementById("viewTabsSidebar");
sidebarBroadcaster.removeAttribute("hidden");
}
this.updateUI(); this.updateUI();
}, },

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

@ -6498,7 +6498,11 @@ function isTabEmpty(aTab) {
} }
function BrowserOpenSyncTabs() { function BrowserOpenSyncTabs() {
gSyncUI.openSyncedTabsPanel(); if (Services.prefs.getBoolPref("services.sync.syncedTabsUIRefresh")) {
gSyncUI.openSyncedTabsPanel();
} else {
switchToTabHavingURI("about:sync-tabs", true);
}
} }
/** /**