diff --git a/camino/BrowserWindow.nib/classes.nib b/camino/BrowserWindow.nib/classes.nib index 669269f11fb0..1695d169840a 100644 --- a/camino/BrowserWindow.nib/classes.nib +++ b/camino/BrowserWindow.nib/classes.nib @@ -44,6 +44,7 @@ mAddBookmarkSheetWindow = id; mAddBookmarkTitleField = id; mCachedBMDS = id; + mHistoryDataSource = id; mImageLinkMenu = id; mImageMenu = id; mInputMenu = id; @@ -75,7 +76,18 @@ {CLASS = CHBookmarksToolbar; LANGUAGE = ObjC; SUPERCLASS = NSView; }, {CLASS = CHExtendedOutlineView; LANGUAGE = ObjC; SUPERCLASS = NSOutlineView; }, {CLASS = CHExtendedTabView; LANGUAGE = ObjC; SUPERCLASS = NSTabView; }, + { + CLASS = CHHistoryDataSource; + LANGUAGE = ObjC; + SUPERCLASS = CHRDFOutlineViewDataSource; + }, {CLASS = CHLocationBar; LANGUAGE = ObjC; SUPERCLASS = NSView; }, + { + CLASS = CHRDFOutlineViewDataSource; + LANGUAGE = ObjC; + OUTLETS = {mOutlineView = id; }; + SUPERCLASS = NSObject; + }, {CLASS = ExtendedOutlineView; LANGUAGE = ObjC; SUPERCLASS = NSOutlineView; }, {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, {CLASS = LocationBar; LANGUAGE = ObjC; SUPERCLASS = NSView; }, @@ -98,7 +110,8 @@ urlbar = id; }; SUPERCLASS = NSView; - } + }, + {CLASS = RDFOutlineViewItem; LANGUAGE = ObjC; SUPERCLASS = NSObject; } ); IBVersion = 1; } \ No newline at end of file diff --git a/camino/BrowserWindow.nib/info.nib b/camino/BrowserWindow.nib/info.nib index 8738aab0fe7c..3c5cfcad099d 100644 --- a/camino/BrowserWindow.nib/info.nib +++ b/camino/BrowserWindow.nib/info.nib @@ -3,17 +3,17 @@ IBDocumentLocation - 7 130 480 309 0 0 1152 746 + 91 273 480 309 0 0 1280 1002 IBEditorPositions 124 431 537 170 180 0 0 1152 746 160 - 478 70 195 666 0 0 1152 746 + 572 326 195 666 0 0 1280 1002 28 478 279 195 457 0 0 1152 746 297 - 70 110 198 210 0 0 1152 746 + 79 163 198 210 0 0 1280 1002 314 271 139 198 180 0 0 1152 746 336 @@ -23,9 +23,9 @@ 463 7 444 200 252 0 0 1152 746 475 - 516 447 120 142 0 0 1152 746 + 609 597 120 142 0 0 1280 1002 56 - 404 484 343 68 0 0 1152 746 + 498 634 343 68 0 0 1280 1002 IBFramework Version 248.0 @@ -46,11 +46,11 @@ IBOpenObjects 475 - 56 297 160 + 56 IBSystem Version - 5Q125 + 5L21 diff --git a/camino/BrowserWindow.nib/objects.nib b/camino/BrowserWindow.nib/objects.nib index abf53d203f79..953585d20c28 100644 Binary files a/camino/BrowserWindow.nib/objects.nib and b/camino/BrowserWindow.nib/objects.nib differ diff --git a/camino/CHRDFOutlineViewDataSource.mm b/camino/CHRDFOutlineViewDataSource.mm index 3a03e275e4f5..1091191cbc2f 100644 --- a/camino/CHRDFOutlineViewDataSource.mm +++ b/camino/CHRDFOutlineViewDataSource.mm @@ -148,16 +148,56 @@ nsCOMPtr resource = !aItem ? mRootResource : [aItem resource]; nsCOMPtr ordinalResource; - mContainerUtils->IndexToOrdinalResource(aIndex, getter_AddRefs(ordinalResource)); + mContainerUtils->IndexToOrdinalResource(aIndex + 1, getter_AddRefs(ordinalResource)); nsCOMPtr childNode; mDataSource->GetTarget(resource, ordinalResource, PR_TRUE, getter_AddRefs(childNode)); if (childNode) { + // Yay. A regular container. We don't need to count, we can go directly to + // our object. nsCOMPtr childResource(do_QueryInterface(childNode)); if (childResource) return [self MakeWrapperFor:childResource]; } - +#if 0 + else { + // Oh well, not a regular container. We need to count, dagnabbit. + nsCOMPtr childProperty; + mRDFService->GetResource("http://home.netscape.com/NC-rdf#child", getter_AddRefs(childProperty)); + + NSLog(@"1"); + nsCOMPtr childNodes; + mDataSource->GetTargets(resource, childProperty, PR_TRUE, getter_AddRefs(childNodes)); + + NSLog(@"2"); + PRBool hasMore = PR_FALSE; + childNodes->HasMoreElements(&hasMore); + + PRInt32 count = 0; + + NSLog(@"3"); + nsCOMPtr supp; + while (hasMore && count < aIndex) { + childNodes->GetNext(getter_AddRefs(supp)); + + NSLog(@"4"); + ++count; + + childNodes->HasMoreElements(&hasMore); + NSLog(@"5"); + } + nsCOMPtr childResource(do_QueryInterface(supp)); + NSLog(@"6"); + if (childResource) { + NSLog(@"6.5"); + RDFOutlineViewItem* thing = [self MakeWrapperFor:childResource]; + + NSLog(@"thing = %@", thing); + return thing; + } + } + NSLog(@"7"); +#endif return nil; } @@ -264,7 +304,7 @@ - (id) MakeWrapperFor: (nsIRDFResource*) aRDFResource { - RDFOutlineViewItem* item = [[RDFOutlineViewItem alloc] init]; + RDFOutlineViewItem* item = [[[RDFOutlineViewItem alloc] init] autorelease]; [item setResource: aRDFResource]; return item; } diff --git a/camino/English.lproj/BrowserWindow.nib/classes.nib b/camino/English.lproj/BrowserWindow.nib/classes.nib index 669269f11fb0..1695d169840a 100644 --- a/camino/English.lproj/BrowserWindow.nib/classes.nib +++ b/camino/English.lproj/BrowserWindow.nib/classes.nib @@ -44,6 +44,7 @@ mAddBookmarkSheetWindow = id; mAddBookmarkTitleField = id; mCachedBMDS = id; + mHistoryDataSource = id; mImageLinkMenu = id; mImageMenu = id; mInputMenu = id; @@ -75,7 +76,18 @@ {CLASS = CHBookmarksToolbar; LANGUAGE = ObjC; SUPERCLASS = NSView; }, {CLASS = CHExtendedOutlineView; LANGUAGE = ObjC; SUPERCLASS = NSOutlineView; }, {CLASS = CHExtendedTabView; LANGUAGE = ObjC; SUPERCLASS = NSTabView; }, + { + CLASS = CHHistoryDataSource; + LANGUAGE = ObjC; + SUPERCLASS = CHRDFOutlineViewDataSource; + }, {CLASS = CHLocationBar; LANGUAGE = ObjC; SUPERCLASS = NSView; }, + { + CLASS = CHRDFOutlineViewDataSource; + LANGUAGE = ObjC; + OUTLETS = {mOutlineView = id; }; + SUPERCLASS = NSObject; + }, {CLASS = ExtendedOutlineView; LANGUAGE = ObjC; SUPERCLASS = NSOutlineView; }, {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, {CLASS = LocationBar; LANGUAGE = ObjC; SUPERCLASS = NSView; }, @@ -98,7 +110,8 @@ urlbar = id; }; SUPERCLASS = NSView; - } + }, + {CLASS = RDFOutlineViewItem; LANGUAGE = ObjC; SUPERCLASS = NSObject; } ); IBVersion = 1; } \ No newline at end of file diff --git a/camino/English.lproj/BrowserWindow.nib/info.nib b/camino/English.lproj/BrowserWindow.nib/info.nib index 8738aab0fe7c..3c5cfcad099d 100644 --- a/camino/English.lproj/BrowserWindow.nib/info.nib +++ b/camino/English.lproj/BrowserWindow.nib/info.nib @@ -3,17 +3,17 @@ IBDocumentLocation - 7 130 480 309 0 0 1152 746 + 91 273 480 309 0 0 1280 1002 IBEditorPositions 124 431 537 170 180 0 0 1152 746 160 - 478 70 195 666 0 0 1152 746 + 572 326 195 666 0 0 1280 1002 28 478 279 195 457 0 0 1152 746 297 - 70 110 198 210 0 0 1152 746 + 79 163 198 210 0 0 1280 1002 314 271 139 198 180 0 0 1152 746 336 @@ -23,9 +23,9 @@ 463 7 444 200 252 0 0 1152 746 475 - 516 447 120 142 0 0 1152 746 + 609 597 120 142 0 0 1280 1002 56 - 404 484 343 68 0 0 1152 746 + 498 634 343 68 0 0 1280 1002 IBFramework Version 248.0 @@ -46,11 +46,11 @@ IBOpenObjects 475 - 56 297 160 + 56 IBSystem Version - 5Q125 + 5L21 diff --git a/camino/English.lproj/BrowserWindow.nib/objects.nib b/camino/English.lproj/BrowserWindow.nib/objects.nib index abf53d203f79..953585d20c28 100644 Binary files a/camino/English.lproj/BrowserWindow.nib/objects.nib and b/camino/English.lproj/BrowserWindow.nib/objects.nib differ diff --git a/camino/resources/localized/English.lproj/BrowserWindow.nib/classes.nib b/camino/resources/localized/English.lproj/BrowserWindow.nib/classes.nib index 669269f11fb0..1695d169840a 100644 --- a/camino/resources/localized/English.lproj/BrowserWindow.nib/classes.nib +++ b/camino/resources/localized/English.lproj/BrowserWindow.nib/classes.nib @@ -44,6 +44,7 @@ mAddBookmarkSheetWindow = id; mAddBookmarkTitleField = id; mCachedBMDS = id; + mHistoryDataSource = id; mImageLinkMenu = id; mImageMenu = id; mInputMenu = id; @@ -75,7 +76,18 @@ {CLASS = CHBookmarksToolbar; LANGUAGE = ObjC; SUPERCLASS = NSView; }, {CLASS = CHExtendedOutlineView; LANGUAGE = ObjC; SUPERCLASS = NSOutlineView; }, {CLASS = CHExtendedTabView; LANGUAGE = ObjC; SUPERCLASS = NSTabView; }, + { + CLASS = CHHistoryDataSource; + LANGUAGE = ObjC; + SUPERCLASS = CHRDFOutlineViewDataSource; + }, {CLASS = CHLocationBar; LANGUAGE = ObjC; SUPERCLASS = NSView; }, + { + CLASS = CHRDFOutlineViewDataSource; + LANGUAGE = ObjC; + OUTLETS = {mOutlineView = id; }; + SUPERCLASS = NSObject; + }, {CLASS = ExtendedOutlineView; LANGUAGE = ObjC; SUPERCLASS = NSOutlineView; }, {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, {CLASS = LocationBar; LANGUAGE = ObjC; SUPERCLASS = NSView; }, @@ -98,7 +110,8 @@ urlbar = id; }; SUPERCLASS = NSView; - } + }, + {CLASS = RDFOutlineViewItem; LANGUAGE = ObjC; SUPERCLASS = NSObject; } ); IBVersion = 1; } \ No newline at end of file diff --git a/camino/resources/localized/English.lproj/BrowserWindow.nib/info.nib b/camino/resources/localized/English.lproj/BrowserWindow.nib/info.nib index 8738aab0fe7c..3c5cfcad099d 100644 --- a/camino/resources/localized/English.lproj/BrowserWindow.nib/info.nib +++ b/camino/resources/localized/English.lproj/BrowserWindow.nib/info.nib @@ -3,17 +3,17 @@ IBDocumentLocation - 7 130 480 309 0 0 1152 746 + 91 273 480 309 0 0 1280 1002 IBEditorPositions 124 431 537 170 180 0 0 1152 746 160 - 478 70 195 666 0 0 1152 746 + 572 326 195 666 0 0 1280 1002 28 478 279 195 457 0 0 1152 746 297 - 70 110 198 210 0 0 1152 746 + 79 163 198 210 0 0 1280 1002 314 271 139 198 180 0 0 1152 746 336 @@ -23,9 +23,9 @@ 463 7 444 200 252 0 0 1152 746 475 - 516 447 120 142 0 0 1152 746 + 609 597 120 142 0 0 1280 1002 56 - 404 484 343 68 0 0 1152 746 + 498 634 343 68 0 0 1280 1002 IBFramework Version 248.0 @@ -46,11 +46,11 @@ IBOpenObjects 475 - 56 297 160 + 56 IBSystem Version - 5Q125 + 5L21 diff --git a/camino/resources/localized/English.lproj/BrowserWindow.nib/objects.nib b/camino/resources/localized/English.lproj/BrowserWindow.nib/objects.nib index abf53d203f79..953585d20c28 100644 Binary files a/camino/resources/localized/English.lproj/BrowserWindow.nib/objects.nib and b/camino/resources/localized/English.lproj/BrowserWindow.nib/objects.nib differ diff --git a/camino/src/extensions/RDFOutlineViewDataSource.mm b/camino/src/extensions/RDFOutlineViewDataSource.mm index 3a03e275e4f5..1091191cbc2f 100644 --- a/camino/src/extensions/RDFOutlineViewDataSource.mm +++ b/camino/src/extensions/RDFOutlineViewDataSource.mm @@ -148,16 +148,56 @@ nsCOMPtr resource = !aItem ? mRootResource : [aItem resource]; nsCOMPtr ordinalResource; - mContainerUtils->IndexToOrdinalResource(aIndex, getter_AddRefs(ordinalResource)); + mContainerUtils->IndexToOrdinalResource(aIndex + 1, getter_AddRefs(ordinalResource)); nsCOMPtr childNode; mDataSource->GetTarget(resource, ordinalResource, PR_TRUE, getter_AddRefs(childNode)); if (childNode) { + // Yay. A regular container. We don't need to count, we can go directly to + // our object. nsCOMPtr childResource(do_QueryInterface(childNode)); if (childResource) return [self MakeWrapperFor:childResource]; } - +#if 0 + else { + // Oh well, not a regular container. We need to count, dagnabbit. + nsCOMPtr childProperty; + mRDFService->GetResource("http://home.netscape.com/NC-rdf#child", getter_AddRefs(childProperty)); + + NSLog(@"1"); + nsCOMPtr childNodes; + mDataSource->GetTargets(resource, childProperty, PR_TRUE, getter_AddRefs(childNodes)); + + NSLog(@"2"); + PRBool hasMore = PR_FALSE; + childNodes->HasMoreElements(&hasMore); + + PRInt32 count = 0; + + NSLog(@"3"); + nsCOMPtr supp; + while (hasMore && count < aIndex) { + childNodes->GetNext(getter_AddRefs(supp)); + + NSLog(@"4"); + ++count; + + childNodes->HasMoreElements(&hasMore); + NSLog(@"5"); + } + nsCOMPtr childResource(do_QueryInterface(supp)); + NSLog(@"6"); + if (childResource) { + NSLog(@"6.5"); + RDFOutlineViewItem* thing = [self MakeWrapperFor:childResource]; + + NSLog(@"thing = %@", thing); + return thing; + } + } + NSLog(@"7"); +#endif return nil; } @@ -264,7 +304,7 @@ - (id) MakeWrapperFor: (nsIRDFResource*) aRDFResource { - RDFOutlineViewItem* item = [[RDFOutlineViewItem alloc] init]; + RDFOutlineViewItem* item = [[[RDFOutlineViewItem alloc] init] autorelease]; [item setResource: aRDFResource]; return item; } diff --git a/chimera/BrowserWindow.nib/classes.nib b/chimera/BrowserWindow.nib/classes.nib index 669269f11fb0..1695d169840a 100644 --- a/chimera/BrowserWindow.nib/classes.nib +++ b/chimera/BrowserWindow.nib/classes.nib @@ -44,6 +44,7 @@ mAddBookmarkSheetWindow = id; mAddBookmarkTitleField = id; mCachedBMDS = id; + mHistoryDataSource = id; mImageLinkMenu = id; mImageMenu = id; mInputMenu = id; @@ -75,7 +76,18 @@ {CLASS = CHBookmarksToolbar; LANGUAGE = ObjC; SUPERCLASS = NSView; }, {CLASS = CHExtendedOutlineView; LANGUAGE = ObjC; SUPERCLASS = NSOutlineView; }, {CLASS = CHExtendedTabView; LANGUAGE = ObjC; SUPERCLASS = NSTabView; }, + { + CLASS = CHHistoryDataSource; + LANGUAGE = ObjC; + SUPERCLASS = CHRDFOutlineViewDataSource; + }, {CLASS = CHLocationBar; LANGUAGE = ObjC; SUPERCLASS = NSView; }, + { + CLASS = CHRDFOutlineViewDataSource; + LANGUAGE = ObjC; + OUTLETS = {mOutlineView = id; }; + SUPERCLASS = NSObject; + }, {CLASS = ExtendedOutlineView; LANGUAGE = ObjC; SUPERCLASS = NSOutlineView; }, {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, {CLASS = LocationBar; LANGUAGE = ObjC; SUPERCLASS = NSView; }, @@ -98,7 +110,8 @@ urlbar = id; }; SUPERCLASS = NSView; - } + }, + {CLASS = RDFOutlineViewItem; LANGUAGE = ObjC; SUPERCLASS = NSObject; } ); IBVersion = 1; } \ No newline at end of file diff --git a/chimera/BrowserWindow.nib/info.nib b/chimera/BrowserWindow.nib/info.nib index 8738aab0fe7c..3c5cfcad099d 100644 --- a/chimera/BrowserWindow.nib/info.nib +++ b/chimera/BrowserWindow.nib/info.nib @@ -3,17 +3,17 @@ IBDocumentLocation - 7 130 480 309 0 0 1152 746 + 91 273 480 309 0 0 1280 1002 IBEditorPositions 124 431 537 170 180 0 0 1152 746 160 - 478 70 195 666 0 0 1152 746 + 572 326 195 666 0 0 1280 1002 28 478 279 195 457 0 0 1152 746 297 - 70 110 198 210 0 0 1152 746 + 79 163 198 210 0 0 1280 1002 314 271 139 198 180 0 0 1152 746 336 @@ -23,9 +23,9 @@ 463 7 444 200 252 0 0 1152 746 475 - 516 447 120 142 0 0 1152 746 + 609 597 120 142 0 0 1280 1002 56 - 404 484 343 68 0 0 1152 746 + 498 634 343 68 0 0 1280 1002 IBFramework Version 248.0 @@ -46,11 +46,11 @@ IBOpenObjects 475 - 56 297 160 + 56 IBSystem Version - 5Q125 + 5L21 diff --git a/chimera/BrowserWindow.nib/objects.nib b/chimera/BrowserWindow.nib/objects.nib index abf53d203f79..953585d20c28 100644 Binary files a/chimera/BrowserWindow.nib/objects.nib and b/chimera/BrowserWindow.nib/objects.nib differ diff --git a/chimera/CHRDFOutlineViewDataSource.mm b/chimera/CHRDFOutlineViewDataSource.mm index 3a03e275e4f5..1091191cbc2f 100644 --- a/chimera/CHRDFOutlineViewDataSource.mm +++ b/chimera/CHRDFOutlineViewDataSource.mm @@ -148,16 +148,56 @@ nsCOMPtr resource = !aItem ? mRootResource : [aItem resource]; nsCOMPtr ordinalResource; - mContainerUtils->IndexToOrdinalResource(aIndex, getter_AddRefs(ordinalResource)); + mContainerUtils->IndexToOrdinalResource(aIndex + 1, getter_AddRefs(ordinalResource)); nsCOMPtr childNode; mDataSource->GetTarget(resource, ordinalResource, PR_TRUE, getter_AddRefs(childNode)); if (childNode) { + // Yay. A regular container. We don't need to count, we can go directly to + // our object. nsCOMPtr childResource(do_QueryInterface(childNode)); if (childResource) return [self MakeWrapperFor:childResource]; } - +#if 0 + else { + // Oh well, not a regular container. We need to count, dagnabbit. + nsCOMPtr childProperty; + mRDFService->GetResource("http://home.netscape.com/NC-rdf#child", getter_AddRefs(childProperty)); + + NSLog(@"1"); + nsCOMPtr childNodes; + mDataSource->GetTargets(resource, childProperty, PR_TRUE, getter_AddRefs(childNodes)); + + NSLog(@"2"); + PRBool hasMore = PR_FALSE; + childNodes->HasMoreElements(&hasMore); + + PRInt32 count = 0; + + NSLog(@"3"); + nsCOMPtr supp; + while (hasMore && count < aIndex) { + childNodes->GetNext(getter_AddRefs(supp)); + + NSLog(@"4"); + ++count; + + childNodes->HasMoreElements(&hasMore); + NSLog(@"5"); + } + nsCOMPtr childResource(do_QueryInterface(supp)); + NSLog(@"6"); + if (childResource) { + NSLog(@"6.5"); + RDFOutlineViewItem* thing = [self MakeWrapperFor:childResource]; + + NSLog(@"thing = %@", thing); + return thing; + } + } + NSLog(@"7"); +#endif return nil; } @@ -264,7 +304,7 @@ - (id) MakeWrapperFor: (nsIRDFResource*) aRDFResource { - RDFOutlineViewItem* item = [[RDFOutlineViewItem alloc] init]; + RDFOutlineViewItem* item = [[[RDFOutlineViewItem alloc] init] autorelease]; [item setResource: aRDFResource]; return item; } diff --git a/chimera/English.lproj/BrowserWindow.nib/classes.nib b/chimera/English.lproj/BrowserWindow.nib/classes.nib index 669269f11fb0..1695d169840a 100644 --- a/chimera/English.lproj/BrowserWindow.nib/classes.nib +++ b/chimera/English.lproj/BrowserWindow.nib/classes.nib @@ -44,6 +44,7 @@ mAddBookmarkSheetWindow = id; mAddBookmarkTitleField = id; mCachedBMDS = id; + mHistoryDataSource = id; mImageLinkMenu = id; mImageMenu = id; mInputMenu = id; @@ -75,7 +76,18 @@ {CLASS = CHBookmarksToolbar; LANGUAGE = ObjC; SUPERCLASS = NSView; }, {CLASS = CHExtendedOutlineView; LANGUAGE = ObjC; SUPERCLASS = NSOutlineView; }, {CLASS = CHExtendedTabView; LANGUAGE = ObjC; SUPERCLASS = NSTabView; }, + { + CLASS = CHHistoryDataSource; + LANGUAGE = ObjC; + SUPERCLASS = CHRDFOutlineViewDataSource; + }, {CLASS = CHLocationBar; LANGUAGE = ObjC; SUPERCLASS = NSView; }, + { + CLASS = CHRDFOutlineViewDataSource; + LANGUAGE = ObjC; + OUTLETS = {mOutlineView = id; }; + SUPERCLASS = NSObject; + }, {CLASS = ExtendedOutlineView; LANGUAGE = ObjC; SUPERCLASS = NSOutlineView; }, {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, {CLASS = LocationBar; LANGUAGE = ObjC; SUPERCLASS = NSView; }, @@ -98,7 +110,8 @@ urlbar = id; }; SUPERCLASS = NSView; - } + }, + {CLASS = RDFOutlineViewItem; LANGUAGE = ObjC; SUPERCLASS = NSObject; } ); IBVersion = 1; } \ No newline at end of file diff --git a/chimera/English.lproj/BrowserWindow.nib/info.nib b/chimera/English.lproj/BrowserWindow.nib/info.nib index 8738aab0fe7c..3c5cfcad099d 100644 --- a/chimera/English.lproj/BrowserWindow.nib/info.nib +++ b/chimera/English.lproj/BrowserWindow.nib/info.nib @@ -3,17 +3,17 @@ IBDocumentLocation - 7 130 480 309 0 0 1152 746 + 91 273 480 309 0 0 1280 1002 IBEditorPositions 124 431 537 170 180 0 0 1152 746 160 - 478 70 195 666 0 0 1152 746 + 572 326 195 666 0 0 1280 1002 28 478 279 195 457 0 0 1152 746 297 - 70 110 198 210 0 0 1152 746 + 79 163 198 210 0 0 1280 1002 314 271 139 198 180 0 0 1152 746 336 @@ -23,9 +23,9 @@ 463 7 444 200 252 0 0 1152 746 475 - 516 447 120 142 0 0 1152 746 + 609 597 120 142 0 0 1280 1002 56 - 404 484 343 68 0 0 1152 746 + 498 634 343 68 0 0 1280 1002 IBFramework Version 248.0 @@ -46,11 +46,11 @@ IBOpenObjects 475 - 56 297 160 + 56 IBSystem Version - 5Q125 + 5L21 diff --git a/chimera/English.lproj/BrowserWindow.nib/objects.nib b/chimera/English.lproj/BrowserWindow.nib/objects.nib index abf53d203f79..953585d20c28 100644 Binary files a/chimera/English.lproj/BrowserWindow.nib/objects.nib and b/chimera/English.lproj/BrowserWindow.nib/objects.nib differ diff --git a/chimera/resources/localized/English.lproj/BrowserWindow.nib/classes.nib b/chimera/resources/localized/English.lproj/BrowserWindow.nib/classes.nib index 669269f11fb0..1695d169840a 100644 --- a/chimera/resources/localized/English.lproj/BrowserWindow.nib/classes.nib +++ b/chimera/resources/localized/English.lproj/BrowserWindow.nib/classes.nib @@ -44,6 +44,7 @@ mAddBookmarkSheetWindow = id; mAddBookmarkTitleField = id; mCachedBMDS = id; + mHistoryDataSource = id; mImageLinkMenu = id; mImageMenu = id; mInputMenu = id; @@ -75,7 +76,18 @@ {CLASS = CHBookmarksToolbar; LANGUAGE = ObjC; SUPERCLASS = NSView; }, {CLASS = CHExtendedOutlineView; LANGUAGE = ObjC; SUPERCLASS = NSOutlineView; }, {CLASS = CHExtendedTabView; LANGUAGE = ObjC; SUPERCLASS = NSTabView; }, + { + CLASS = CHHistoryDataSource; + LANGUAGE = ObjC; + SUPERCLASS = CHRDFOutlineViewDataSource; + }, {CLASS = CHLocationBar; LANGUAGE = ObjC; SUPERCLASS = NSView; }, + { + CLASS = CHRDFOutlineViewDataSource; + LANGUAGE = ObjC; + OUTLETS = {mOutlineView = id; }; + SUPERCLASS = NSObject; + }, {CLASS = ExtendedOutlineView; LANGUAGE = ObjC; SUPERCLASS = NSOutlineView; }, {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, {CLASS = LocationBar; LANGUAGE = ObjC; SUPERCLASS = NSView; }, @@ -98,7 +110,8 @@ urlbar = id; }; SUPERCLASS = NSView; - } + }, + {CLASS = RDFOutlineViewItem; LANGUAGE = ObjC; SUPERCLASS = NSObject; } ); IBVersion = 1; } \ No newline at end of file diff --git a/chimera/resources/localized/English.lproj/BrowserWindow.nib/info.nib b/chimera/resources/localized/English.lproj/BrowserWindow.nib/info.nib index 8738aab0fe7c..3c5cfcad099d 100644 --- a/chimera/resources/localized/English.lproj/BrowserWindow.nib/info.nib +++ b/chimera/resources/localized/English.lproj/BrowserWindow.nib/info.nib @@ -3,17 +3,17 @@ IBDocumentLocation - 7 130 480 309 0 0 1152 746 + 91 273 480 309 0 0 1280 1002 IBEditorPositions 124 431 537 170 180 0 0 1152 746 160 - 478 70 195 666 0 0 1152 746 + 572 326 195 666 0 0 1280 1002 28 478 279 195 457 0 0 1152 746 297 - 70 110 198 210 0 0 1152 746 + 79 163 198 210 0 0 1280 1002 314 271 139 198 180 0 0 1152 746 336 @@ -23,9 +23,9 @@ 463 7 444 200 252 0 0 1152 746 475 - 516 447 120 142 0 0 1152 746 + 609 597 120 142 0 0 1280 1002 56 - 404 484 343 68 0 0 1152 746 + 498 634 343 68 0 0 1280 1002 IBFramework Version 248.0 @@ -46,11 +46,11 @@ IBOpenObjects 475 - 56 297 160 + 56 IBSystem Version - 5Q125 + 5L21 diff --git a/chimera/resources/localized/English.lproj/BrowserWindow.nib/objects.nib b/chimera/resources/localized/English.lproj/BrowserWindow.nib/objects.nib index abf53d203f79..953585d20c28 100644 Binary files a/chimera/resources/localized/English.lproj/BrowserWindow.nib/objects.nib and b/chimera/resources/localized/English.lproj/BrowserWindow.nib/objects.nib differ diff --git a/chimera/src/extensions/RDFOutlineViewDataSource.mm b/chimera/src/extensions/RDFOutlineViewDataSource.mm index 3a03e275e4f5..1091191cbc2f 100644 --- a/chimera/src/extensions/RDFOutlineViewDataSource.mm +++ b/chimera/src/extensions/RDFOutlineViewDataSource.mm @@ -148,16 +148,56 @@ nsCOMPtr resource = !aItem ? mRootResource : [aItem resource]; nsCOMPtr ordinalResource; - mContainerUtils->IndexToOrdinalResource(aIndex, getter_AddRefs(ordinalResource)); + mContainerUtils->IndexToOrdinalResource(aIndex + 1, getter_AddRefs(ordinalResource)); nsCOMPtr childNode; mDataSource->GetTarget(resource, ordinalResource, PR_TRUE, getter_AddRefs(childNode)); if (childNode) { + // Yay. A regular container. We don't need to count, we can go directly to + // our object. nsCOMPtr childResource(do_QueryInterface(childNode)); if (childResource) return [self MakeWrapperFor:childResource]; } - +#if 0 + else { + // Oh well, not a regular container. We need to count, dagnabbit. + nsCOMPtr childProperty; + mRDFService->GetResource("http://home.netscape.com/NC-rdf#child", getter_AddRefs(childProperty)); + + NSLog(@"1"); + nsCOMPtr childNodes; + mDataSource->GetTargets(resource, childProperty, PR_TRUE, getter_AddRefs(childNodes)); + + NSLog(@"2"); + PRBool hasMore = PR_FALSE; + childNodes->HasMoreElements(&hasMore); + + PRInt32 count = 0; + + NSLog(@"3"); + nsCOMPtr supp; + while (hasMore && count < aIndex) { + childNodes->GetNext(getter_AddRefs(supp)); + + NSLog(@"4"); + ++count; + + childNodes->HasMoreElements(&hasMore); + NSLog(@"5"); + } + nsCOMPtr childResource(do_QueryInterface(supp)); + NSLog(@"6"); + if (childResource) { + NSLog(@"6.5"); + RDFOutlineViewItem* thing = [self MakeWrapperFor:childResource]; + + NSLog(@"thing = %@", thing); + return thing; + } + } + NSLog(@"7"); +#endif return nil; } @@ -264,7 +304,7 @@ - (id) MakeWrapperFor: (nsIRDFResource*) aRDFResource { - RDFOutlineViewItem* item = [[RDFOutlineViewItem alloc] init]; + RDFOutlineViewItem* item = [[[RDFOutlineViewItem alloc] init] autorelease]; [item setResource: aRDFResource]; return item; }