зеркало из https://github.com/mozilla/pjs.git
Camino only - Fix bookmark warnings. Patch by smorgan <stuart.morgan@alumni.case.edu> r=josh sr=pink b=357773.
This commit is contained in:
Родитель
b85923ea7a
Коммит
eb269d7896
|
@ -260,7 +260,7 @@
|
|||
//
|
||||
- (void)showFolderPopup:(NSEvent*)event
|
||||
{
|
||||
BookmarkMenu* bmMenu = [[[BookmarkMenu alloc] initWithTitle:@"" bookmarkFolder:[self bookmarkItem]] autorelease];
|
||||
BookmarkMenu* bmMenu = [[[BookmarkMenu alloc] initWithTitle:@"" bookmarkFolder:(BookmarkFolder*)[self bookmarkItem]] autorelease];
|
||||
// dummy first item
|
||||
id dummyItem = [bmMenu addItemWithTitle:@"" action:NULL keyEquivalent:@""];
|
||||
[bmMenu setItemBeforeCustomItems:dummyItem];
|
||||
|
|
|
@ -1110,7 +1110,7 @@ static BookmarkManager* gBookmarkManager = nil;
|
|||
if ([NSWorkspace supportsSpotlight])
|
||||
[bmItem writeBookmarksMetadataToPath:mMetadataPath];
|
||||
|
||||
[self registerBookmarkForLoads:bmItem];
|
||||
[self registerBookmarkForLoads:(Bookmark*)bmItem];
|
||||
}
|
||||
|
||||
[self noteBookmarksChanged];
|
||||
|
@ -1138,7 +1138,7 @@ static BookmarkManager* gBookmarkManager = nil;
|
|||
if ([NSWorkspace supportsSpotlight])
|
||||
[bmItem removeBookmarksMetadataFromPath:mMetadataPath];
|
||||
|
||||
[self unregisterBookmarkForLoads:bmItem ignoringURL:YES];
|
||||
[self unregisterBookmarkForLoads:(Bookmark*)bmItem ignoringURL:YES];
|
||||
}
|
||||
|
||||
[self noteBookmarksChanged];
|
||||
|
|
|
@ -140,7 +140,7 @@ static void VerticalGrayGradient(void* inInfo, float const* inData, float* outDa
|
|||
// the title bar and toolbar will have a different (inactive) appearance, so
|
||||
// so the gradient won't be used.
|
||||
|
||||
BrowserWindow* browserWin = [self window];
|
||||
BrowserWindow* browserWin = (BrowserWindow*)[self window];
|
||||
if ([browserWin hasUnifiedToolbarAppearance] && [browserWin isMainWindow]) {
|
||||
float grays[2] = {235.0/255.0, 214.0/255.0};
|
||||
|
||||
|
@ -510,7 +510,7 @@ static void VerticalGrayGradient(void* inInfo, float const* inData, float* outDa
|
|||
{
|
||||
NSView* foundView = [self hitTest:testPoint];
|
||||
if (foundView && [foundView isMemberOfClass:[BookmarkButton class]]) {
|
||||
BookmarkButton* targetButton = foundView;
|
||||
BookmarkButton* targetButton = (BookmarkButton*)foundView;
|
||||
|
||||
// if over current position, leave mDragInsertButton unset but return success so nothing happens
|
||||
if (targetButton == sourceButton)
|
||||
|
@ -556,21 +556,21 @@ static void VerticalGrayGradient(void* inInfo, float const* inData, float* outDa
|
|||
|
||||
if ([types containsObject: kCaminoBookmarkListPBoardType]) {
|
||||
NSArray *draggedItems = [BookmarkManager bookmarkItemsFromSerializableArray:[draggingPasteboard propertyListForType: kCaminoBookmarkListPBoardType]];
|
||||
BookmarkItem* destItem = nil;
|
||||
BookmarkFolder* destFolder = nil;
|
||||
|
||||
if (mDragInsertionButton == nil) {
|
||||
return NO;
|
||||
}
|
||||
else if (mDragInsertionPosition == CHInsertInto) {
|
||||
// drop onto folder
|
||||
destItem = [mDragInsertionButton bookmarkItem];
|
||||
destFolder = (BookmarkFolder*)[mDragInsertionButton bookmarkItem];
|
||||
}
|
||||
else if (mDragInsertionPosition == CHInsertBefore ||
|
||||
mDragInsertionPosition == CHInsertAfter) { // drop onto toolbar
|
||||
destItem = toolbar;
|
||||
destFolder = toolbar;
|
||||
}
|
||||
|
||||
return [bmManager isDropValid:draggedItems toFolder:destItem];
|
||||
return [bmManager isDropValid:draggedItems toFolder:destFolder];
|
||||
}
|
||||
|
||||
return [draggingPasteboard containsURLData];
|
||||
|
@ -678,9 +678,9 @@ static void VerticalGrayGradient(void* inInfo, float const* inData, float* outDa
|
|||
id aKid;
|
||||
while ((aKid = [enumerator nextObject])) {
|
||||
if (isCopy)
|
||||
[[aKid parent] copyChild:aKid toBookmarkFolder:toolbar atIndex:index];
|
||||
[(BookmarkFolder*)[aKid parent] copyChild:aKid toBookmarkFolder:toolbar atIndex:index];
|
||||
else
|
||||
[[aKid parent] moveChild:aKid toBookmarkFolder:toolbar atIndex:index];
|
||||
[(BookmarkFolder*)[aKid parent] moveChild:aKid toBookmarkFolder:toolbar atIndex:index];
|
||||
}
|
||||
dropHandled = YES;
|
||||
}
|
||||
|
|
|
@ -130,14 +130,14 @@ const unsigned kNumTop10Items = 10; // well, 10, duh!
|
|||
while ((curItem = [bookmarksEnum nextObject]))
|
||||
{
|
||||
if ([curItem isKindOfClass:[Bookmark class]])
|
||||
[self checkForNewTop10:curItem];
|
||||
[self checkForNewTop10:(Bookmark *)curItem];
|
||||
}
|
||||
|
||||
bookmarksEnum = [[manager toolbarFolder] objectEnumerator];
|
||||
while ((curItem = [bookmarksEnum nextObject]))
|
||||
{
|
||||
if ([curItem isKindOfClass:[Bookmark class]])
|
||||
[self checkForNewTop10:curItem];
|
||||
[self checkForNewTop10:(Bookmark *)curItem];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -338,7 +338,7 @@ static int SortByProtocolAndName(NSDictionary* item1, NSDictionary* item2, void
|
|||
{
|
||||
BookmarkItem *anItem = [[note userInfo] objectForKey:BookmarkFolderChildKey];
|
||||
if (![anItem parent] && [anItem isKindOfClass:[Bookmark class]]) {
|
||||
[self removeBookmark:anItem fromSmartFolder:mTop10Folder];
|
||||
[self removeBookmark:(Bookmark *)anItem fromSmartFolder:mTop10Folder];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -349,7 +349,7 @@ static int SortByProtocolAndName(NSDictionary* item1, NSDictionary* item2, void
|
|||
{
|
||||
BookmarkItem *anItem = [note object];
|
||||
if ([anItem isKindOfClass:[Bookmark class]])
|
||||
[self checkForNewTop10:anItem];
|
||||
[self checkForNewTop10:(Bookmark *)anItem];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче