Commit 9de4120c authored by Marvin Scholz's avatar Marvin Scholz

macosx: Update PXSourceList to 2.x

parent 1cd82bd9
......@@ -57,8 +57,6 @@
1C3113F11E508C7600D4DD76 /* VLCRendererItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BBBB8B11D10A994001BD9BA /* VLCRendererItem.m */; };
1C3113F31E508C7600D4DD76 /* VLCRendererMenuController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BBBB8A81D108A17001BD9BA /* VLCRendererMenuController.m */; };
1C3114031E508C8800D4DD76 /* AppleRemote.m in Sources */ = {isa = PBXBuildFile; fileRef = CC6D8D9D0A878DED006F2BBE /* AppleRemote.m */; };
1C3114051E508C8800D4DD76 /* SideBarItem.m in Sources */ = {isa = PBXBuildFile; fileRef = CCCDDEF013E870BB00A35661 /* SideBarItem.m */; };
1C3114071E508C8800D4DD76 /* PXSourceList.m in Sources */ = {isa = PBXBuildFile; fileRef = CC0CD0E013DE0EAE00B0D90D /* PXSourceList.m */; };
1C31140D1E508C8800D4DD76 /* SPMediaKeyTap.m in Sources */ = {isa = PBXBuildFile; fileRef = CCF0777C13659A8000AF19FD /* SPMediaKeyTap.m */; };
1C5716AC1F5B142200678627 /* coreaudio_common.c in Sources */ = {isa = PBXBuildFile; fileRef = 1C5716AB1F5B142200678627 /* coreaudio_common.c */; };
1CAC3EE820CD1B3B00613DB2 /* VLCVideoOutputProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 1CAC3EE620CD1B3B00613DB2 /* VLCVideoOutputProvider.m */; };
......@@ -105,6 +103,14 @@
6B8166291EBFC34300C26F1B /* VLCDefaultValueSlider.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B6A499B1DFD9B23009128AC /* VLCDefaultValueSlider.m */; };
6B81662A1EBFC34300C26F1B /* VLCDefaultValueSliderCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B6A499D1DFD9B23009128AC /* VLCDefaultValueSliderCell.m */; };
6B81662C1EBFC38100C26F1B /* VLCUIWidgets.m in Sources */ = {isa = PBXBuildFile; fileRef = 5CCED71514C0D4A90057F8D1 /* VLCUIWidgets.m */; };
6B8A6AFD21279D2600DC29F3 /* PXSourceListBadgeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B8A6AEB21279D2500DC29F3 /* PXSourceListBadgeView.m */; };
6B8A6AFE21279D2600DC29F3 /* PXSourceListRuntimeAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B8A6AF021279D2500DC29F3 /* PXSourceListRuntimeAdditions.m */; };
6B8A6AFF21279D2600DC29F3 /* PXSourceListDelegateDataSourceProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B8A6AF421279D2500DC29F3 /* PXSourceListDelegateDataSourceProxy.m */; };
6B8A6B0021279D2600DC29F3 /* PXSourceListItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B8A6AF521279D2500DC29F3 /* PXSourceListItem.m */; };
6B8A6B0121279D2600DC29F3 /* PXSourceListTableCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B8A6AF721279D2600DC29F3 /* PXSourceListTableCellView.m */; };
6B8A6B0221279D2600DC29F3 /* PXSourceList.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B8A6AF921279D2600DC29F3 /* PXSourceList.m */; };
6B8A6B0321279D2600DC29F3 /* PXSourceListBadgeCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B8A6AFC21279D2600DC29F3 /* PXSourceListBadgeCell.m */; };
6B8A6B082127A3EA00DC29F3 /* VLCSourceListItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B8A6B072127A3EA00DC29F3 /* VLCSourceListItem.m */; };
6BBB05DA1EEFEA29003A1019 /* VLCHUDOutlineView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BBB05D91EEFEA29003A1019 /* VLCHUDOutlineView.m */; };
6BBB05E01EEFF165003A1019 /* VLCHUDTableCornerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BBB05DF1EEFF165003A1019 /* VLCHUDTableCornerView.m */; };
6BBBF9851F7B257100B404CD /* VLCLogMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BBBF9841F7B257100B404CD /* VLCLogMessage.m */; };
......@@ -370,6 +376,25 @@
6B8229FF1E4D2DD100833BE1 /* vlc.scriptSuite */ = {isa = PBXFileReference; lastKnownFileType = text.plist.scriptSuite; path = vlc.scriptSuite; sourceTree = "<group>"; };
6B822A001E4D2DD100833BE1 /* vlc.scriptTerminology */ = {isa = PBXFileReference; lastKnownFileType = text.plist.scriptTerminology; path = vlc.scriptTerminology; sourceTree = "<group>"; };
6B822A031E4D2DEB00833BE1 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
6B8A6AEB21279D2500DC29F3 /* PXSourceListBadgeView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PXSourceListBadgeView.m; sourceTree = "<group>"; };
6B8A6AEC21279D2500DC29F3 /* PXSourceListDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PXSourceListDataSource.h; sourceTree = "<group>"; };
6B8A6AED21279D2500DC29F3 /* PXSourceListTableCellView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PXSourceListTableCellView.h; sourceTree = "<group>"; };
6B8A6AEE21279D2500DC29F3 /* PXSourceListItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PXSourceListItem.h; sourceTree = "<group>"; };
6B8A6AF021279D2500DC29F3 /* PXSourceListRuntimeAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PXSourceListRuntimeAdditions.m; sourceTree = "<group>"; };
6B8A6AF121279D2500DC29F3 /* PXSourceListDelegateDataSourceProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PXSourceListDelegateDataSourceProxy.h; sourceTree = "<group>"; };
6B8A6AF221279D2500DC29F3 /* PXSourceListRuntimeAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PXSourceListRuntimeAdditions.h; sourceTree = "<group>"; };
6B8A6AF321279D2500DC29F3 /* PXSourceListPrivateConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PXSourceListPrivateConstants.h; sourceTree = "<group>"; };
6B8A6AF421279D2500DC29F3 /* PXSourceListDelegateDataSourceProxy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PXSourceListDelegateDataSourceProxy.m; sourceTree = "<group>"; };
6B8A6AF521279D2500DC29F3 /* PXSourceListItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PXSourceListItem.m; sourceTree = "<group>"; };
6B8A6AF621279D2600DC29F3 /* PXSourceList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PXSourceList.h; sourceTree = "<group>"; };
6B8A6AF721279D2600DC29F3 /* PXSourceListTableCellView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PXSourceListTableCellView.m; sourceTree = "<group>"; };
6B8A6AF821279D2600DC29F3 /* PXSourceListBadgeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PXSourceListBadgeView.h; sourceTree = "<group>"; };
6B8A6AF921279D2600DC29F3 /* PXSourceList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PXSourceList.m; sourceTree = "<group>"; };
6B8A6AFA21279D2600DC29F3 /* PXSourceListBadgeCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PXSourceListBadgeCell.h; sourceTree = "<group>"; };
6B8A6AFB21279D2600DC29F3 /* PXSourceListDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PXSourceListDelegate.h; sourceTree = "<group>"; };
6B8A6AFC21279D2600DC29F3 /* PXSourceListBadgeCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PXSourceListBadgeCell.m; sourceTree = "<group>"; };
6B8A6B0421279FA200DC29F3 /* VLCSourceListItem.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCSourceListItem.h; sourceTree = "<group>"; };
6B8A6B072127A3EA00DC29F3 /* VLCSourceListItem.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCSourceListItem.m; sourceTree = "<group>"; };
6BA1A0632038D93D005EA18A /* ci_filters.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ci_filters.m; path = ../../../modules/video_filter/ci_filters.m; sourceTree = "<group>"; };
6BBB05D81EEFEA29003A1019 /* VLCHUDOutlineView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VLCHUDOutlineView.h; sourceTree = "<group>"; };
6BBB05D91EEFEA29003A1019 /* VLCHUDOutlineView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VLCHUDOutlineView.m; sourceTree = "<group>"; };
......@@ -464,10 +489,6 @@
8ED6C28603E2EB1C0059A3A7 /* prefs.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = prefs.m; sourceTree = "<group>"; };
CC0663341566C34C003A411C /* VLCConvertAndSaveWindowController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = VLCConvertAndSaveWindowController.h; sourceTree = "<group>"; };
CC0663351566C34C003A411C /* VLCConvertAndSaveWindowController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = VLCConvertAndSaveWindowController.m; sourceTree = "<group>"; };
CC0CD0DF13DE0EAE00B0D90D /* PXSourceList.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PXSourceList.h; sourceTree = "<group>"; };
CC0CD0E013DE0EAE00B0D90D /* PXSourceList.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PXSourceList.m; sourceTree = "<group>"; };
CC0CD0E113DE0EAE00B0D90D /* PXSourceListDataSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PXSourceListDataSource.h; sourceTree = "<group>"; };
CC0CD0E213DE0EAE00B0D90D /* PXSourceListDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PXSourceListDelegate.h; sourceTree = "<group>"; };
CC1941240B9C1F8400635F6B /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = "<absolute>"; };
CC269A4615E7947F00F2FDC9 /* VLCStringUtility.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCStringUtility.h; sourceTree = "<group>"; };
CC269A4715E7947F00F2FDC9 /* VLCStringUtility.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCStringUtility.m; sourceTree = "<group>"; };
......@@ -501,8 +522,6 @@
CCBE999E0F922C51000705F8 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; };
CCCCDCA01413E1C000FE3DE1 /* VLCVoutView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCVoutView.h; sourceTree = "<group>"; };
CCCCDCA11413E1C000FE3DE1 /* VLCVoutView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCVoutView.m; sourceTree = "<group>"; };
CCCDDEEF13E870BB00A35661 /* SideBarItem.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SideBarItem.h; sourceTree = "<group>"; };
CCCDDEF013E870BB00A35661 /* SideBarItem.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SideBarItem.m; sourceTree = "<group>"; };
CCCE366D13817E4500694F2A /* VLCVideoEffectsWindowController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCVideoEffectsWindowController.h; sourceTree = "<group>"; };
CCCE366E13817E4500694F2A /* VLCVideoEffectsWindowController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = VLCVideoEffectsWindowController.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
CCDBA3B313D32E200006127B /* macosx.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = macosx.m; path = ../../../modules/video_output/macosx.m; sourceTree = "<group>"; };
......@@ -824,6 +843,18 @@
name = "HUD UI Classes";
sourceTree = "<group>";
};
6B8A6AEF21279D2500DC29F3 /* Internal */ = {
isa = PBXGroup;
children = (
6B8A6AF021279D2500DC29F3 /* PXSourceListRuntimeAdditions.m */,
6B8A6AF121279D2500DC29F3 /* PXSourceListDelegateDataSourceProxy.h */,
6B8A6AF221279D2500DC29F3 /* PXSourceListRuntimeAdditions.h */,
6B8A6AF321279D2500DC29F3 /* PXSourceListPrivateConstants.h */,
6B8A6AF421279D2500DC29F3 /* PXSourceListDelegateDataSourceProxy.m */,
);
path = Internal;
sourceTree = "<group>";
};
6BA1A0622038D8F1005EA18A /* filters */ = {
isa = PBXGroup;
children = (
......@@ -1066,6 +1097,8 @@
7D5678EF1D5BA397002698F3 /* VLCMainWindowControlsBar.m */,
CC448A6213B68A0B009F72E0 /* VLCMainWindow.h */,
CC448A6313B68A0B009F72E0 /* VLCMainWindow.m */,
6B8A6B0421279FA200DC29F3 /* VLCSourceListItem.h */,
6B8A6B072127A3EA00DC29F3 /* VLCSourceListItem.m */,
);
name = "Main Window";
sourceTree = "<group>";
......@@ -1337,14 +1370,21 @@
CC0CD0E413DE0EB500B0D90D /* PXSourceList */ = {
isa = PBXGroup;
children = (
CCCDDEEF13E870BB00A35661 /* SideBarItem.h */,
CCCDDEF013E870BB00A35661 /* SideBarItem.m */,
CC0CD0DF13DE0EAE00B0D90D /* PXSourceList.h */,
CC0CD0E013DE0EAE00B0D90D /* PXSourceList.m */,
CC0CD0E113DE0EAE00B0D90D /* PXSourceListDataSource.h */,
CC0CD0E213DE0EAE00B0D90D /* PXSourceListDelegate.h */,
6B8A6AEF21279D2500DC29F3 /* Internal */,
6B8A6AF621279D2600DC29F3 /* PXSourceList.h */,
6B8A6AF921279D2600DC29F3 /* PXSourceList.m */,
6B8A6AFA21279D2600DC29F3 /* PXSourceListBadgeCell.h */,
6B8A6AFC21279D2600DC29F3 /* PXSourceListBadgeCell.m */,
6B8A6AF821279D2600DC29F3 /* PXSourceListBadgeView.h */,
6B8A6AEB21279D2500DC29F3 /* PXSourceListBadgeView.m */,
6B8A6AEC21279D2500DC29F3 /* PXSourceListDataSource.h */,
6B8A6AFB21279D2600DC29F3 /* PXSourceListDelegate.h */,
6B8A6AEE21279D2500DC29F3 /* PXSourceListItem.h */,
6B8A6AF521279D2500DC29F3 /* PXSourceListItem.m */,
6B8A6AED21279D2500DC29F3 /* PXSourceListTableCellView.h */,
6B8A6AF721279D2600DC29F3 /* PXSourceListTableCellView.m */,
);
name = PXSourceList;
path = PXSourceList;
sourceTree = "<group>";
};
CC0CD0E513DE0FC600B0D90D /* Imported Code */ = {
......@@ -1538,6 +1578,7 @@
1CCC89022078A3D500E5626F /* ResumeDialog.xib in Sources */,
1CCC89032078A3D500E5626F /* SimplePreferences.xib in Sources */,
1CCC89042078A3D500E5626F /* StreamOutput.xib in Sources */,
6B8A6B082127A3EA00DC29F3 /* VLCSourceListItem.m in Sources */,
1CCC89052078A3D500E5626F /* TextfieldPanel.xib in Sources */,
1CCC89062078A3D500E5626F /* TimeSelectionPanel.xib in Sources */,
6B81662C1EBFC38100C26F1B /* VLCUIWidgets.m in Sources */,
......@@ -1548,10 +1589,8 @@
6B4D50901E79781F004479B5 /* VLCHotkeyChangeWindow.m in Sources */,
1C3114031E508C8800D4DD76 /* AppleRemote.m in Sources */,
1CFE8D591EA0D42A00E94451 /* VLCErrorWindowController.m in Sources */,
1C3114051E508C8800D4DD76 /* SideBarItem.m in Sources */,
6B4D50961E7A7D16004479B5 /* NSSound+VLCAdditions.m in Sources */,
6BF093F91EE0182B0049D8B0 /* VLCTimeField.m in Sources */,
1C3114071E508C8800D4DD76 /* PXSourceList.m in Sources */,
1C31140D1E508C8800D4DD76 /* SPMediaKeyTap.m in Sources */,
1C3113EF1E508C7600D4DD76 /* VLCRendererDiscovery.m in Sources */,
1C3113F11E508C7600D4DD76 /* VLCRendererItem.m in Sources */,
......@@ -1563,6 +1602,7 @@
1C3113941E508C6900D4DD76 /* VLCAddonsWindowController.m in Sources */,
7D2E0EDE20CD206F0033A221 /* VLCVideoWindowCommon.m in Sources */,
1C3113961E508C6900D4DD76 /* applescript.m in Sources */,
6B8A6B0121279D2600DC29F3 /* PXSourceListTableCellView.m in Sources */,
1C3113981E508C6900D4DD76 /* VLCAudioEffectsWindowController.m in Sources */,
6BBBF9851F7B257100B404CD /* VLCLogMessage.m in Sources */,
1C31139A1E508C6900D4DD76 /* VLCBookmarksWindowController.m in Sources */,
......@@ -1570,6 +1610,7 @@
6BF5C5041EFE66EF008A9C12 /* VLCHUDTableView.m in Sources */,
6BBB05E01EEFF165003A1019 /* VLCHUDTableCornerView.m in Sources */,
1C31139D1E508C6900D4DD76 /* VLCControlsBarCommon.m in Sources */,
6B8A6B0021279D2600DC29F3 /* PXSourceListItem.m in Sources */,
7DD2F5C52081B73B007EE187 /* VLCRemoteControlService.m in Sources */,
1C31139F1E508C6900D4DD76 /* VLCMainWindowControlsBar.m in Sources */,
1C3113A11E508C6900D4DD76 /* VLCConvertAndSaveWindowController.m in Sources */,
......@@ -1600,15 +1641,20 @@
1C3113CD1E508C6900D4DD76 /* VLCPLModel.m in Sources */,
1C3113CF1E508C6900D4DD76 /* prefs_widgets.m in Sources */,
1C3113D11E508C6900D4DD76 /* prefs.m in Sources */,
6B8A6AFF21279D2600DC29F3 /* PXSourceListDelegateDataSourceProxy.m in Sources */,
1C3113D31E508C6900D4DD76 /* VLCResumeDialogController.m in Sources */,
1C5716AC1F5B142200678627 /* coreaudio_common.c in Sources */,
1C3113D51E508C6900D4DD76 /* VLCTextfieldPanelController.m in Sources */,
1C3113D71E508C6900D4DD76 /* VLCPopupPanelController.m in Sources */,
6B8A6AFE21279D2600DC29F3 /* PXSourceListRuntimeAdditions.m in Sources */,
6B8A6B0321279D2600DC29F3 /* PXSourceListBadgeCell.m in Sources */,
1C3113D91E508C6900D4DD76 /* VLCSimplePrefsController.m in Sources */,
6B8A6B0221279D2600DC29F3 /* PXSourceList.m in Sources */,
6B2EFC601F2819F700F3C0EA /* VLCVolumeSlider.m in Sources */,
7D2E0EDB20CD204D0033A221 /* VLCWindow.m in Sources */,
1C3113DB1E508C6900D4DD76 /* VLCStringUtility.m in Sources */,
6B4D50A71E7AB52C004479B5 /* NSScreen+VLCAdditions.m in Sources */,
6B8A6AFD21279D2600DC29F3 /* PXSourceListBadgeView.m in Sources */,
1C3113DD1E508C6900D4DD76 /* VLCTrackSynchronizationWindowController.m in Sources */,
6B6FFF701EF9EC350001CEB1 /* CompatibilityFixes.m in Sources */,
1C3113DF1E508C6900D4DD76 /* VLCVideoEffectsWindowController.m in Sources */,
......
......@@ -60,9 +60,6 @@ libmacosx_plugin_la_SOURCES = \
gui/macosx/VLCPLModel.h gui/macosx/VLCPLModel.m \
gui/macosx/prefs.h gui/macosx/prefs.m \
gui/macosx/prefs_widgets.h gui/macosx/prefs_widgets.m \
gui/macosx/PXSourceList.h gui/macosx/PXSourceList.m \
gui/macosx/PXSourceListDataSource.h gui/macosx/PXSourceListDelegate.h \
gui/macosx/SideBarItem.h gui/macosx/SideBarItem.m \
gui/macosx/VLCPopupPanelController.h gui/macosx/VLCPopupPanelController.m \
gui/macosx/VLCTextfieldPanelController.h gui/macosx/VLCTextfieldPanelController.m \
gui/macosx/VLCSimplePrefsController.h gui/macosx/VLCSimplePrefsController.m \
......@@ -95,6 +92,7 @@ libmacosx_plugin_la_SOURCES = \
gui/macosx/VLCRendererItem.h gui/macosx/VLCRendererItem.m \
gui/macosx/VLCRendererMenuController.h gui/macosx/VLCRendererMenuController.m \
gui/macosx/VLCResumeDialogController.h gui/macosx/VLCResumeDialogController.m \
gui/macosx/VLCSourceListItem.h gui/macosx/VLCSourceListItem.m \
gui/macosx/VLCTrackSynchronizationWindowController.h gui/macosx/VLCTrackSynchronizationWindowController.m \
gui/macosx/VLCVideoEffectsWindowController.h gui/macosx/VLCVideoEffectsWindowController.m \
gui/macosx/VLCFSPanelController.h gui/macosx/VLCFSPanelController.m \
......@@ -110,6 +108,25 @@ libmacosx_plugin_la_SOURCES = \
gui/macosx/VLCVolumeSliderCell.h gui/macosx/VLCVolumeSliderCell.m \
gui/macosx/VLCWrappableTextField.h gui/macosx/VLCWrappableTextField.m
# PXSourceList sources
libmacosx_plugin_la_SOURCES += \
gui/macosx/PXSourceList/PXSourceList.h \
gui/macosx/PXSourceList/PXSourceList.m \
gui/macosx/PXSourceList/PXSourceListBadgeCell.h \
gui/macosx/PXSourceList/PXSourceListBadgeCell.m \
gui/macosx/PXSourceList/PXSourceListBadgeView.h \
gui/macosx/PXSourceList/PXSourceListBadgeView.m \
gui/macosx/PXSourceList/PXSourceListItem.h \
gui/macosx/PXSourceList/PXSourceListItem.m \
gui/macosx/PXSourceList/PXSourceListTableCellView.h \
gui/macosx/PXSourceList/PXSourceListTableCellView.m \
gui/macosx/PXSourceList/Internal/PXSourceListDelegateDataSourceProxy.h \
gui/macosx/PXSourceList/Internal/PXSourceListDelegateDataSourceProxy.m \
gui/macosx/PXSourceList/Internal/PXSourceListRuntimeAdditions.h \
gui/macosx/PXSourceList/Internal/PXSourceListRuntimeAdditions.m \
gui/macosx/PXSourceList/Internal/PXSourceListPrivateConstants.h \
gui/macosx/PXSourceList/PXSourceListDataSource.h \
gui/macosx/PXSourceList/PXSourceListDelegate.h
# User interface compilation
......
//
// PXSourceList.h
// PXSourceList
//
// Created by Alex Rozanski on 05/09/2009.
// Copyright 2009-10 Alex Rozanski http://perspx.com
//
#import <Cocoa/Cocoa.h>
#import "PXSourceListDelegate.h"
#import "PXSourceListDataSource.h"
@interface PXSourceList: NSOutlineView <NSOutlineViewDelegate, NSOutlineViewDataSource>
{
id <PXSourceListDelegate> _secondaryDelegate; //Used to store the publicly visible delegate
id <PXSourceListDataSource> _secondaryDataSource; //Used to store the publicly visible data source
}
@property (nonatomic) NSSize iconSize;
@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:(nonnull id)item; //Returns whether `item` is a group
- (BOOL)isGroupAlwaysExpanded:(nonnull id)group; //Returns whether `group` is displayed as always expanded
- (BOOL)itemHasBadge:(nonnull id)item; //Returns whether `item` has a badge
- (NSInteger)badgeValueForItem:(nonnull id)item; //Returns the badge value for `item`
@end
//
// PXSourceListDelegateDataSourceProxy.h
// PXSourceList
//
// Created by Alex Rozanski on 25/12/2013.
// Copyright 2009-14 Alex Rozanski http://alexrozanski.com and other contributors.
// This software is licensed under the New BSD License. Full details can be found in the README.
//
#import <Foundation/Foundation.h>
#import "../PXSourceList.h"
@interface PXSourceListDelegateDataSourceProxy : NSProxy <NSOutlineViewDelegate, NSOutlineViewDataSource, PXSourceListDelegate, PXSourceListDataSource>
@property (weak, nonatomic) PXSourceList *sourceList;
@property (unsafe_unretained, nonatomic) id <PXSourceListDelegate> delegate;
@property (unsafe_unretained, nonatomic) id <PXSourceListDataSource> dataSource;
- (id)initWithSourceList:(PXSourceList *)sourceList;
@end
//
// PXSourceListDelegateDataSourceProxy.m
// PXSourceList
//
// Created by Alex Rozanski on 25/12/2013.
// Copyright 2009-14 Alex Rozanski http://alexrozanski.com and other contributors.
// This software is licensed under the New BSD License. Full details can be found in the README.
//
#import "PXSourceListDelegateDataSourceProxy.h"
#import <objc/runtime.h>
#import "PXSourceListPrivateConstants.h"
#import "PXSourceListRuntimeAdditions.h"
// Internal constants.
static NSString * const forwardingMapForwardingMethodNameKey = @"methodName";
static NSString * const forwardingMapForwardedArgumentIndexesKey = @"forwardedArgumentIndexes";
static NSArray * __outlineViewDelegateMethods = nil;
static NSArray * __outlineViewDataSourceMethods = nil;
static NSArray * __requiredOutlineViewDataSourceMethods = nil;
// Cache the PXSourceListDelegate and PXSourceListDataSource method names so that if these methods are invoked on
// us, we can quickly forward them to the delegate and dataSource using -forwardingTargetForSelector: without going
// through -forwardInvocation:.
static NSArray * __fastPathForwardingDelegateMethods = nil;
static NSArray * __fastPathForwardingDataSourceMethods = nil;
// We want to suppress the warnings for protocol methods not being implemented. As a proxy we will forward these
// messages to the actual delegate and data source.
#pragma clang diagnostic ignored "-Wprotocol"
@implementation PXSourceListDelegateDataSourceProxy
+ (void)initialize
{
__outlineViewDelegateMethods = px_methodNamesForProtocol(@protocol(NSOutlineViewDelegate));
__outlineViewDataSourceMethods = px_methodNamesForProtocol(@protocol(NSOutlineViewDataSource));
__fastPathForwardingDelegateMethods = [self fastPathForwardingDelegateMethods];
__fastPathForwardingDataSourceMethods = px_methodNamesForProtocol(@protocol(PXSourceListDataSource));
__requiredOutlineViewDataSourceMethods = @[NSStringFromSelector(@selector(outlineView:numberOfChildrenOfItem:)),
NSStringFromSelector(@selector(outlineView:child:ofItem:)),
NSStringFromSelector(@selector(outlineView:isItemExpandable:)),
NSStringFromSelector(@selector(outlineView:objectValueForTableColumn:byItem:))];
// Add the custom mappings first before we add the 'regular' mappings.
[self addCustomMethodNameMappings];
// Now add the 'regular' mappings.
[self addEntriesToMethodForwardingMap:[self methodNameMappingsForProtocol:@protocol(NSOutlineViewDelegate)]];
[self addEntriesToMethodForwardingMap:[self methodNameMappingsForProtocol:@protocol(NSOutlineViewDataSource)]];
}
- (id)initWithSourceList:(PXSourceList *)sourceList
{
_sourceList = sourceList;
return self;
}
- (void)dealloc
{
//Unregister the delegate from receiving notifications
[[NSNotificationCenter defaultCenter] removeObserver:self.delegate name:nil object:self.sourceList];
}
#pragma mark - Accessors
- (void)setDelegate:(id<PXSourceListDelegate>)delegate
{
if (self.delegate)
[[NSNotificationCenter defaultCenter] removeObserver:self.delegate name:nil object:self.sourceList];
_delegate = delegate;
//Register the new delegate to receive notifications
[self registerDelegateToReceiveNotification:PXSLSelectionIsChangingNotification
withSelector:@selector(sourceListSelectionIsChanging:)];
[self registerDelegateToReceiveNotification:PXSLSelectionDidChangeNotification
withSelector:@selector(sourceListSelectionDidChange:)];
[self registerDelegateToReceiveNotification:PXSLItemWillExpandNotification
withSelector:@selector(sourceListItemWillExpand:)];
[self registerDelegateToReceiveNotification:PXSLItemDidExpandNotification
withSelector:@selector(sourceListItemDidExpand:)];
[self registerDelegateToReceiveNotification:PXSLItemWillCollapseNotification
withSelector:@selector(sourceListItemWillCollapse:)];
[self registerDelegateToReceiveNotification:PXSLItemDidCollapseNotification
withSelector:@selector(sourceListItemDidCollapse:)];
[self registerDelegateToReceiveNotification:PXSLDeleteKeyPressedOnRowsNotification
withSelector:@selector(sourceListDeleteKeyPressedOnRows:)];
}
- (void)setDataSource:(id<PXSourceListDataSource>)dataSource
{
_dataSource = dataSource;
}
#pragma mark - NSObject Overrides
- (BOOL)respondsToSelector:(SEL)aSelector
{
NSString *methodName = NSStringFromSelector(aSelector);
// Only let the source list override NSOutlineView delegate and data source methods.
if ([self.sourceList respondsToSelector:aSelector] && ([__outlineViewDataSourceMethods containsObject:methodName] || [__outlineViewDelegateMethods containsObject:methodName]))
return YES;
if ([__requiredOutlineViewDataSourceMethods containsObject:methodName])
return YES;
if ([__fastPathForwardingDelegateMethods containsObject:methodName])
return [self.delegate respondsToSelector:aSelector];
if ([__fastPathForwardingDataSourceMethods containsObject:methodName])
return [self.dataSource respondsToSelector:aSelector];
id forwardingObject = [self forwardingObjectForSelector:aSelector];
NSDictionary *forwardingInformation = [[self class] forwardingInformationForSelector:aSelector];
if(!forwardingObject || !forwardingInformation)
return NO;
return [forwardingObject respondsToSelector:NSSelectorFromString(forwardingInformation[forwardingMapForwardingMethodNameKey])];
}
- (BOOL)conformsToProtocol:(Protocol *)protocol
{
return class_conformsToProtocol(object_getClass(self), protocol);
}
// Fast-path delegate and data source methods aren't handled here; they are taken care of in -forwardingTargetForSelector:.
- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
{
NSString *methodName = NSStringFromSelector(aSelector);
struct objc_method_description description = {NULL, NULL};
if ([__outlineViewDelegateMethods containsObject:methodName])
description = px_methodDescriptionForProtocolMethod(@protocol(NSOutlineViewDelegate), aSelector);
else if ([__outlineViewDataSourceMethods containsObject:methodName])
description = px_methodDescriptionForProtocolMethod(@protocol(NSOutlineViewDataSource), aSelector);
if (description.name == NULL && description.types == NULL)
return nil;
return [NSMethodSignature signatureWithObjCTypes:description.types];
}
- (BOOL) isKindOfClass:(Class)aClass
{
return NO;
}
- (void)forwardInvocation:(NSInvocation *)anInvocation
{
SEL sourceSelector = anInvocation.selector;
// Give the Source List a chance to handle the selector first (this is a bit of a hack for the time being
// and should be changed).
if ([self.sourceList respondsToSelector:sourceSelector]) {
[anInvocation invokeWithTarget:self.sourceList];
return;
}
id forwardingObject = [self forwardingObjectForSelector:sourceSelector];
NSDictionary *forwardingInformation = [[self class] forwardingInformationForSelector:sourceSelector];
if(!forwardingObject || !forwardingInformation) {
[super forwardInvocation:anInvocation];
return;
}
SEL forwardingSelector = NSSelectorFromString(forwardingInformation[forwardingMapForwardingMethodNameKey]);
NSArray *forwardedArgumentIndexes = forwardingInformation[forwardingMapForwardedArgumentIndexesKey];
anInvocation.selector = forwardingSelector;
NSMethodSignature *methodSignature = [forwardingObject methodSignatureForSelector:forwardingSelector];
/* Catch the case where we have advertised ourselves as responding to a selector required by NSOutlineView
for a valid dataSource but the corresponding PXSourceListDataSource method isn't implemented by the dataSource.
*/
if ([__requiredOutlineViewDataSourceMethods containsObject:NSStringFromSelector(sourceSelector)]
&& ![self.dataSource respondsToSelector:forwardingSelector]) {
return;
}
/* Modify the arguments in the invocation if the source and target selector arguments are different.
The forwardedArgumentIndexes array contains the indexes of arguments in the original invocation that we want
to use in our modified invocation. E.g. @[@0, @2] means take the first and third arguments and only use them
when forwarding. We want to do this when the forwarded selector has a different number of arguments to the
source selector (see +addCustomMethodNameMappings).
Note that this implementation only works if the arguments in `forwardedArgumentIndexes` are monotonically
increasing (which is good enough for now).
*/
if (forwardedArgumentIndexes) {
// self and _cmd are arguments 0 and 1.
NSUInteger invocationArgumentIndex = 2;
for (NSNumber *newArgumentIndex in forwardedArgumentIndexes) {
NSInteger forwardedArgumentIndex = newArgumentIndex.integerValue;
// Handle the case where we want to use (for example) the third argument from the original invocation
// as the second argument of our modified invocation.
if (invocationArgumentIndex != forwardedArgumentIndex) {
NSUInteger argumentSize = 0;
NSGetSizeAndAlignment([methodSignature getArgumentTypeAtIndex:invocationArgumentIndex], &argumentSize, NULL);
void *argument = malloc(argumentSize);
[anInvocation getArgument:argument atIndex:forwardedArgumentIndex + 2]; // Take self and _cmd into account again.
[anInvocation setArgument:argument atIndex:invocationArgumentIndex];
free(argument);
}
invocationArgumentIndex++;
}
}
[anInvocation invokeWithTarget:forwardingObject];
}
- (id)forwardingTargetForSelector:(SEL)aSelector
{
NSString *methodName = NSStringFromSelector(aSelector);
if ([__fastPathForwardingDelegateMethods containsObject:methodName])
return self.delegate;
if ([__fastPathForwardingDataSourceMethods containsObject:methodName])
return self.dataSource;
return nil;
}
#pragma mark - Method Forwarding
+ (NSMutableDictionary *)methodForwardingMap
{
static NSMutableDictionary *_methodForwardingMap = nil;
if (!_methodForwardingMap)
_methodForwardingMap = [[NSMutableDictionary alloc] init];
return _methodForwardingMap;
}
+ (void)addEntriesToMethodForwardingMap:(NSDictionary *)entries
{
NSArray *methodForwardingBlacklist = [self methodForwardingBlacklist];
NSMutableDictionary *methodForwardingMap = [self methodForwardingMap];
for (NSString *key in entries) {
if (![methodForwardingBlacklist containsObject:key] && !methodForwardingMap[key])
methodForwardingMap[key] = entries[key];
}
}
+ (NSDictionary *)methodNameMappingsForProtocol:(Protocol *)protocol
{
NSMutableDictionary *methodNameMappings = [[NSMutableDictionary alloc] init];
NSArray *protocolMethods = px_allProtocolMethods(protocol);
NSString *protocolName = NSStringFromProtocol(protocol);
for (NSDictionary *methodInfo in protocolMethods) {
NSString *methodName = methodInfo[px_protocolMethodNameKey];
NSString *mappedMethodName = [self mappedMethodNameForMethodName:methodName];
if (!mappedMethodName) {
NSLog(@"PXSourceList: couldn't map method %@ from %@", methodName, protocolName);
continue;
}
[methodNameMappings setObject:@{forwardingMapForwardingMethodNameKey: mappedMethodName}
forKey:methodName];
}
return methodNameMappings;
}
+ (NSString *)mappedMethodNameForMethodName:(NSString *)methodName
{
NSString *outlineViewSearchString = @"outlineView";
NSUInteger letterVOffset = [outlineViewSearchString rangeOfString:@"V"].location;
NSCharacterSet *uppercaseLetterCharacterSet = [NSCharacterSet uppercaseLetterCharacterSet];
NSRange outlineViewStringRange = [methodName rangeOfString:outlineViewSearchString options:NSCaseInsensitiveSearch];
// If for some reason we can't map the method name, try to fail gracefully.
if (outlineViewStringRange.location == NSNotFound)
return nil;
BOOL isOCapitalized = [uppercaseLetterCharacterSet characterIsMember:[methodName characterAtIndex:outlineViewStringRange.location]];