macosx: fix compilation warning
authorFelix Paul Kühne <fkuehne@videolan.org>
Mon, 13 Jun 2016 23:18:41 +0000 (01:18 +0200)
committerFelix Paul Kühne <fkuehne@videolan.org>
Mon, 13 Jun 2016 23:19:42 +0000 (01:19 +0200)
modules/gui/macosx/MainWindow.m
modules/gui/macosx/PXSourceList.h
modules/gui/macosx/PXSourceList.m

index 4b230ec..f6bfe54 100644 (file)
@@ -46,7 +46,7 @@
 #import "VLCVoutWindowController.h"
 
 
-@interface VLCMainWindow() <PXSourceListDataSource, PXSourceListDelegate, NSWindowDelegate, NSAnimationDelegate, NSSplitViewDelegate>
+@interface VLCMainWindow() <PXSourceListDataSource, PXSourceListDelegate, NSOutlineViewDataSource, NSOutlineViewDelegate, NSWindowDelegate, NSAnimationDelegate, NSSplitViewDelegate>
 {
     BOOL videoPlaybackEnabled;
     BOOL dropzoneActive;
index c73bf5e..1a4182e 100644 (file)
 
 @property (nonatomic) NSSize iconSize;
 
-@property (assign) id<PXSourceListDataSource> dataSource;
-@property (assign) id<PXSourceListDelegate> delegate;
+@property (assign) id<PXSourceListDataSource, NSOutlineViewDataSource> _Nullable dataSource;
+@property (assign) id<PXSourceListDelegate, NSOutlineViewDelegate> _Nullable delegate;
 
 - (NSUInteger)numberOfGroups; //Returns the number of groups in the Source List
-- (BOOL)isGroupItem:(id)item; //Returns whether `item` is a group
-- (BOOL)isGroupAlwaysExpanded:(id)group; //Returns whether `group` is displayed as always expanded
+- (BOOL)isGroupItem:(nonnull id)item; //Returns whether `item` is a group
+- (BOOL)isGroupAlwaysExpanded:(nonnull id)group; //Returns whether `group` is displayed as always expanded
 
-- (BOOL)itemHasBadge:(id)item; //Returns whether `item` has a badge
-- (NSInteger)badgeValueForItem:(id)item; //Returns the badge value for `item`
+- (BOOL)itemHasBadge:(nonnull id)item; //Returns whether `item` has a badge
+- (NSInteger)badgeValueForItem:(nonnull id)item; //Returns the badge value for `item`
 
 @end
-
index 18e62e5..08bc598 100644 (file)
@@ -58,9 +58,9 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe
 {
     if(self=[super initWithCoder:decoder])
     {
-        [self setDelegate:(id<PXSourceListDelegate>)[super delegate]];
+        [self setDelegate:(id<PXSourceListDelegate, NSOutlineViewDelegate>)[super delegate]];
         [super setDelegate:self];
-        [self setDataSource:(id<PXSourceListDataSource>)[super dataSource]];
+        [self setDataSource:(id<PXSourceListDataSource, NSOutlineViewDataSource>)[super dataSource]];
         [super setDataSource:self];
 
         _iconSize = NSMakeSize(16,16);