From 8a87ab9636e39300924ff1850da77dc35735715e Mon Sep 17 00:00:00 2001 From: "stuart.morgan%alumni.case.edu" Date: Mon, 20 Nov 2006 18:51:20 +0000 Subject: [PATCH] Camino only - Bug 359907: Bookmarks aren't deleted from bookmarks menu after deletion from bookmark manager. r=hwaara sr=pink --- camino/src/bookmarks/BookmarkMenu.mm | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/camino/src/bookmarks/BookmarkMenu.mm b/camino/src/bookmarks/BookmarkMenu.mm index 45b9d2855a73..d6ef4a2e69fe 100644 --- a/camino/src/bookmarks/BookmarkMenu.mm +++ b/camino/src/bookmarks/BookmarkMenu.mm @@ -301,6 +301,19 @@ const long kOpenInTabsTag = 0xBEEF; - (void)bookmarkChanged:(NSNotification *)inNotification { BookmarkItem* changedItem = [inNotification object]; + + NSNumber* noteChangeFlags = [[inNotification userInfo] objectForKey:BookmarkItemChangedFlagsKey]; + unsigned int changeFlags = kBookmarkItemEverythingChangedMask; + if (noteChangeFlags) + changeFlags = [noteChangeFlags unsignedIntValue]; + + // first, see if it's a notification that this folder's children have changed + if ((changedItem == mFolder) && (changeFlags & kBookmarkItemChildrenChangedMask)) { + mDirty = YES; + return; + } + + // any other change is only interesting if it's to one of this folder's children if ([changedItem parent] != mFolder) return; @@ -309,12 +322,6 @@ const long kOpenInTabsTag = 0xBEEF; if (itemIndex == -1) return; - unsigned int changeFlags = kBookmarkItemEverythingChangedMask; - NSNumber* noteChangeFlags = [[inNotification userInfo] objectForKey:BookmarkItemChangedFlagsKey]; - - if (noteChangeFlags) - changeFlags = [noteChangeFlags unsignedIntValue]; - // if it changed to or from a separator (or everything changed), just do a rebuild later if (changeFlags & kBookmarkItemStatusChangedMask) { mDirty = YES;