mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 13:10:59 +00:00
Clean up NSPasteboardItem files.
This commit is contained in:
parent
257017c65f
commit
b713d0c023
3 changed files with 23 additions and 11 deletions
17
ChangeLog
17
ChangeLog
|
@ -1,8 +1,13 @@
|
|||
2017-07-31 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Headers/AppKit/NSPasteboardItem.h
|
||||
* Source/NSPasteboardItem.m: Clean up these files.
|
||||
|
||||
2017-07-31 Ivan Vucica <ivan@vucica.net>
|
||||
|
||||
* Source/NSTextList.m: Add _startingItemNumber-related TODOs to
|
||||
NSTextList.
|
||||
* Source/NSPasteboardItem: Remove RETAIN() when returning
|
||||
* Source/NSPasteboardItem.m: Remove RETAIN() when returning
|
||||
-[NSPasteboardItem types].
|
||||
|
||||
2017-07-28 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
@ -24,7 +29,7 @@
|
|||
2017-07-26 Daniel Ferreira <dtf@stanford.edu>
|
||||
|
||||
* Headers/AppKit/NSTextList.h
|
||||
* Source/NSTextList.m:
|
||||
* Source/NSTextList.m:
|
||||
Add the `startingItemNumber` property to NSTextList introduced in macOS
|
||||
10.6.
|
||||
|
||||
|
@ -33,13 +38,13 @@
|
|||
* Headers/AppKit/AppKit.h
|
||||
* Headers/AppKit/NSPasteboardItem.h
|
||||
* Source/GNUmakefile
|
||||
* Source/NSPasteboardItem.m:
|
||||
* Source/NSPasteboardItem.m:
|
||||
Implement the NSPasteboardItem class. For now, it remains relatively
|
||||
useless since NSPasteboard does not yet know how to use it. However, it
|
||||
should be pluggable into NSPasteboard once NSPasteboard learns about
|
||||
NSPasteboardReading and NSPasteboardWriting.
|
||||
|
||||
* Headers/AppKit/NSPasteboard.h:
|
||||
* Headers/AppKit/NSPasteboard.h:
|
||||
Define the NSPasteboardReading and NSPasteboardWriting protocols
|
||||
introduced in OSX 10.6, which remain unimplemented in NSPasteboard.
|
||||
|
||||
|
@ -48,14 +53,14 @@
|
|||
* Headers/AppKit/AppKit.h
|
||||
* Headers/AppKit/NSTextAlternatives.h
|
||||
* Source/GNUmakefile
|
||||
* Source/NSTextAlternatives.m:
|
||||
* Source/NSTextAlternatives.m:
|
||||
Implement NSTextAlternatives, a class usually used for choosing
|
||||
alternatives from a basic string usually for dictation purposes.
|
||||
|
||||
2017-07-26 Daniel Ferreira <dtf@stanford.edu>
|
||||
|
||||
* Headers/AppKit/NSScroller.h
|
||||
* Source/NSScroller.m:
|
||||
* Source/NSScroller.m:
|
||||
As of macOS 10.7, scrollers gained two types: Legacy and Overlay. Here,
|
||||
we define these styles as well as a method to determine which is the
|
||||
"default" style to be used.
|
||||
|
|
|
@ -27,15 +27,20 @@
|
|||
|
||||
#ifndef _GNUstep_H_NSPasteboardItem
|
||||
#define _GNUstep_H_NSPasteboardItem
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
#import <AppKit/AppKitDefines.h>
|
||||
#import <AppKit/NSPasteboard.h>
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <CoreFoundation/CFBase.h>
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
|
||||
|
||||
@class NSArray;
|
||||
@class NSData;
|
||||
@class NSMutableArray;
|
||||
@class NSMutableDictionary;
|
||||
@class NSString;
|
||||
|
||||
@protocol NSPasteboardItemDataProvider;
|
||||
|
||||
@interface NSPasteboardItem : NSObject <NSPasteboardWriting, NSPasteboardReading> {
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
* NSPasteboardReading + NSPasteboardWriting.
|
||||
*/
|
||||
|
||||
#import <AppKit/NSPasteboardItem.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <AppKit/NSPasteboardItem.h>
|
||||
|
||||
@implementation NSPasteboardItem
|
||||
- (id)init
|
||||
|
@ -54,6 +54,8 @@
|
|||
- (BOOL)setDataProvider:(id<NSPasteboardItemDataProvider>)dataProvider
|
||||
forTypes:(NSArray *)types
|
||||
{
|
||||
NSUInteger i;
|
||||
|
||||
if (![dataProvider conformsToProtocol: @protocol(NSPasteboardItemDataProvider)])
|
||||
{
|
||||
NSLog(@"Pasteboard item data provider %@ must conform to"
|
||||
|
@ -61,7 +63,7 @@
|
|||
return NO;
|
||||
}
|
||||
|
||||
for (NSUInteger i = 0; i < [types count]; i++)
|
||||
for (i = 0; i < [types count]; i++)
|
||||
{
|
||||
NSString *type = [types objectAtIndex: i];
|
||||
[_providerMap setObject: dataProvider forKey: type];
|
||||
|
|
Loading…
Reference in a new issue