[vlc-commits] macosx/media-source: split data source to designated class

Felix Paul Kühne git at videolan.org
Mon Apr 29 19:26:54 CEST 2019


vlc | branch: master | Felix Paul Kühne <felix at feepk.net> | Mon Apr 22 21:09:21 2019 +0200| [5b6707ba80c6a1d8aced28f5771e14d4693afa8e] | committer: Felix Paul Kühne

macosx/media-source: split data source to designated class

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5b6707ba80c6a1d8aced28f5771e14d4693afa8e
---

 .../package/macosx/VLC.xcodeproj/project.pbxproj   |   6 +
 modules/gui/macosx/Makefile.am                     |  10 +-
 modules/gui/macosx/library/VLCLibraryDataSource.h  |   2 +-
 modules/gui/macosx/library/VLCLibraryDataSource.m  | 121 +----------------
 modules/gui/macosx/library/VLCLibraryWindow.m      |   8 +-
 .../macosx/media-source/VLCMediaSourceDataSource.h |  31 +++++
 .../macosx/media-source/VLCMediaSourceDataSource.m | 146 +++++++++++++++++++++
 po/POTFILES.in                                     |  10 +-
 8 files changed, 203 insertions(+), 131 deletions(-)

diff --git a/extras/package/macosx/VLC.xcodeproj/project.pbxproj b/extras/package/macosx/VLC.xcodeproj/project.pbxproj
index ecffeb2d52..7aac5fe4a8 100644
--- a/extras/package/macosx/VLC.xcodeproj/project.pbxproj
+++ b/extras/package/macosx/VLC.xcodeproj/project.pbxproj
@@ -157,6 +157,7 @@
 		7DFBDCBB226CED6300B700A5 /* VLCMediaSourceProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DFBDCBA226CED6300B700A5 /* VLCMediaSourceProvider.m */; };
 		7DFBDCBE226CED7200B700A5 /* VLCMediaSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DFBDCBD226CED7200B700A5 /* VLCMediaSource.m */; };
 		7DFBDCC1226DC16200B700A5 /* VLCInputItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DFBDCC0226DC16200B700A5 /* VLCInputItem.m */; };
+		7DFBDCC4226E445500B700A5 /* VLCMediaSourceDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DFBDCC3226E445500B700A5 /* VLCMediaSourceDataSource.m */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXFileReference section */
@@ -530,6 +531,8 @@
 		7DFBDCBD226CED7200B700A5 /* VLCMediaSource.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCMediaSource.m; sourceTree = "<group>"; };
 		7DFBDCBF226DC16200B700A5 /* VLCInputItem.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCInputItem.h; sourceTree = "<group>"; };
 		7DFBDCC0226DC16200B700A5 /* VLCInputItem.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCInputItem.m; sourceTree = "<group>"; };
+		7DFBDCC2226E445500B700A5 /* VLCMediaSourceDataSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCMediaSourceDataSource.h; sourceTree = "<group>"; };
+		7DFBDCC3226E445500B700A5 /* VLCMediaSourceDataSource.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCMediaSourceDataSource.m; sourceTree = "<group>"; };
 		8E49720006417F6800370C9F /* VLCInformationWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VLCInformationWindowController.h; sourceTree = "<group>"; };
 		8E49720106417F6800370C9F /* VLCInformationWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VLCInformationWindowController.m; sourceTree = "<group>"; };
 		8E55FB7F0459B0FD00FB3317 /* VLCOutput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VLCOutput.h; sourceTree = "<group>"; };
@@ -1318,6 +1321,8 @@
 				7DFBDCBA226CED6300B700A5 /* VLCMediaSourceProvider.m */,
 				7DFBDCBC226CED7200B700A5 /* VLCMediaSource.h */,
 				7DFBDCBD226CED7200B700A5 /* VLCMediaSource.m */,
+				7DFBDCC2226E445500B700A5 /* VLCMediaSourceDataSource.h */,
+				7DFBDCC3226E445500B700A5 /* VLCMediaSourceDataSource.m */,
 			);
 			path = "media-source";
 			sourceTree = "<group>";
@@ -1642,6 +1647,7 @@
 				1C3113D71E508C6900D4DD76 /* VLCPopupPanelController.m in Sources */,
 				7D445D8B22032B9200263D34 /* VLCPlaylistTableView.m in Sources */,
 				1C3113D91E508C6900D4DD76 /* VLCSimplePrefsController.m in Sources */,
+				7DFBDCC4226E445500B700A5 /* VLCMediaSourceDataSource.m in Sources */,
 				6B2EFC601F2819F700F3C0EA /* VLCVolumeSlider.m in Sources */,
 				7D2E0EDB20CD204D0033A221 /* VLCWindow.m in Sources */,
 				6B4D50A71E7AB52C004479B5 /* NSScreen+VLCAdditions.m in Sources */,
diff --git a/modules/gui/macosx/Makefile.am b/modules/gui/macosx/Makefile.am
index dd270b144a..5eca280481 100644
--- a/modules/gui/macosx/Makefile.am
+++ b/modules/gui/macosx/Makefile.am
@@ -69,6 +69,12 @@ libmacosx_plugin_la_SOURCES = \
 	gui/macosx/main/VLCMain.h \
 	gui/macosx/main/VLCMain.m \
 	gui/macosx/main/macosx.m \
+	gui/macosx/media-source/VLCMediaSource.h \
+	gui/macosx/media-source/VLCMediaSource.m \
+	gui/macosx/media-source/VLCMediaSourceDataSource.h \
+	gui/macosx/media-source/VLCMediaSourceDataSource.m \
+	gui/macosx/media-source/VLCMediaSourceProvider.h \
+	gui/macosx/media-source/VLCMediaSourceProvider.m \
 	gui/macosx/menus/VLCMainMenu.h \
 	gui/macosx/menus/VLCMainMenu.m \
 	gui/macosx/menus/VLCStatusBarIcon.h \
@@ -139,10 +145,6 @@ libmacosx_plugin_la_SOURCES = \
 	gui/macosx/preferences/prefs.m \
 	gui/macosx/preferences/prefs_widgets.h \
 	gui/macosx/preferences/prefs_widgets.m \
-	gui/macosx/media-source/VLCMediaSource.h \
-	gui/macosx/media-source/VLCMediaSource.m \
-	gui/macosx/media-source/VLCMediaSourceProvider.h \
-	gui/macosx/media-source/VLCMediaSourceProvider.m \
 	gui/macosx/views/VLCBottomBarView.h \
 	gui/macosx/views/VLCBottomBarView.m \
 	gui/macosx/views/VLCDefaultValueSlider.h \
diff --git a/modules/gui/macosx/library/VLCLibraryDataSource.h b/modules/gui/macosx/library/VLCLibraryDataSource.h
index 94d80c4cd6..abb4daed9e 100644
--- a/modules/gui/macosx/library/VLCLibraryDataSource.h
+++ b/modules/gui/macosx/library/VLCLibraryDataSource.h
@@ -26,7 +26,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 @class VLCLibraryModel;
 
- at interface VLCLibraryDataSource : NSObject <NSCollectionViewDataSource, NSCollectionViewDelegate, NSTableViewDataSource, NSTableViewDelegate>
+ at interface VLCLibraryDataSource : NSObject <NSCollectionViewDataSource, NSCollectionViewDelegate>
 
 @property (readwrite, assign) VLCLibraryModel *libraryModel;
 
diff --git a/modules/gui/macosx/library/VLCLibraryDataSource.m b/modules/gui/macosx/library/VLCLibraryDataSource.m
index b64a974ae4..d5629aca7b 100644
--- a/modules/gui/macosx/library/VLCLibraryDataSource.m
+++ b/modules/gui/macosx/library/VLCLibraryDataSource.m
@@ -22,72 +22,15 @@
 
 #import "VLCLibraryDataSource.h"
 
-#import "main/VLCMain.h"
-
 #import "library/VLCLibraryCollectionViewItem.h"
 #import "library/VLCLibraryModel.h"
 #import "library/VLCLibraryDataTypes.h"
-#import "library/VLCInputItem.h"
-
-#import "media-source/VLCMediaSourceProvider.h"
-#import "media-source/VLCMediaSource.h"
-#import "playlist/VLCPlaylistTableCellView.h"
-
-#import "extensions/NSString+Helpers.h"
 
 #import "views/VLCImageView.h"
-
-static NSString *VLCMediaSourceCellIdentifier = @"VLCMediaSourceCellIdentifier";
-
- at interface VLCLibraryDataSource ()
-{
-    NSArray *_mediaDiscovery;
-}
- at end
+#import "extensions/NSString+Helpers.h"
 
 @implementation VLCLibraryDataSource
 
-- (instancetype)init
-{
-    self = [super init];
-    if (self) {
-        dispatch_async(dispatch_get_main_queue(), ^{
-            [self lazyLoadMediaSources];
-        });
-    }
-    return self;
-}
-
-- (void)lazyLoadMediaSources
-{
-    NSMutableArray *mutableArray = [[NSMutableArray alloc] init];
-    NSArray *mediaDiscoveryForDevices = [VLCMediaSourceProvider listOfMediaSourcesForCategory:SD_CAT_DEVICES];
-    if (mediaDiscoveryForDevices.count > 0) {
-        [mutableArray addObject:_NS("Devices")];
-        [mutableArray addObjectsFromArray:mediaDiscoveryForDevices];
-    }
-
-    NSArray *mediaDiscoveryForLAN = [VLCMediaSourceProvider listOfMediaSourcesForCategory:SD_CAT_LAN];
-    if (mediaDiscoveryForLAN.count > 0) {
-        [mutableArray addObject:_NS("Local Network")];
-        [mutableArray addObjectsFromArray:mediaDiscoveryForLAN];
-    }
-
-    NSArray *mediaDiscoveryForInternet = [VLCMediaSourceProvider listOfMediaSourcesForCategory:SD_CAT_INTERNET];
-    if (mediaDiscoveryForInternet.count > 0) {
-        [mutableArray addObject:_NS("Internet")];
-        [mutableArray addObjectsFromArray:mediaDiscoveryForInternet];
-    }
-
-    NSArray *mediaDiscoveryForMyComputer = [VLCMediaSourceProvider listOfMediaSourcesForCategory:SD_CAT_MYCOMPUTER];
-    if (mediaDiscoveryForMyComputer.count > 0) {
-        [mutableArray addObject:_NS("My Computer")];
-        [mutableArray addObjectsFromArray:mediaDiscoveryForMyComputer];
-    }
-
-    _mediaDiscovery = [mutableArray copy];
-}
-
 - (NSInteger)collectionView:(NSCollectionView *)collectionView
      numberOfItemsInSection:(NSInteger)section
 {
@@ -148,66 +91,4 @@ static NSString *VLCMediaSourceCellIdentifier = @"VLCMediaSourceCellIdentifier";
     NSLog(@"library selection changed: %@", indexPaths);
 }
 
-- (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView
-{
-    return _mediaDiscovery.count;
-}
-
-- (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row
-{
-    VLCPlaylistTableCellView *cellView = [tableView makeViewWithIdentifier:VLCMediaSourceCellIdentifier owner:self];
-
-    if (cellView == nil) {
-        /* the following code saves us an instance of NSViewController which we don't need */
-        NSNib *nib = [[NSNib alloc] initWithNibNamed:@"VLCPlaylistTableCellView" bundle:nil];
-        NSArray *topLevelObjects;
-        if (![nib instantiateWithOwner:self topLevelObjects:&topLevelObjects]) {
-            msg_Err(getIntf(), "Failed to load nib file to show playlist items");
-            return nil;
-        }
-
-        for (id topLevelObject in topLevelObjects) {
-            if ([topLevelObject isKindOfClass:[VLCPlaylistTableCellView class]]) {
-                cellView = topLevelObject;
-                break;
-            }
-        }
-        cellView.identifier = VLCMediaSourceCellIdentifier;
-    }
-
-    if ([self tableView:tableView isGroupRow:row]) {
-        NSString *labelString = _mediaDiscovery[row];
-        cellView.mediaTitleTextField.hidden = NO;
-        cellView.secondaryMediaTitleTextField.hidden = YES;
-        cellView.artistTextField.hidden = YES;
-        cellView.mediaTitleTextField.stringValue = labelString;
-        cellView.durationTextField.stringValue = @"";
-    } else {
-        VLCMediaSource *mediaSource = _mediaDiscovery[row];
-
-        VLCInputItem *inputItem = mediaSource.rootNode.inputItem;
-        if (inputItem) {
-            cellView.mediaTitleTextField.hidden = YES;
-            cellView.secondaryMediaTitleTextField.hidden = NO;
-            cellView.artistTextField.hidden = NO;
-            cellView.secondaryMediaTitleTextField.stringValue = mediaSource.mediaSourceDescription;
-            cellView.artistTextField.stringValue = inputItem.name;
-            cellView.durationTextField.stringValue = [NSString stringWithTimeFromTicks:inputItem.duration];
-        } else {
-            cellView.mediaTitleTextField.hidden = NO;
-            cellView.secondaryMediaTitleTextField.hidden = YES;
-            cellView.artistTextField.hidden = YES;
-            cellView.mediaTitleTextField.stringValue = mediaSource.mediaSourceDescription;
-            cellView.durationTextField.stringValue = @"";
-        }
-    }
-
-    return cellView;
-}
-
-- (BOOL)tableView:(NSTableView *)tableView isGroupRow:(NSInteger)row
-{
-    return [_mediaDiscovery[row] isKindOfClass:[NSString class]];
-}
-
 @end
diff --git a/modules/gui/macosx/library/VLCLibraryWindow.m b/modules/gui/macosx/library/VLCLibraryWindow.m
index 5386214921..97a86c63a5 100644
--- a/modules/gui/macosx/library/VLCLibraryWindow.m
+++ b/modules/gui/macosx/library/VLCLibraryWindow.m
@@ -34,6 +34,8 @@
 #import "library/VLCLibraryModel.h"
 #import "library/VLCLibraryMenuController.h"
 
+#import "media-source/VLCMediaSourceDataSource.h"
+
 #import "windows/mainwindow/VLCControlsBarCommon.h"
 #import "windows/video/VLCFSPanelController.h"
 #import "windows/video/VLCVoutView.h"
@@ -46,6 +48,7 @@ static const float f_playlist_row_height = 72.;
 {
     VLCPlaylistDataSource *_playlistDataSource;
     VLCLibraryDataSource *_libraryDataSource;
+    VLCMediaSourceDataSource *_mediaSourceDataSource;
 
     NSRect _windowFrameBeforePlayback;
 
@@ -101,8 +104,9 @@ static const float f_playlist_row_height = 72.;
     _libraryCollectionView.delegate = _libraryDataSource;
     [_libraryCollectionView registerClass:[VLCLibraryCollectionViewItem class] forItemWithIdentifier:VLCLibraryCellIdentifier];
 
-    _mediaSourceTableView.dataSource = _libraryDataSource;
-    _mediaSourceTableView.delegate = _libraryDataSource;
+    _mediaSourceDataSource = [[VLCMediaSourceDataSource alloc] init];
+    _mediaSourceTableView.dataSource = _mediaSourceDataSource;
+    _mediaSourceTableView.delegate = _mediaSourceDataSource;
     _mediaSourceTableView.rowHeight = f_playlist_row_height;
 
     [self segmentedControlAction:nil];
diff --git a/modules/gui/macosx/media-source/VLCMediaSourceDataSource.h b/modules/gui/macosx/media-source/VLCMediaSourceDataSource.h
new file mode 100644
index 0000000000..d698fa749d
--- /dev/null
+++ b/modules/gui/macosx/media-source/VLCMediaSourceDataSource.h
@@ -0,0 +1,31 @@
+/*****************************************************************************
+ * VLCMediaSourceDataSource.h: MacOS X interface module
+ *****************************************************************************
+ * Copyright (C) 2019 VLC authors and VideoLAN
+ *
+ * Authors: Felix Paul Kühne <fkuehne # videolan -dot- org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#import <Cocoa/Cocoa.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+ at interface VLCMediaSourceDataSource : NSObject <NSTableViewDataSource, NSTableViewDelegate>
+
+ at end
+
+NS_ASSUME_NONNULL_END
diff --git a/modules/gui/macosx/media-source/VLCMediaSourceDataSource.m b/modules/gui/macosx/media-source/VLCMediaSourceDataSource.m
new file mode 100644
index 0000000000..fee40f05ac
--- /dev/null
+++ b/modules/gui/macosx/media-source/VLCMediaSourceDataSource.m
@@ -0,0 +1,146 @@
+/*****************************************************************************
+ * VLCMediaSourceDataSource.m: MacOS X interface module
+ *****************************************************************************
+ * Copyright (C) 2019 VLC authors and VideoLAN
+ *
+ * Authors: Felix Paul Kühne <fkuehne # videolan -dot- org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#import "VLCMediaSourceDataSource.h"
+
+#import "media-source/VLCMediaSourceProvider.h"
+#import "media-source/VLCMediaSource.h"
+#import "playlist/VLCPlaylistTableCellView.h"
+
+#import "main/VLCMain.h"
+#import "library/VLCInputItem.h"
+#import "extensions/NSString+Helpers.h"
+
+static NSString *VLCMediaSourceCellIdentifier = @"VLCMediaSourceCellIdentifier";
+
+ at interface VLCMediaSourceDataSource ()
+{
+    NSArray *_mediaDiscovery;
+}
+ at end
+
+ at implementation VLCMediaSourceDataSource
+
+- (instancetype)init
+{
+    self = [super init];
+    if (self) {
+        dispatch_async(dispatch_get_main_queue(), ^{
+            [self lazyLoadMediaSources];
+        });
+    }
+    return self;
+}
+
+- (void)lazyLoadMediaSources
+{
+    NSMutableArray *mutableArray = [[NSMutableArray alloc] init];
+    NSArray *mediaDiscoveryForDevices = [VLCMediaSourceProvider listOfMediaSourcesForCategory:SD_CAT_DEVICES];
+    if (mediaDiscoveryForDevices.count > 0) {
+        [mutableArray addObject:_NS("Devices")];
+        [mutableArray addObjectsFromArray:mediaDiscoveryForDevices];
+    }
+
+    NSArray *mediaDiscoveryForLAN = [VLCMediaSourceProvider listOfMediaSourcesForCategory:SD_CAT_LAN];
+    if (mediaDiscoveryForLAN.count > 0) {
+        [mutableArray addObject:_NS("Local Network")];
+        [mutableArray addObjectsFromArray:mediaDiscoveryForLAN];
+    }
+
+    NSArray *mediaDiscoveryForInternet = [VLCMediaSourceProvider listOfMediaSourcesForCategory:SD_CAT_INTERNET];
+    if (mediaDiscoveryForInternet.count > 0) {
+        [mutableArray addObject:_NS("Internet")];
+        [mutableArray addObjectsFromArray:mediaDiscoveryForInternet];
+    }
+
+    NSArray *mediaDiscoveryForMyComputer = [VLCMediaSourceProvider listOfMediaSourcesForCategory:SD_CAT_MYCOMPUTER];
+    if (mediaDiscoveryForMyComputer.count > 0) {
+        [mutableArray addObject:_NS("My Computer")];
+        [mutableArray addObjectsFromArray:mediaDiscoveryForMyComputer];
+    }
+
+    _mediaDiscovery = [mutableArray copy];
+}
+
+- (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView
+{
+    return _mediaDiscovery.count;
+}
+
+- (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row
+{
+    VLCPlaylistTableCellView *cellView = [tableView makeViewWithIdentifier:VLCMediaSourceCellIdentifier owner:self];
+
+    if (cellView == nil) {
+        /* the following code saves us an instance of NSViewController which we don't need */
+        NSNib *nib = [[NSNib alloc] initWithNibNamed:@"VLCPlaylistTableCellView" bundle:nil];
+        NSArray *topLevelObjects;
+        if (![nib instantiateWithOwner:self topLevelObjects:&topLevelObjects]) {
+            msg_Err(getIntf(), "Failed to load nib file to show playlist items");
+            return nil;
+        }
+
+        for (id topLevelObject in topLevelObjects) {
+            if ([topLevelObject isKindOfClass:[VLCPlaylistTableCellView class]]) {
+                cellView = topLevelObject;
+                break;
+            }
+        }
+        cellView.identifier = VLCMediaSourceCellIdentifier;
+    }
+
+    if ([self tableView:tableView isGroupRow:row]) {
+        NSString *labelString = _mediaDiscovery[row];
+        cellView.mediaTitleTextField.hidden = NO;
+        cellView.secondaryMediaTitleTextField.hidden = YES;
+        cellView.artistTextField.hidden = YES;
+        cellView.mediaTitleTextField.stringValue = labelString;
+        cellView.durationTextField.stringValue = @"";
+    } else {
+        VLCMediaSource *mediaSource = _mediaDiscovery[row];
+
+        VLCInputItem *inputItem = mediaSource.rootNode.inputItem;
+        if (inputItem) {
+            cellView.mediaTitleTextField.hidden = YES;
+            cellView.secondaryMediaTitleTextField.hidden = NO;
+            cellView.artistTextField.hidden = NO;
+            cellView.secondaryMediaTitleTextField.stringValue = mediaSource.mediaSourceDescription;
+            cellView.artistTextField.stringValue = inputItem.name;
+            cellView.durationTextField.stringValue = [NSString stringWithTimeFromTicks:inputItem.duration];
+        } else {
+            cellView.mediaTitleTextField.hidden = NO;
+            cellView.secondaryMediaTitleTextField.hidden = YES;
+            cellView.artistTextField.hidden = YES;
+            cellView.mediaTitleTextField.stringValue = mediaSource.mediaSourceDescription;
+            cellView.durationTextField.stringValue = @"";
+        }
+    }
+
+    return cellView;
+}
+
+- (BOOL)tableView:(NSTableView *)tableView isGroupRow:(NSInteger)row
+{
+    return [_mediaDiscovery[row] isKindOfClass:[NSString class]];
+}
+
+ at end
diff --git a/po/POTFILES.in b/po/POTFILES.in
index f2c6b72083..296db52688 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -487,6 +487,12 @@ modules/gui/macosx/main/VLCMain+OldPrefs.m
 modules/gui/macosx/main/VLCMain.h
 modules/gui/macosx/main/VLCMain.m
 modules/gui/macosx/main/macosx.m
+modules/gui/macosx/media-source/VLCMediaSource.h
+modules/gui/macosx/media-source/VLCMediaSource.m
+modules/gui/macosx/media-source/VLCMediaSourceDataSource.h
+modules/gui/macosx/media-source/VLCMediaSourceDataSource.m
+modules/gui/macosx/media-source/VLCMediaSourceProvider.h
+modules/gui/macosx/media-source/VLCMediaSourceProvider.m
 modules/gui/macosx/menus/VLCMainMenu.h
 modules/gui/macosx/menus/VLCMainMenu.m
 modules/gui/macosx/menus/VLCStatusBarIcon.h
@@ -555,10 +561,6 @@ modules/gui/macosx/preferences/prefs.h
 modules/gui/macosx/preferences/prefs.m
 modules/gui/macosx/preferences/prefs_widgets.h
 modules/gui/macosx/preferences/prefs_widgets.m
-modules/gui/macosx/media-source/VLCMediaSource.h
-modules/gui/macosx/media-source/VLCMediaSource.m
-modules/gui/macosx/media-source/VLCMediaSourceProvider.h
-modules/gui/macosx/media-source/VLCMediaSourceProvider.m
 modules/gui/macosx/views/VLCBottomBarView.h
 modules/gui/macosx/views/VLCBottomBarView.m
 modules/gui/macosx/views/VLCDefaultValueSlider.h



More information about the vlc-commits mailing list