From 9abba78f7becb71a4a4cc14d1be90ee08b59ef18 Mon Sep 17 00:00:00 2001 From: "rjc%netscape.com" Date: Mon, 4 Sep 2000 22:52:30 +0000 Subject: [PATCH] Fix bug # 50057: initial bookmarks menu problem with IE Favorites on Mac. r=me git-svn-id: svn://10.0.0.236/trunk@78111 18797224-902f-48f8-a5cc-f745e15eee43 --- .../bookmarks/src/nsBookmarksService.h | 26 ++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/mozilla/xpfe/components/bookmarks/src/nsBookmarksService.h b/mozilla/xpfe/components/bookmarks/src/nsBookmarksService.h index 84dac579a00..bc0bc7cae1f 100644 --- a/mozilla/xpfe/components/bookmarks/src/nsBookmarksService.h +++ b/mozilla/xpfe/components/bookmarks/src/nsBookmarksService.h @@ -205,14 +205,34 @@ public: nsIRDFResource* property, nsIRDFNode* target, PRBool tv, - PRBool* hasAssertion) { + PRBool* hasAssertion) + { +#ifdef XP_MAC + // on the Mac, IE favorites are stored in an HTML file. + // Defer importing this files contents until necessary. + + if ((source == kNC_IEFavoritesRoot) && (mIEFavoritesAvailable == PR_FALSE)) + { + ReadFavorites(); + } +#endif return mInner->HasAssertion(source, property, target, tv, hasAssertion); } NS_IMETHOD AddObserver(nsIRDFObserver* aObserver); NS_IMETHOD RemoveObserver(nsIRDFObserver* aObserver); - NS_IMETHOD HasArcIn(nsIRDFNode *aNode, nsIRDFResource *aArc, PRBool *_retval) { + NS_IMETHOD HasArcIn(nsIRDFNode *aNode, nsIRDFResource *aArc, PRBool *_retval) + { +#ifdef XP_MAC + // on the Mac, IE favorites are stored in an HTML file. + // Defer importing this files contents until necessary. + + if ((aNode == kNC_IEFavoritesRoot) && (mIEFavoritesAvailable == PR_FALSE)) + { + ReadFavorites(); + } +#endif return mInner->HasArcIn(aNode, aArc, _retval); } @@ -223,7 +243,7 @@ public: if ((aSource == kNC_IEFavoritesRoot) && (mIEFavoritesAvailable == PR_FALSE)) { - ReadFavorites(); + ReadFavorites(); } #endif return mInner->HasArcOut(aSource, aArc, _retval);