mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
Fix bug 293147: when copying a bookmarks folder, don't propagate the dock menu flag. Patch by englabenny@macnytt.com.
This commit is contained in:
parent
f50615aecb
commit
8fa9b149b7
@ -92,20 +92,24 @@ NSString* const BookmarkFolderDockMenuChangeNotificaton = @"bf_dmc";
|
||||
{
|
||||
if ([self isSmartFolder])
|
||||
return nil;
|
||||
id doppleganger = [super copyWithZone:zone];
|
||||
[doppleganger setSpecialFlag:[self specialFlag]];
|
||||
|
||||
id folderCopy = [super copyWithZone:zone];
|
||||
unsigned folderFlags = ([self specialFlag] & ~kBookmarkDockMenuFolder); // don't copy dock menu flag
|
||||
[folderCopy setSpecialFlag:folderFlags];
|
||||
|
||||
NSEnumerator *enumerator = [[self childArray] objectEnumerator];
|
||||
id anItem, aCopiedItem;
|
||||
//head fake the undomanager
|
||||
// head fake the undomanager
|
||||
NSUndoManager *undoManager = [[BookmarkManager sharedBookmarkManager] undoManager];
|
||||
[undoManager disableUndoRegistration];
|
||||
while ((anItem = [enumerator nextObject])) {
|
||||
aCopiedItem = [anItem copyWithZone:[anItem zone]];
|
||||
[doppleganger insertChild:aCopiedItem];
|
||||
[folderCopy insertChild:aCopiedItem];
|
||||
[aCopiedItem release];
|
||||
}
|
||||
[undoManager enableUndoRegistration];
|
||||
return doppleganger;
|
||||
|
||||
return folderCopy;
|
||||
}
|
||||
|
||||
-(void)dealloc
|
||||
|
Loading…
Reference in New Issue
Block a user