зеркало из https://github.com/mozilla/pjs.git
Let's try this NIB thing again...
This commit is contained in:
Родитель
4c29be0c94
Коммит
256eefa9ff
|
@ -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;
|
||||
}
|
|
@ -3,17 +3,17 @@
|
|||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>7 130 480 309 0 0 1152 746 </string>
|
||||
<string>91 273 480 309 0 0 1280 1002 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>124</key>
|
||||
<string>431 537 170 180 0 0 1152 746 </string>
|
||||
<key>160</key>
|
||||
<string>478 70 195 666 0 0 1152 746 </string>
|
||||
<string>572 326 195 666 0 0 1280 1002 </string>
|
||||
<key>28</key>
|
||||
<string>478 279 195 457 0 0 1152 746 </string>
|
||||
<key>297</key>
|
||||
<string>70 110 198 210 0 0 1152 746 </string>
|
||||
<string>79 163 198 210 0 0 1280 1002 </string>
|
||||
<key>314</key>
|
||||
<string>271 139 198 180 0 0 1152 746 </string>
|
||||
<key>336</key>
|
||||
|
@ -23,9 +23,9 @@
|
|||
<key>463</key>
|
||||
<string>7 444 200 252 0 0 1152 746 </string>
|
||||
<key>475</key>
|
||||
<string>516 447 120 142 0 0 1152 746 </string>
|
||||
<string>609 597 120 142 0 0 1280 1002 </string>
|
||||
<key>56</key>
|
||||
<string>404 484 343 68 0 0 1152 746 </string>
|
||||
<string>498 634 343 68 0 0 1280 1002 </string>
|
||||
</dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>248.0</string>
|
||||
|
@ -46,11 +46,11 @@
|
|||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>475</integer>
|
||||
<integer>56</integer>
|
||||
<integer>297</integer>
|
||||
<integer>160</integer>
|
||||
<integer>56</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5Q125</string>
|
||||
<string>5L21</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
Двоичный файл не отображается.
|
@ -148,16 +148,56 @@
|
|||
nsCOMPtr<nsIRDFResource> resource = !aItem ? mRootResource : [aItem resource];
|
||||
|
||||
nsCOMPtr<nsIRDFResource> ordinalResource;
|
||||
mContainerUtils->IndexToOrdinalResource(aIndex, getter_AddRefs(ordinalResource));
|
||||
mContainerUtils->IndexToOrdinalResource(aIndex + 1, getter_AddRefs(ordinalResource));
|
||||
|
||||
nsCOMPtr<nsIRDFNode> 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<nsIRDFResource> 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<nsIRDFResource> childProperty;
|
||||
mRDFService->GetResource("http://home.netscape.com/NC-rdf#child", getter_AddRefs(childProperty));
|
||||
|
||||
NSLog(@"1");
|
||||
nsCOMPtr<nsISimpleEnumerator> 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<nsISupports> supp;
|
||||
while (hasMore && count < aIndex) {
|
||||
childNodes->GetNext(getter_AddRefs(supp));
|
||||
|
||||
NSLog(@"4");
|
||||
++count;
|
||||
|
||||
childNodes->HasMoreElements(&hasMore);
|
||||
NSLog(@"5");
|
||||
}
|
||||
nsCOMPtr<nsIRDFResource> 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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
|
@ -3,17 +3,17 @@
|
|||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>7 130 480 309 0 0 1152 746 </string>
|
||||
<string>91 273 480 309 0 0 1280 1002 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>124</key>
|
||||
<string>431 537 170 180 0 0 1152 746 </string>
|
||||
<key>160</key>
|
||||
<string>478 70 195 666 0 0 1152 746 </string>
|
||||
<string>572 326 195 666 0 0 1280 1002 </string>
|
||||
<key>28</key>
|
||||
<string>478 279 195 457 0 0 1152 746 </string>
|
||||
<key>297</key>
|
||||
<string>70 110 198 210 0 0 1152 746 </string>
|
||||
<string>79 163 198 210 0 0 1280 1002 </string>
|
||||
<key>314</key>
|
||||
<string>271 139 198 180 0 0 1152 746 </string>
|
||||
<key>336</key>
|
||||
|
@ -23,9 +23,9 @@
|
|||
<key>463</key>
|
||||
<string>7 444 200 252 0 0 1152 746 </string>
|
||||
<key>475</key>
|
||||
<string>516 447 120 142 0 0 1152 746 </string>
|
||||
<string>609 597 120 142 0 0 1280 1002 </string>
|
||||
<key>56</key>
|
||||
<string>404 484 343 68 0 0 1152 746 </string>
|
||||
<string>498 634 343 68 0 0 1280 1002 </string>
|
||||
</dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>248.0</string>
|
||||
|
@ -46,11 +46,11 @@
|
|||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>475</integer>
|
||||
<integer>56</integer>
|
||||
<integer>297</integer>
|
||||
<integer>160</integer>
|
||||
<integer>56</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5Q125</string>
|
||||
<string>5L21</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
Двоичный файл не отображается.
|
@ -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;
|
||||
}
|
|
@ -3,17 +3,17 @@
|
|||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>7 130 480 309 0 0 1152 746 </string>
|
||||
<string>91 273 480 309 0 0 1280 1002 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>124</key>
|
||||
<string>431 537 170 180 0 0 1152 746 </string>
|
||||
<key>160</key>
|
||||
<string>478 70 195 666 0 0 1152 746 </string>
|
||||
<string>572 326 195 666 0 0 1280 1002 </string>
|
||||
<key>28</key>
|
||||
<string>478 279 195 457 0 0 1152 746 </string>
|
||||
<key>297</key>
|
||||
<string>70 110 198 210 0 0 1152 746 </string>
|
||||
<string>79 163 198 210 0 0 1280 1002 </string>
|
||||
<key>314</key>
|
||||
<string>271 139 198 180 0 0 1152 746 </string>
|
||||
<key>336</key>
|
||||
|
@ -23,9 +23,9 @@
|
|||
<key>463</key>
|
||||
<string>7 444 200 252 0 0 1152 746 </string>
|
||||
<key>475</key>
|
||||
<string>516 447 120 142 0 0 1152 746 </string>
|
||||
<string>609 597 120 142 0 0 1280 1002 </string>
|
||||
<key>56</key>
|
||||
<string>404 484 343 68 0 0 1152 746 </string>
|
||||
<string>498 634 343 68 0 0 1280 1002 </string>
|
||||
</dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>248.0</string>
|
||||
|
@ -46,11 +46,11 @@
|
|||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>475</integer>
|
||||
<integer>56</integer>
|
||||
<integer>297</integer>
|
||||
<integer>160</integer>
|
||||
<integer>56</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5Q125</string>
|
||||
<string>5L21</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
Двоичные данные
camino/resources/localized/English.lproj/BrowserWindow.nib/objects.nib
сгенерированный
Двоичные данные
camino/resources/localized/English.lproj/BrowserWindow.nib/objects.nib
сгенерированный
Двоичный файл не отображается.
|
@ -148,16 +148,56 @@
|
|||
nsCOMPtr<nsIRDFResource> resource = !aItem ? mRootResource : [aItem resource];
|
||||
|
||||
nsCOMPtr<nsIRDFResource> ordinalResource;
|
||||
mContainerUtils->IndexToOrdinalResource(aIndex, getter_AddRefs(ordinalResource));
|
||||
mContainerUtils->IndexToOrdinalResource(aIndex + 1, getter_AddRefs(ordinalResource));
|
||||
|
||||
nsCOMPtr<nsIRDFNode> 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<nsIRDFResource> 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<nsIRDFResource> childProperty;
|
||||
mRDFService->GetResource("http://home.netscape.com/NC-rdf#child", getter_AddRefs(childProperty));
|
||||
|
||||
NSLog(@"1");
|
||||
nsCOMPtr<nsISimpleEnumerator> 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<nsISupports> supp;
|
||||
while (hasMore && count < aIndex) {
|
||||
childNodes->GetNext(getter_AddRefs(supp));
|
||||
|
||||
NSLog(@"4");
|
||||
++count;
|
||||
|
||||
childNodes->HasMoreElements(&hasMore);
|
||||
NSLog(@"5");
|
||||
}
|
||||
nsCOMPtr<nsIRDFResource> 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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
|
@ -3,17 +3,17 @@
|
|||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>7 130 480 309 0 0 1152 746 </string>
|
||||
<string>91 273 480 309 0 0 1280 1002 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>124</key>
|
||||
<string>431 537 170 180 0 0 1152 746 </string>
|
||||
<key>160</key>
|
||||
<string>478 70 195 666 0 0 1152 746 </string>
|
||||
<string>572 326 195 666 0 0 1280 1002 </string>
|
||||
<key>28</key>
|
||||
<string>478 279 195 457 0 0 1152 746 </string>
|
||||
<key>297</key>
|
||||
<string>70 110 198 210 0 0 1152 746 </string>
|
||||
<string>79 163 198 210 0 0 1280 1002 </string>
|
||||
<key>314</key>
|
||||
<string>271 139 198 180 0 0 1152 746 </string>
|
||||
<key>336</key>
|
||||
|
@ -23,9 +23,9 @@
|
|||
<key>463</key>
|
||||
<string>7 444 200 252 0 0 1152 746 </string>
|
||||
<key>475</key>
|
||||
<string>516 447 120 142 0 0 1152 746 </string>
|
||||
<string>609 597 120 142 0 0 1280 1002 </string>
|
||||
<key>56</key>
|
||||
<string>404 484 343 68 0 0 1152 746 </string>
|
||||
<string>498 634 343 68 0 0 1280 1002 </string>
|
||||
</dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>248.0</string>
|
||||
|
@ -46,11 +46,11 @@
|
|||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>475</integer>
|
||||
<integer>56</integer>
|
||||
<integer>297</integer>
|
||||
<integer>160</integer>
|
||||
<integer>56</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5Q125</string>
|
||||
<string>5L21</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
Двоичный файл не отображается.
|
@ -148,16 +148,56 @@
|
|||
nsCOMPtr<nsIRDFResource> resource = !aItem ? mRootResource : [aItem resource];
|
||||
|
||||
nsCOMPtr<nsIRDFResource> ordinalResource;
|
||||
mContainerUtils->IndexToOrdinalResource(aIndex, getter_AddRefs(ordinalResource));
|
||||
mContainerUtils->IndexToOrdinalResource(aIndex + 1, getter_AddRefs(ordinalResource));
|
||||
|
||||
nsCOMPtr<nsIRDFNode> 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<nsIRDFResource> 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<nsIRDFResource> childProperty;
|
||||
mRDFService->GetResource("http://home.netscape.com/NC-rdf#child", getter_AddRefs(childProperty));
|
||||
|
||||
NSLog(@"1");
|
||||
nsCOMPtr<nsISimpleEnumerator> 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<nsISupports> supp;
|
||||
while (hasMore && count < aIndex) {
|
||||
childNodes->GetNext(getter_AddRefs(supp));
|
||||
|
||||
NSLog(@"4");
|
||||
++count;
|
||||
|
||||
childNodes->HasMoreElements(&hasMore);
|
||||
NSLog(@"5");
|
||||
}
|
||||
nsCOMPtr<nsIRDFResource> 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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
|
@ -3,17 +3,17 @@
|
|||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>7 130 480 309 0 0 1152 746 </string>
|
||||
<string>91 273 480 309 0 0 1280 1002 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>124</key>
|
||||
<string>431 537 170 180 0 0 1152 746 </string>
|
||||
<key>160</key>
|
||||
<string>478 70 195 666 0 0 1152 746 </string>
|
||||
<string>572 326 195 666 0 0 1280 1002 </string>
|
||||
<key>28</key>
|
||||
<string>478 279 195 457 0 0 1152 746 </string>
|
||||
<key>297</key>
|
||||
<string>70 110 198 210 0 0 1152 746 </string>
|
||||
<string>79 163 198 210 0 0 1280 1002 </string>
|
||||
<key>314</key>
|
||||
<string>271 139 198 180 0 0 1152 746 </string>
|
||||
<key>336</key>
|
||||
|
@ -23,9 +23,9 @@
|
|||
<key>463</key>
|
||||
<string>7 444 200 252 0 0 1152 746 </string>
|
||||
<key>475</key>
|
||||
<string>516 447 120 142 0 0 1152 746 </string>
|
||||
<string>609 597 120 142 0 0 1280 1002 </string>
|
||||
<key>56</key>
|
||||
<string>404 484 343 68 0 0 1152 746 </string>
|
||||
<string>498 634 343 68 0 0 1280 1002 </string>
|
||||
</dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>248.0</string>
|
||||
|
@ -46,11 +46,11 @@
|
|||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>475</integer>
|
||||
<integer>56</integer>
|
||||
<integer>297</integer>
|
||||
<integer>160</integer>
|
||||
<integer>56</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5Q125</string>
|
||||
<string>5L21</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
Двоичный файл не отображается.
|
@ -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;
|
||||
}
|
|
@ -3,17 +3,17 @@
|
|||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>7 130 480 309 0 0 1152 746 </string>
|
||||
<string>91 273 480 309 0 0 1280 1002 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>124</key>
|
||||
<string>431 537 170 180 0 0 1152 746 </string>
|
||||
<key>160</key>
|
||||
<string>478 70 195 666 0 0 1152 746 </string>
|
||||
<string>572 326 195 666 0 0 1280 1002 </string>
|
||||
<key>28</key>
|
||||
<string>478 279 195 457 0 0 1152 746 </string>
|
||||
<key>297</key>
|
||||
<string>70 110 198 210 0 0 1152 746 </string>
|
||||
<string>79 163 198 210 0 0 1280 1002 </string>
|
||||
<key>314</key>
|
||||
<string>271 139 198 180 0 0 1152 746 </string>
|
||||
<key>336</key>
|
||||
|
@ -23,9 +23,9 @@
|
|||
<key>463</key>
|
||||
<string>7 444 200 252 0 0 1152 746 </string>
|
||||
<key>475</key>
|
||||
<string>516 447 120 142 0 0 1152 746 </string>
|
||||
<string>609 597 120 142 0 0 1280 1002 </string>
|
||||
<key>56</key>
|
||||
<string>404 484 343 68 0 0 1152 746 </string>
|
||||
<string>498 634 343 68 0 0 1280 1002 </string>
|
||||
</dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>248.0</string>
|
||||
|
@ -46,11 +46,11 @@
|
|||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>475</integer>
|
||||
<integer>56</integer>
|
||||
<integer>297</integer>
|
||||
<integer>160</integer>
|
||||
<integer>56</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5Q125</string>
|
||||
<string>5L21</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
Двоичные данные
chimera/resources/localized/English.lproj/BrowserWindow.nib/objects.nib
сгенерированный
Двоичные данные
chimera/resources/localized/English.lproj/BrowserWindow.nib/objects.nib
сгенерированный
Двоичный файл не отображается.
|
@ -148,16 +148,56 @@
|
|||
nsCOMPtr<nsIRDFResource> resource = !aItem ? mRootResource : [aItem resource];
|
||||
|
||||
nsCOMPtr<nsIRDFResource> ordinalResource;
|
||||
mContainerUtils->IndexToOrdinalResource(aIndex, getter_AddRefs(ordinalResource));
|
||||
mContainerUtils->IndexToOrdinalResource(aIndex + 1, getter_AddRefs(ordinalResource));
|
||||
|
||||
nsCOMPtr<nsIRDFNode> 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<nsIRDFResource> 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<nsIRDFResource> childProperty;
|
||||
mRDFService->GetResource("http://home.netscape.com/NC-rdf#child", getter_AddRefs(childProperty));
|
||||
|
||||
NSLog(@"1");
|
||||
nsCOMPtr<nsISimpleEnumerator> 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<nsISupports> supp;
|
||||
while (hasMore && count < aIndex) {
|
||||
childNodes->GetNext(getter_AddRefs(supp));
|
||||
|
||||
NSLog(@"4");
|
||||
++count;
|
||||
|
||||
childNodes->HasMoreElements(&hasMore);
|
||||
NSLog(@"5");
|
||||
}
|
||||
nsCOMPtr<nsIRDFResource> 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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче