From: Andre P. <at...@us...> - 2004-06-30 08:09:50
|
Update of /cvsroot/xine/xine-macosx/Cocoaxine/Palette In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31706/Palette Modified Files: XineControllerInspector.m XineController_IBAdditions.m Log Message: Refactored XineController to properly handle audio output, video output, and loop mode choices Index: XineControllerInspector.m =================================================================== RCS file: /cvsroot/xine/xine-macosx/Cocoaxine/Palette/XineControllerInspector.m,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- XineControllerInspector.m 29 Jun 2004 08:17:02 -0000 1.2 +++ XineControllerInspector.m 30 Jun 2004 08:09:38 -0000 1.3 @@ -28,24 +28,6 @@ static NSString * XineControllerInspectorName = @"XineControllerInspector"; /* Remember to update these enums if the .nib changes */ -typedef enum -{ - VIDEO_OUTPUT_USES_CONNECTED_VIEW = 0, - VIDEO_OUTPUT_USES_SEPARATE_VIDEO_WINDOW, - VIDEO_OUTPUT_IS_IGNORED, -} video_output_choice; - -typedef enum -{ - AUDIO_OUTPUT_USES_COREAUDIO = 0, - AUDIO_OUTPUT_IS_IGNORED, -} audio_output_choice; - -typedef enum -{ - LOOP_MODE_NORMAL = 0, - LOOP_MODE_LOOPING, -} loop_mode_choice; @implementation XineController (CocoaxinePaletteInspector) @@ -74,46 +56,15 @@ /* Find out video output */ button = [videoOutputChoice selectedCell]; - switch ((video_output_choice) [button tag]) - { - case VIDEO_OUTPUT_USES_CONNECTED_VIEW: - [controller setUsesSeparateVideoOutputWindow:NO]; - break; - case VIDEO_OUTPUT_USES_SEPARATE_VIDEO_WINDOW: - [controller setUsesSeparateVideoOutputWindow:YES]; - break; - case VIDEO_OUTPUT_IS_IGNORED: - [controller setUsesSeparateVideoOutputWindow:NO]; - break; - default: - break; - } + [controller setVideoOutputChoice:((XineVideoOutputChoiceTag) [button tag])]; /* Find out audio output */ button = [audioOutputChoice selectedCell]; - switch ((audio_output_choice) [button tag]) - { - case AUDIO_OUTPUT_USES_COREAUDIO: - break; - case AUDIO_OUTPUT_IS_IGNORED: - /* TODO: not implemented yet */ - break; - default: - break; - } + [controller setAudioOutputChoice:((XineAudioOutputChoiceTag) [button tag])]; /* Find out loop mode */ button = [loopModeChoice selectedCell]; - switch ((loop_mode_choice) [button tag]) - { - case LOOP_MODE_NORMAL: - break; - case LOOP_MODE_LOOPING: - /* TODO: not implemented yet */ - break; - default: - break; - } + [controller setLoopMode:((XineLoopModeTag) [button tag])]; [super ok:sender]; } Index: XineController_IBAdditions.m =================================================================== RCS file: /cvsroot/xine/xine-macosx/Cocoaxine/Palette/XineController_IBAdditions.m,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- XineController_IBAdditions.m 29 Jun 2004 07:58:28 -0000 1.1 +++ XineController_IBAdditions.m 30 Jun 2004 08:09:38 -0000 1.2 @@ -36,7 +36,7 @@ - (void) closeVideoWindow:(NSNotification *)note { - if (useSeparateVideoOutputWindow) + if (videoOutputChoice == XINE_VIDEO_OUTPUT_USES_SEPARATE_VIDEO_WINDOW) { [[view window] close]; } |