Bug 633681 - Clean up and remove no longer used code. r+a=mconnor

This commit is contained in:
Philipp von Weitershausen 2011-02-17 14:06:00 -08:00
Родитель 5eb34b19d2
Коммит 9e7ec7f20a
1 изменённых файлов: 6 добавлений и 13 удалений

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

@ -76,19 +76,16 @@ let gSyncUI = {
obs.push("weave:notification:added"); obs.push("weave:notification:added");
} }
let self = this;
obs.forEach(function(topic) { obs.forEach(function(topic) {
Services.obs.addObserver(self, topic, true); Services.obs.addObserver(this, topic, true);
}); }, this);
// Find the alltabs-popup, only if there is a gBrowser // Find the alltabs-popup, only if there is a gBrowser
if (gBrowser) { if (gBrowser) {
let popup = document.getElementById("alltabs-popup"); let popup = document.getElementById("alltabs-popup");
if (popup) { if (popup) {
let self = this; popup.addEventListener(
popup.addEventListener("popupshowing", function() { "popupshowing", this.alltabsPopupShowing.bind(this), true);
self.alltabsPopupShowing();
}, true);
} }
if (Weave.Notifications.notifications.length) if (Weave.Notifications.notifications.length)
@ -124,12 +121,6 @@ let gSyncUI = {
firstSync == "notReady"; firstSync == "notReady";
}, },
_isLoggedIn: function() {
if (this._needsSetup())
return false;
return Weave.Service.isLoggedIn;
},
updateUI: function SUI_updateUI() { updateUI: function SUI_updateUI() {
let needsSetup = this._needsSetup(); let needsSetup = this._needsSetup();
document.getElementById("sync-setup-state").hidden = !needsSetup; document.getElementById("sync-setup-state").hidden = !needsSetup;
@ -150,6 +141,8 @@ let gSyncUI = {
alltabsPopupShowing: function(event) { alltabsPopupShowing: function(event) {
// Should we show the menu item? // Should we show the menu item?
//XXXphilikon We should remove the check for isLoggedIn here and have
// about:sync-tabs auto-login (bug 583344)
if (!Weave.Service.isLoggedIn || !Weave.Engines.get("tabs").enabled) if (!Weave.Service.isLoggedIn || !Weave.Engines.get("tabs").enabled)
return; return;