[vlc-commits] macosx/prefs widgets: replace delegate method deprecated in Mac OS 10.4
Felix Paul Kühne
git at videolan.org
Fri Jan 24 18:07:15 CET 2020
vlc | branch: master | Felix Paul Kühne <felix at feepk.net> | Fri Jan 24 18:00:32 2020 +0100| [662ceeebb8b5a704b707b6b8d85e5de1738e29b0] | committer: Felix Paul Kühne
macosx/prefs widgets: replace delegate method deprecated in Mac OS 10.4
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=662ceeebb8b5a704b707b6b8d85e5de1738e29b0
---
modules/gui/macosx/preferences/prefs_widgets.m | 17 ++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)
diff --git a/modules/gui/macosx/preferences/prefs_widgets.m b/modules/gui/macosx/preferences/prefs_widgets.m
index a7b52ca94f..3ee0e77048 100644
--- a/modules/gui/macosx/preferences/prefs_widgets.m
+++ b/modules/gui/macosx/preferences/prefs_widgets.m
@@ -2139,19 +2139,10 @@ o_moduleenabled = [NSNumber numberWithBool:NO];\
@implementation ModuleListConfigControl (NSTableDataSource)
-- (BOOL)tableView:(NSTableView*)table writeRows:(NSArray*)rows
- toPasteboard:(NSPasteboard*)pb
-{
- // We only want to allow dragging of selected rows.
- NSEnumerator *iter = [rows objectEnumerator];
- NSNumber *row;
- while ((row = [iter nextObject]) != nil) {
- if (![table isRowSelected:[row intValue]])
- return NO;
- }
-
- [pb declareTypes:[NSArray arrayWithObject:@"VLC media player module"] owner:nil];
- [pb setPropertyList:rows forType:@"VLC media player module"];
+- (BOOL)tableView:(NSTableView *)tableView writeRowsWithIndexes:(NSIndexSet *)rowIndexes toPasteboard:(NSPasteboard *)pboard
+{
+ [pboard declareTypes:@[@"VLC media player module"] owner:nil];
+ [pboard setPropertyList:@[@(rowIndexes.firstIndex)] forType:@"VLC media player module"];
return YES;
}
More information about the vlc-commits
mailing list