From c3d26e13d4f2772a5244e36fd78a042ac074001f Mon Sep 17 00:00:00 2001 From: "pchen%netscape.com" Date: Thu, 14 Sep 2006 06:00:53 +0000 Subject: [PATCH] bug 14824, r=rjc, sr=blake, add timeout at end of Startup() which will call nsBookmarksService::ReadBookmarks() --- suite/browser/navigator.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/suite/browser/navigator.js b/suite/browser/navigator.js index 73e7434c544b..21630f8d62a0 100644 --- a/suite/browser/navigator.js +++ b/suite/browser/navigator.js @@ -392,6 +392,21 @@ function Startup() remoteService.addBrowserInstance(window); } } + // now load bookmarks after a delay + setTimeout(LoadBookmarksCallback, 100); +} + +function LoadBookmarksCallback() +{ + try { + var bmservice = Components.classes["@mozilla.org/browser/bookmarks-service;1"] + .getService(Components.interfaces.nsIBookmarksService); + bmservice.ReadBookmarks(); + // tickle personal toolbar to load personal toolbar items + var personalToolbar = document.getElementById("innermostBox"); + personalToolbar.builder.rebuild(); + } catch (e) { + } } function WindowFocusTimerCallback(element)