Commits

Anonymous committed 6b5cab7

remove my comments, fix a couple comparisons for the primary window

Comments (0)

Files changed (3)

services/sync/modules/engines.js

       return engineObject.map(this.register, this);
 
     try {
-      /*
-        XXX PATCHED
-        Allow instances of an engine to be passed in.  This allows one class
-        to deal with multiple datasources, such as an instance per address
-        book in thunderbird. */
       let engine;
       if (engineObject instanceof Engine) {
         engine = engineObject;

ui/firefox/content/prefs.js

   },
 
   get prefArray() {
-    /*
-      XXX PATCHED
-      figure out which prefs we're dealing with by looking at the XUL.  This
-      allows apps to overly the firefox default prefs pane in order to customize
-      what sync works with. */
     let prefList = document.getElementById('weavePreferences');
     var prefArray = [];
     for (let i = 0; i < prefList.childNodes.length; ++i)

ui/firefox/content/sync.js

 }
 WeaveWindow.prototype = {
   isPrimaryWindow: function WeaveWindow_isPrimaryWindow() {
-    /* XXX PATCHED: abstract this check into an app level object, allowing
-      for a slightly different implementation for thunderbird */
     if (typeof(WeaveApp) != 'undefined')
       return WeaveApp.isPrimaryWindow();
     return window.location.href == getBrowserURL();
   updateUI: function updateUI() {
     document.getElementById("sync-menu").hidden = this._needsSetup();
     document.getElementById("sync-setup").hidden = !this._needsSetup();
-    if (window.location.href == getBrowserURL()) {
+    if (this.isPrimaryWindow()) {
       let showLabel = !this._isLoggedIn() && !this._needsSetup();
       let button = document.getElementById("sync-status-button");
       button.setAttribute("class", showLabel ? "statusbarpanel-iconic-text" 
   },
 
   onActivityStart: function WeaveWin_onActivityStart() {
-    if (window.location.href == getBrowserURL()) {
+    if (this.isPrimaryWindow()) {
       document.getElementById("sync-status-button").image = 
         "chrome://weave/skin/firefox/sync-throbber-16x16-active.apng";
     }
         break;
 
       default:
-      /* XXX PATCHED: provide a fallback for other applications */
         if (typeof(WeaveApp) != 'undefined')
           WeaveApp.openPrefs(pane);
         break;
     lastSyncItem.setAttribute("hidden", "false");
     document.getElementById("sync-lastsyncsep").hidden = false;
 
-    if (window.location.href == getBrowserURL())
+    if (this.isPrimaryWindow())
       document.getElementById("sync-status-button")
               .setAttribute("tooltiptext", lastSyncLabel);
   }