summaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-05-06 21:27:47 -0400
committerGaming4JC <g4jc@hyperbola.info>2019-05-06 21:27:47 -0400
commite502c09aa67bd005b7e6b6fa6e7e26e0681f6cf9 (patch)
treefcd3bb2bf4d1322e62018575ffaf8290855ebff0 /base
parent64e2a0cd86ae1df8c4e8b18c49d35bbed3c32be8 (diff)
downloadiceweasel-uxp-e502c09aa67bd005b7e6b6fa6e7e26e0681f6cf9.tar.gz
Tidy and refactor Sync after Backporting
Diffstat (limited to 'base')
-rw-r--r--base/content/browser-context.inc1
-rw-r--r--base/content/browser-syncui.js16
-rw-r--r--base/content/browser.xul27
3 files changed, 27 insertions, 17 deletions
diff --git a/base/content/browser-context.inc b/base/content/browser-context.inc
index c0e4ef8..92bc03c 100644
--- a/base/content/browser-context.inc
+++ b/base/content/browser-context.inc
@@ -34,6 +34,7 @@
oncommand="gContextMenu.bookmarkThisPage();"/>
</menugroup>
<menuseparator id="context-sep-navigation"/>
+ <menuseparator id="page-menu-separator"/>
<menuitem id="spell-no-suggestions"
disabled="true"
label="&spellNoSuggestions.label;"/>
diff --git a/base/content/browser-syncui.js b/base/content/browser-syncui.js
index 67056e2..af7f495 100644
--- a/base/content/browser-syncui.js
+++ b/base/content/browser-syncui.js
@@ -96,17 +96,25 @@ var gSyncUI = {
document.getElementById("sync-setup-state").hidden = !needsSetup;
document.getElementById("sync-syncnow-state").hidden = needsSetup;
- if (!gBrowser)
+ if (!gBrowser) {
return;
+ }
let button = document.getElementById("sync-button");
- if (!button)
+ if (!button) {
return;
+ }
button.removeAttribute("status");
+
this._updateLastSyncTime();
- if (needsSetup)
+
+ if (needsSetup) {
button.removeAttribute("tooltiptext");
+ button.setAttribute("label", this._stringBundle.GetStringFromName("setupsync.label"));
+ } else {
+ button.setAttribute("label", this._stringBundle.GetStringFromName("syncnow.label"));
+ }
},
@@ -120,6 +128,7 @@ var gSyncUI = {
return;
button.setAttribute("status", "active");
+ button.setAttribute("label", this._stringBundle.GetStringFromName("syncing2.label"));
},
onSyncDelay: function SUI_onSyncDelay() {
@@ -275,7 +284,6 @@ var gSyncUI = {
openPreferences("paneSync");
},
-
// Helpers
_updateLastSyncTime: function SUI__updateLastSyncTime() {
if (!gBrowser)
diff --git a/base/content/browser.xul b/base/content/browser.xul
index 6b0d6ea..d15a76a 100644
--- a/base/content/browser.xul
+++ b/base/content/browser.xul
@@ -291,10 +291,10 @@
oncommand="BrowserFullScreen();"/>
</menupopup>
- <menupopup id="contentAreaContextMenu"
+ <menupopup id="contentAreaContextMenu" pagemenu="#page-menu-separator"
onpopupshowing="if (event.target != this)
return true;
- gContextMenu = new nsContextMenu(this);
+ gContextMenu = new nsContextMenu(this, event.shiftKey);
if (gContextMenu.shouldDisplay)
updateEditUIVisibility();
return gContextMenu.shouldDisplay;"
@@ -768,17 +768,6 @@
cui-areatype="toolbar"
tooltip="dynamic-shortcut-tooltip"/>
-#ifdef MOZ_SERVICES_SYNC
- <toolbarbutton id="sync-button"
- class="toolbarbutton-1 chromeclass-toolbar-additional"
- label="&syncToolbarButton.label;"
- oncommand="gSyncUI.handleToolbarButton();"/>>
- <toolbarbutton id="sync-tabs-button"
- class="toolbarbutton-1 chromeclass-toolbar-additional"
- label="&syncTabsToolbarButton.label;"
- oncommand="BrowserOpenSyncTabs();"/>
-#endif
-
<toolbarbutton id="home-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
removable="true"
label="&homeButton.label;"
@@ -917,6 +906,18 @@
type="checkbox"
label="&fullScreenCmd.label;"
tooltip="dynamic-shortcut-tooltip"/>
+
+#ifdef MOZ_SERVICES_SYNC
+ <toolbarbutton id="sync-button"
+ class="toolbarbutton-1 chromeclass-toolbar-additional"
+ label="&syncToolbarButton.label;"
+ oncommand="gSyncUI.handleToolbarButton();"/>
+
+ <toolbarbutton id="sync-tabs-button"
+ class="toolbarbutton-1 chromeclass-toolbar-additional"
+ label="&syncTabsToolbarButton.label;"
+ oncommand="BrowserOpenSyncTabs();"/>
+#endif
</toolbarpalette>
</toolbox>