зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
94a32617e9
Коммит
2850153499
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче