From 844d015a78dee970e541c1d9ed96c7cc45c016ba Mon Sep 17 00:00:00 2001 From: Philipp von Weitershausen Date: Thu, 17 Feb 2011 14:05:41 -0800 Subject: [PATCH] Bug 633681 - Sync doesn't init all-tabs dropdown menu for new windows. r+a=mconnor --- browser/base/content/browser-syncui.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/browser/base/content/browser-syncui.js b/browser/base/content/browser-syncui.js index 8838f104fbf9..9db9e6536c80 100644 --- a/browser/base/content/browser-syncui.js +++ b/browser/base/content/browser-syncui.js @@ -41,8 +41,13 @@ // gSyncUI handles updating the tools menu let gSyncUI = { init: function SUI_init() { - // this will be the first notification fired during init - // we can set up everything else later + // Proceed to set up the UI if Sync has already started up. + // Otherwise we'll do it when Sync is firing up. + if (Weave.Status.ready) { + this.initUI(); + return; + } + Services.obs.addObserver(this, "weave:service:ready", true); // Remove the observer if the window is closed before the observer @@ -52,6 +57,7 @@ let gSyncUI = { Services.obs.removeObserver(gSyncUI, "weave:service:ready"); }, false); }, + initUI: function SUI_initUI() { let obs = ["weave:service:sync:start", "weave:service:sync:finish",