summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaming4JC <g4jc@bulletmail.org>2018-12-16 17:44:01 -0500
committerGaming4JC <g4jc@bulletmail.org>2018-12-16 17:44:01 -0500
commit4191f4c82c52e6d30c29f879fcd374e86bba4bf5 (patch)
tree735929ccf889b3170eedef695b0c044ac6c4d111
parent9ea7809abe7866ada574e9a58181304cb4155bb7 (diff)
downloadiceweasel-uxp-4191f4c82c52e6d30c29f879fcd374e86bba4bf5.tar.gz
backport uxp: Make Basilisk front-end use Weave
-rw-r--r--base/content/browser-syncui.js35
-rwxr-xr-xbase/content/browser.js2
-rw-r--r--components/customizableui/CustomizableWidgets.jsm39
-rw-r--r--components/customizableui/content/panelUI.inc.xul2
-rw-r--r--locales/en-US/chrome/browser/browser.dtd2
-rw-r--r--locales/en-US/chrome/browser/syncBrand.dtd2
-rw-r--r--locales/en-US/chrome/browser/syncSetup.dtd2
7 files changed, 12 insertions, 72 deletions
diff --git a/base/content/browser-syncui.js b/base/content/browser-syncui.js
index 51bcb15..64290a2 100644
--- a/base/content/browser-syncui.js
+++ b/base/content/browser-syncui.js
@@ -293,17 +293,13 @@ var gSyncUI = {
*/
openSetup: function SUI_openSetup(wizardType, entryPoint = "syncbutton") {
- if (this.weaveService.fxAccountsEnabled) {
- this.openPrefs(entryPoint);
- } else {
- let win = Services.wm.getMostRecentWindow("Weave:AccountSetup");
- if (win)
- win.focus();
- else {
- window.openDialog("chrome://browser/content/sync/setup.xul",
- "weaveSetup", "centerscreen,chrome,resizable=no",
- wizardType);
- }
+ let win = Services.wm.getMostRecentWindow("Weave:AccountSetup");
+ if (win)
+ win.focus();
+ else {
+ window.openDialog("chrome://browser/content/sync/setup.xul",
+ "weaveSetup", "centerscreen,chrome,resizable=no",
+ wizardType);
}
},
@@ -328,23 +324,6 @@ var gSyncUI = {
gFxAccounts.openSignInAgainPage(entryPoint);
},
- openSyncedTabsPanel() {
- let placement = CustomizableUI.getPlacementOfWidget("sync-button");
- let area = placement ? placement.area : CustomizableUI.AREA_NAVBAR;
- let anchor = document.getElementById("sync-button") ||
- document.getElementById("PanelUI-menu-button");
- if (area == CustomizableUI.AREA_PANEL) {
- // The button is in the panel, so we need to show the panel UI, then our
- // subview.
- PanelUI.show().then(() => {
- PanelUI.showSubView("PanelUI-remotetabs", anchor, area);
- }).catch(Cu.reportError);
- } else {
- // It is placed somewhere else - just try and show it.
- PanelUI.showSubView("PanelUI-remotetabs", anchor, area);
- }
- },
-
/* After Sync is initialized we perform a once-only check for the sync
button being in "customize purgatory" and if so, move it to the panel.
This is done primarily for profiles created before SyncedTabs landed,
diff --git a/base/content/browser.js b/base/content/browser.js
index bfd1e56..169e866 100755
--- a/base/content/browser.js
+++ b/base/content/browser.js
@@ -6243,7 +6243,7 @@ function checkEmptyPageOrigin(browser = gBrowser.selectedBrowser,
}
function BrowserOpenSyncTabs() {
- gSyncUI.openSyncedTabsPanel();
+ switchToTabHavingURI("about:sync-tabs", true);
}
/**
diff --git a/components/customizableui/CustomizableWidgets.jsm b/components/customizableui/CustomizableWidgets.jsm
index abaed22..401b7ca 100644
--- a/components/customizableui/CustomizableWidgets.jsm
+++ b/components/customizableui/CustomizableWidgets.jsm
@@ -23,8 +23,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "CharsetMenu",
"resource://gre/modules/CharsetMenu.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",
"resource://gre/modules/PrivateBrowsingUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "SyncedTabs",
- "resource://services-sync/SyncedTabs.jsm");
XPCOMUtils.defineLazyGetter(this, "CharsetBundle", function() {
const kCharsetBundle = "chrome://global/locale/charsetMenu.properties";
@@ -311,43 +309,6 @@ const CustomizableWidgets = [
obnode.setAttribute("attribute", "syncstatus");
aNode.appendChild(obnode);
},
- onViewShowing(aEvent) {
- let doc = aEvent.target.ownerDocument;
- this._tabsList = doc.getElementById("PanelUI-remotetabs-tabslist");
- Services.obs.addObserver(this, SyncedTabs.TOPIC_TABS_CHANGED, false);
-
- if (SyncedTabs.isConfiguredToSyncTabs) {
- if (SyncedTabs.hasSyncedThisSession) {
- this.setDeckIndex(this.deckIndices.DECKINDEX_TABS);
- } else {
- // Sync hasn't synced tabs yet, so show the "fetching" panel.
- this.setDeckIndex(this.deckIndices.DECKINDEX_FETCHING);
- }
- // force a background sync.
- SyncedTabs.syncTabs().catch(ex => {
- Cu.reportError(ex);
- });
- // show the current list - it will be updated by our observer.
- this._showTabs();
- } else {
- // not configured to sync tabs, so no point updating the list.
- this.setDeckIndex(this.deckIndices.DECKINDEX_TABSDISABLED);
- }
- },
- onViewHiding() {
- Services.obs.removeObserver(this, SyncedTabs.TOPIC_TABS_CHANGED);
- this._tabsList = null;
- },
- _tabsList: null,
- observe(subject, topic, data) {
- switch (topic) {
- case SyncedTabs.TOPIC_TABS_CHANGED:
- this._showTabs();
- break;
- default:
- break;
- }
- },
setDeckIndex(index) {
let deck = this._tabsList.ownerDocument.getElementById("PanelUI-remotetabs-deck");
// We call setAttribute instead of relying on the XBL property setter due
diff --git a/components/customizableui/content/panelUI.inc.xul b/components/customizableui/content/panelUI.inc.xul
index 5934f5a..8ebd933 100644
--- a/components/customizableui/content/panelUI.inc.xul
+++ b/components/customizableui/content/panelUI.inc.xul
@@ -112,7 +112,7 @@
<vbox id="PanelUI-remotetabs-buttons">
<toolbarbutton id="PanelUI-remotetabs-view-sidebar"
class="subviewbutton"
- observes="viewTabsSidebar"
+ oncommand="BrowserOpenSyncTabs();"
label="&appMenuRemoteTabs.sidebar.label;"/>
<toolbarbutton id="PanelUI-remotetabs-syncnow"
observes="sync-status"
diff --git a/locales/en-US/chrome/browser/browser.dtd b/locales/en-US/chrome/browser/browser.dtd
index dacd136..26f7915 100644
--- a/locales/en-US/chrome/browser/browser.dtd
+++ b/locales/en-US/chrome/browser/browser.dtd
@@ -347,7 +347,7 @@ These should match what Safari and other Apple applications use on OS X Lion. --
<!ENTITY appMenuRemoteTabs.openprefs.label "Sync Preferences">
<!ENTITY appMenuRemoteTabs.notsignedin.label "Sign in to view a list of tabs from your other devices.">
<!ENTITY appMenuRemoteTabs.signin.label "Sign in to Sync">
-<!ENTITY appMenuRemoteTabs.sidebar.label "View Synced Tabs Sidebar">
+<!ENTITY appMenuRemoteTabs.sidebar.label "View Synced Tabs">
<!ENTITY customizeMenu.addToToolbar.label "Add to Toolbar">
<!ENTITY customizeMenu.addToToolbar.accesskey "A">
diff --git a/locales/en-US/chrome/browser/syncBrand.dtd b/locales/en-US/chrome/browser/syncBrand.dtd
index 0c9e920..a2cfc6f 100644
--- a/locales/en-US/chrome/browser/syncBrand.dtd
+++ b/locales/en-US/chrome/browser/syncBrand.dtd
@@ -3,5 +3,5 @@
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!ENTITY syncBrand.shortName.label "Sync">
-<!ENTITY syncBrand.fullName.label "Firefox Sync">
+<!ENTITY syncBrand.fullName.label "Iceweasel-UXP Sync">
<!ENTITY syncBrand.fxAccount.label "Firefox Account">
diff --git a/locales/en-US/chrome/browser/syncSetup.dtd b/locales/en-US/chrome/browser/syncSetup.dtd
index 950a835..2657156 100644
--- a/locales/en-US/chrome/browser/syncSetup.dtd
+++ b/locales/en-US/chrome/browser/syncSetup.dtd
@@ -16,7 +16,7 @@
<!-- New Account AND Existing Account -->
<!ENTITY server.label "Server">
-<!ENTITY serverType.default.label "Default: Mozilla &syncBrand.fullName.label; server">
+<!ENTITY serverType.default.label "Default: &syncBrand.fullName.label; server">
<!ENTITY serverType.custom2.label "Use a custom server…">
<!ENTITY signIn.account2.label "Account">
<!ENTITY signIn.account2.accesskey "A">