[X2Go-Commits] [pale-moon] 285/294: Issue #1049 - Show sync status via label of sync-button

git-admin at x2go.org git-admin at x2go.org
Sat Apr 27 08:58:34 CEST 2019


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch upstream/28.5.0
in repository pale-moon.

commit ccd86d8c0b234ebb3d95ec3eb0222a9e555c673c
Author: Matt A. Tobin <email at mattatobin.com>
Date:   Sun Apr 21 13:10:31 2019 -0400

    Issue #1049 - Show sync status via label of sync-button
---
 application/basilisk/base/content/browser-syncui.js | 15 ++++++++++++---
 application/palemoon/base/content/browser-syncui.js | 15 ++++++++++++---
 services/sync/locales/en-US/sync.properties         |  1 +
 3 files changed, 25 insertions(+), 6 deletions(-)

diff --git a/application/basilisk/base/content/browser-syncui.js b/application/basilisk/base/content/browser-syncui.js
index ee84391..f574726 100644
--- a/application/basilisk/base/content/browser-syncui.js
+++ b/application/basilisk/base/content/browser-syncui.js
@@ -93,17 +93,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"));
+    }
   },
 
 
@@ -117,6 +125,7 @@ var gSyncUI = {
       return;
 
     button.setAttribute("status", "active");
+    button.setAttribute("label", this._stringBundle.GetStringFromName("syncing2.label"));
   },
 
   onSyncDelay: function SUI_onSyncDelay() {
diff --git a/application/palemoon/base/content/browser-syncui.js b/application/palemoon/base/content/browser-syncui.js
index b9a3db2..86f6f48 100644
--- a/application/palemoon/base/content/browser-syncui.js
+++ b/application/palemoon/base/content/browser-syncui.js
@@ -93,17 +93,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"));
+    }
   },
 
 
@@ -117,6 +125,7 @@ var gSyncUI = {
       return;
 
     button.setAttribute("status", "active");
+    button.setAttribute("label", this._stringBundle.GetStringFromName("syncing2.label"));
   },
 
   onSyncDelay: function SUI_onSyncDelay() {
diff --git a/services/sync/locales/en-US/sync.properties b/services/sync/locales/en-US/sync.properties
index 93369dd..af40e12 100644
--- a/services/sync/locales/en-US/sync.properties
+++ b/services/sync/locales/en-US/sync.properties
@@ -52,3 +52,4 @@ sync.eol.learnMore.accesskey = L
 
 syncnow.label = Sync Now
 syncing2.label = Syncing…
+setupsync.label = Set Up Sync

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/pale-moon.git


More information about the x2go-commits mailing list