mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +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
773f93f42f
commit
91c7ca64c0
4 changed files with 43 additions and 7 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,9 +1,17 @@
|
|||
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>
|
||||
|
||||
* Source/NSParagraphStyle.m
|
||||
* Source/NSMatrix.m
|
||||
Added missing import.
|
||||
|
||||
|
||||
2011-03-29 German Arias <german@xelalug.org>
|
||||
|
||||
* Source/NSApplication.m (-hide:): Minimize all windows if
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
@class NSMapTable;
|
||||
@class NSMutableArray;
|
||||
@class NSString;
|
||||
@class NSURL;
|
||||
|
||||
@interface NSOutlineView : NSTableView
|
||||
{
|
||||
|
@ -161,6 +162,17 @@
|
|||
- (BOOL) outlineView: (NSOutlineView *)outlineView
|
||||
writeItems: (NSArray*)items
|
||||
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
|
||||
|
||||
/*
|
||||
|
@ -271,8 +283,6 @@ willDisplayOutlineCell: (id)cell
|
|||
- (BOOL) selectionShouldChangeInOutlineView: (NSOutlineView *)outlineView;
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
||||
- (void) outlineView: (NSOutlineView *)outlineView
|
||||
sortDescriptorsDidChange: (NSArray *)oldSortDescriptors;
|
||||
- (void) outlineView: (NSOutlineView *)outlineView
|
||||
didClickTableColumn: (NSTableColumn *)aTableColumn;
|
||||
#endif
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
@class NSTableHeaderView;
|
||||
@class NSText;
|
||||
@class NSImage;
|
||||
@class NSURL;
|
||||
|
||||
typedef enum _NSTableViewDropOperation {
|
||||
NSTableViewDropOn,
|
||||
|
@ -362,10 +363,19 @@ objectValueForTableColumn: (NSTableColumn *)aTableColumn
|
|||
- (BOOL) tableView: (NSTableView*)tableView
|
||||
writeRows: (NSArray*)rows
|
||||
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)
|
||||
- (BOOL) tableView: (NSTableView*)tableView
|
||||
writeRowsWithIndexes: (NSIndexSet*)rows
|
||||
toPasteboard: (NSPasteboard*)pboard;
|
||||
- (NSArray *) tableView: (NSTableView *)aTableView
|
||||
namesOfPromisedFilesDroppedAtDestination: (NSURL *)dropDestination
|
||||
forDraggedRowsWithIndexes: (NSIndexSet *)indexSet;
|
||||
#endif
|
||||
@end
|
||||
|
||||
|
@ -382,8 +392,6 @@ APPKIT_EXPORT NSString *NSTableViewSelectionIsChangingNotification;
|
|||
|
||||
- (BOOL) selectionShouldChangeInTableView: (NSTableView *)aTableView;
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
||||
- (void) tableView: (NSTableView*)tableView
|
||||
sortDescriptorsDidChange: (NSArray *)oldSortDescriptors;
|
||||
- (void) tableView: (NSTableView*)tableView
|
||||
didClickTableColumn: (NSTableColumn *)tableColumn;
|
||||
- (void) tableView: (NSTableView*)tableView
|
||||
|
|
|
@ -1448,11 +1448,21 @@ Also returns the child index relative to this parent. */
|
|||
- (NSArray*) namesOfPromisedFilesDroppedAtDestination: (NSURL *)dropDestination
|
||||
{
|
||||
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
|
||||
namesOfPromisedFilesDroppedAtDestination: dropDestination
|
||||
forDraggedRowsWithIndexes: _selectedRows];
|
||||
forDraggedItems: itemArray];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue