mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 12:11:18 +00:00
Correct declaration of data source methods and the implementation
in NSOutlineView. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32746 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
eabc41114a
commit
02f8b9c21a
4 changed files with 43 additions and 7 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2011-03-30 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
|
* Headers/AppKit/NSTableView.h,
|
||||||
|
* Headers/AppKit/NSOutlineView.h,
|
||||||
|
* Source/NSOutlineView.m
|
||||||
|
(-namesOfPromisedFilesDroppedAtDestination:): Correct declaration
|
||||||
|
of data source methods and the implementation in NSOutlineView.
|
||||||
|
|
||||||
2011-03-29 Riccardo Mottola <rm@gnu.org>
|
2011-03-29 Riccardo Mottola <rm@gnu.org>
|
||||||
|
|
||||||
* Source/NSParagraphStyle.m
|
* Source/NSParagraphStyle.m
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
@class NSMapTable;
|
@class NSMapTable;
|
||||||
@class NSMutableArray;
|
@class NSMutableArray;
|
||||||
@class NSString;
|
@class NSString;
|
||||||
|
@class NSURL;
|
||||||
|
|
||||||
@interface NSOutlineView : NSTableView
|
@interface NSOutlineView : NSTableView
|
||||||
{
|
{
|
||||||
|
@ -161,6 +162,17 @@
|
||||||
- (BOOL) outlineView: (NSOutlineView *)outlineView
|
- (BOOL) outlineView: (NSOutlineView *)outlineView
|
||||||
writeItems: (NSArray*)items
|
writeItems: (NSArray*)items
|
||||||
toPasteboard: (NSPasteboard*)pboard;
|
toPasteboard: (NSPasteboard*)pboard;
|
||||||
|
|
||||||
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
||||||
|
- (void) outlineView: (NSOutlineView *)outlineView
|
||||||
|
sortDescriptorsDidChange: (NSArray *)oldSortDescriptors;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||||
|
- (NSArray *) outlineView: (NSOutlineView *)outlineView
|
||||||
|
namesOfPromisedFilesDroppedAtDestination: (NSURL *)dropDestination
|
||||||
|
forDraggedItems: (NSArray *)items;
|
||||||
|
#endif
|
||||||
@end
|
@end
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -271,8 +283,6 @@ willDisplayOutlineCell: (id)cell
|
||||||
- (BOOL) selectionShouldChangeInOutlineView: (NSOutlineView *)outlineView;
|
- (BOOL) selectionShouldChangeInOutlineView: (NSOutlineView *)outlineView;
|
||||||
|
|
||||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
||||||
- (void) outlineView: (NSOutlineView *)outlineView
|
|
||||||
sortDescriptorsDidChange: (NSArray *)oldSortDescriptors;
|
|
||||||
- (void) outlineView: (NSOutlineView *)outlineView
|
- (void) outlineView: (NSOutlineView *)outlineView
|
||||||
didClickTableColumn: (NSTableColumn *)aTableColumn;
|
didClickTableColumn: (NSTableColumn *)aTableColumn;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
@class NSTableHeaderView;
|
@class NSTableHeaderView;
|
||||||
@class NSText;
|
@class NSText;
|
||||||
@class NSImage;
|
@class NSImage;
|
||||||
|
@class NSURL;
|
||||||
|
|
||||||
typedef enum _NSTableViewDropOperation {
|
typedef enum _NSTableViewDropOperation {
|
||||||
NSTableViewDropOn,
|
NSTableViewDropOn,
|
||||||
|
@ -362,10 +363,19 @@ objectValueForTableColumn: (NSTableColumn *)aTableColumn
|
||||||
- (BOOL) tableView: (NSTableView*)tableView
|
- (BOOL) tableView: (NSTableView*)tableView
|
||||||
writeRows: (NSArray*)rows
|
writeRows: (NSArray*)rows
|
||||||
toPasteboard: (NSPasteboard*)pboard;
|
toPasteboard: (NSPasteboard*)pboard;
|
||||||
|
|
||||||
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
||||||
|
- (void) tableView: (NSTableView*)tableView
|
||||||
|
sortDescriptorsDidChange: (NSArray *)oldSortDescriptors;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||||
- (BOOL) tableView: (NSTableView*)tableView
|
- (BOOL) tableView: (NSTableView*)tableView
|
||||||
writeRowsWithIndexes: (NSIndexSet*)rows
|
writeRowsWithIndexes: (NSIndexSet*)rows
|
||||||
toPasteboard: (NSPasteboard*)pboard;
|
toPasteboard: (NSPasteboard*)pboard;
|
||||||
|
- (NSArray *) tableView: (NSTableView *)aTableView
|
||||||
|
namesOfPromisedFilesDroppedAtDestination: (NSURL *)dropDestination
|
||||||
|
forDraggedRowsWithIndexes: (NSIndexSet *)indexSet;
|
||||||
#endif
|
#endif
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@ -382,8 +392,6 @@ APPKIT_EXPORT NSString *NSTableViewSelectionIsChangingNotification;
|
||||||
|
|
||||||
- (BOOL) selectionShouldChangeInTableView: (NSTableView *)aTableView;
|
- (BOOL) selectionShouldChangeInTableView: (NSTableView *)aTableView;
|
||||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
||||||
- (void) tableView: (NSTableView*)tableView
|
|
||||||
sortDescriptorsDidChange: (NSArray *)oldSortDescriptors;
|
|
||||||
- (void) tableView: (NSTableView*)tableView
|
- (void) tableView: (NSTableView*)tableView
|
||||||
didClickTableColumn: (NSTableColumn *)tableColumn;
|
didClickTableColumn: (NSTableColumn *)tableColumn;
|
||||||
- (void) tableView: (NSTableView*)tableView
|
- (void) tableView: (NSTableView*)tableView
|
||||||
|
|
|
@ -1448,11 +1448,21 @@ Also returns the child index relative to this parent. */
|
||||||
- (NSArray*) namesOfPromisedFilesDroppedAtDestination: (NSURL *)dropDestination
|
- (NSArray*) namesOfPromisedFilesDroppedAtDestination: (NSURL *)dropDestination
|
||||||
{
|
{
|
||||||
if ([_dataSource respondsToSelector:
|
if ([_dataSource respondsToSelector:
|
||||||
@selector(outlineView:namesOfPromisedFilesDroppedAtDestination:forDraggedRowsWithIndexes:)])
|
@selector(outlineView:namesOfPromisedFilesDroppedAtDestination:forDraggedItems:)])
|
||||||
{
|
{
|
||||||
|
int count = [_selectedRows count];
|
||||||
|
NSMutableArray *itemArray = [NSMutableArray arrayWithCapacity: count];
|
||||||
|
unsigned int index = [_selectedRows firstIndex];
|
||||||
|
|
||||||
|
while (index != NSNotFound)
|
||||||
|
{
|
||||||
|
[itemArray addObject: [self itemAtRow: index]];
|
||||||
|
index = [_selectedRows indexGreaterThanIndex: index];
|
||||||
|
}
|
||||||
|
|
||||||
return [_dataSource outlineView: self
|
return [_dataSource outlineView: self
|
||||||
namesOfPromisedFilesDroppedAtDestination: dropDestination
|
namesOfPromisedFilesDroppedAtDestination: dropDestination
|
||||||
forDraggedRowsWithIndexes: _selectedRows];
|
forDraggedItems: itemArray];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue