From: Felix Paul Kühne Date: Sun, 14 Apr 2013 14:20:54 +0000 (+0200) Subject: macosx: move Subtitle and Teletext items to a newly created 'Subtitles' menu X-Git-Tag: 2.1.0-git~667 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=c2a6ca7d4e639c06e7c3628d94c61a0ff6dc2f71;p=vlc macosx: move Subtitle and Teletext items to a newly created 'Subtitles' menu More control elements to come --- diff --git a/extras/package/macosx/Resources/English.lproj/MainMenu.xib b/extras/package/macosx/Resources/English.lproj/MainMenu.xib index 1db9c33daa..471249f55a 100644 --- a/extras/package/macosx/Resources/English.lproj/MainMenu.xib +++ b/extras/package/macosx/Resources/English.lproj/MainMenu.xib @@ -21,11 +21,11 @@ YES - - - - + + + + YES @@ -2282,8 +2282,59 @@ - + + + YES + YES + + + 1048576 + 2147483647 + + + + + Video device + + 1048576 + 2147483647 + + + submenuAction: + + Video device + + YES + + + + + + + + + Subtitles + + 2147483647 + + + submenuAction: + + Subtitles + + YES + + + Open File... + + 1048576 + 2147483647 + + + + + Subtitle track 1048576 @@ -2291,24 +2342,25 @@ submenuAction: - + Subtitle track YES - - - Open File... - - 1048576 - 2147483647 - - - - - + + + YES + YES + + + 2147483647 + + + + + Teletext 1048576 @@ -2316,20 +2368,20 @@ submenuAction: - + Teletext YES - - + + Transparent 2147483647 - - + + YES YES @@ -2338,40 +2390,40 @@ - - + + Index page 2147483647 - - + + Red 2147483647 - - + + Green 2147483647 - - + + Yellow 2147483647 - - + + Blue 2147483647 @@ -2381,34 +2433,8 @@ - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Video device - - 1048576 - 2147483647 - - - submenuAction: - - Video device - - YES - - - + YES @@ -5627,70 +5653,6 @@ LCAuLi4 3722 - - - telxTransparent: - - - - 3931 - - - - telxNavLink: - - - - 3932 - - - - telxNavLink: - - - - 3933 - - - - telxNavLink: - - - - 3934 - - - - telxNavLink: - - - - 3935 - - - - telxNavLink: - - - - 3936 - - - - delegate - - - - 3937 - - - - telxNavLink: - - - - 3938 - o_crashrep_includeEmail_ckb @@ -5771,14 +5733,6 @@ LCAuLi4 4256 - - - addSubtitleFile: - - - - 4268 - checkForUpdates: @@ -5851,14 +5805,6 @@ LCAuLi4 4447 - - - o_mi_addSub - - - - 4448 - o_mi_aspect_ratio @@ -6267,70 +6213,6 @@ LCAuLi4 4519 - - - o_mi_subtitle - - - - 4521 - - - - o_mi_teletext - - - - 4522 - - - - o_mi_teletext_transparent - - - - 4523 - - - - o_mi_teletext_blue - - - - 4524 - - - - o_mi_teletext_green - - - - 4525 - - - - o_mi_teletext_index - - - - 4526 - - - - o_mi_teletext_red - - - - 4527 - - - - o_mi_teletext_yellow - - - - 4528 - o_mi_trackSynchronization @@ -6483,14 +6365,6 @@ LCAuLi4 4549 - - - o_mu_subtitle - - - - 4550 - o_mu_screen @@ -8075,44 +7949,204 @@ LCAuLi4 5416 - - - - YES - - 0 - - YES - - - + + + delegate + + - - -2 - - - File's Owner + 5513 + + + + o_mi_teletext + + - - -1 - - - First Responder + 5517 + + + + o_mi_teletext_transparent + + - - 21 - - - YES - - - - Main Window + 5518 + + + + o_mi_teletext_index + + - - 2 - - + 5519 + + + + o_mi_teletext_red + + + + 5520 + + + + o_mi_teletext_green + + + + 5521 + + + + o_mi_teletext_yellow + + + + 5522 + + + + o_mi_teletext_blue + + + + 5523 + + + + o_mu_subtitles + + + + 5524 + + + + o_mi_subtitle_track + + + + 5525 + + + + o_mu_subtitle_tracks + + + + 5526 + + + + o_mi_openSubtitleFile + + + + 5527 + + + + addSubtitleFile: + + + + 5528 + + + + telxTransparent: + + + + 5530 + + + + telxNavLink: + + + + 5531 + + + + telxNavLink: + + + + 5532 + + + + telxNavLink: + + + + 5533 + + + + telxNavLink: + + + + 5534 + + + + telxNavLink: + + + + 5535 + + + + telxNavLink: + + + + 5536 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + 21 + + + YES + + + + Main Window + + + 2 + + YES @@ -8134,6 +8168,7 @@ LCAuLi4 + MainMenu @@ -8147,105 +8182,6 @@ LCAuLi4 - - 24 - - - YES - - - - - - - - - - - - - - - - - - - - - 5 - - - - - 23 - - - - - 92 - - - - - 898 - - - - - 998 - - - - - 999 - - - - - 1002 - - - - - 1003 - - - - - 1192 - - - - - 2124 - - - - - 2390 - - - - - 2393 - - - - - 2394 - - - - - 2395 - - - - - 2756 - - - 56 @@ -8531,7 +8467,6 @@ LCAuLi4 - @@ -8540,7 +8475,6 @@ LCAuLi4 - @@ -8604,29 +8538,6 @@ LCAuLi4 - - 1509 - - - YES - - - - - - 1510 - - - YES - - - - - - 4267 - - - 1511 @@ -8704,77 +8615,18 @@ LCAuLi4 - 3915 - - - YES - - + 4258 + - 3916 - + 1050 + YES - - - - - - - + - - - - 3917 - - - - - 3918 - - - - - 3919 - - - - - 3920 - - - - - 3921 - - - - - 3922 - - - - - 3923 - - - - - 4258 - - - - - 1050 - - - YES - - - + 1051 @@ -9810,11 +9662,6 @@ LCAuLi4 - - 4412 - - - 4440 @@ -11184,6 +11031,217 @@ LCAuLi4 + + 24 + + + YES + + + + + + + + + + + + + + + + + + + + + 4412 + + + + + 2756 + + + + + 2395 + + + + + 2394 + + + + + 2393 + + + + + 2390 + + + + + 2124 + + + + + 1192 + + + + + 1003 + + + + + 1002 + + + + + 999 + + + + + 998 + + + + + 898 + + + + + 92 + + + + + 23 + + + + + 5 + + + + + 5456 + + + YES + + + + + + 5457 + + + YES + + + + + + + + + 5459 + + + YES + + + + + + 5460 + + + YES + + + + + 5497 + + + YES + + + + + + 5498 + + + YES + + + + + + + + + + + + 5499 + + + + + 5500 + + + + + 5501 + + + + + 5502 + + + + + 5503 + + + + + 5504 + + + + + 5505 + + + + + 5514 + + + + + 5515 + + + @@ -11272,11 +11330,6 @@ LCAuLi4 1508.IBEditorWindowLastContentRect 1508.IBPluginDependency 1508.ImportedFromIB2 - 1509.IBPluginDependency - 1509.ImportedFromIB2 - 1510.IBEditorWindowLastContentRect - 1510.IBPluginDependency - 1510.ImportedFromIB2 1511.IBPluginDependency 1511.ImportedFromIB2 1512.IBEditorWindowLastContentRect @@ -11597,25 +11650,6 @@ LCAuLi4 3714.ImportedFromIB2 3914.IBPluginDependency 3914.ImportedFromIB2 - 3915.IBPluginDependency - 3915.ImportedFromIB2 - 3916.IBEditorWindowLastContentRect - 3916.IBPluginDependency - 3916.ImportedFromIB2 - 3917.IBPluginDependency - 3917.ImportedFromIB2 - 3918.IBPluginDependency - 3918.ImportedFromIB2 - 3919.IBPluginDependency - 3919.ImportedFromIB2 - 3920.IBPluginDependency - 3920.ImportedFromIB2 - 3921.IBPluginDependency - 3921.ImportedFromIB2 - 3922.IBPluginDependency - 3922.ImportedFromIB2 - 3923.IBPluginDependency - 3923.ImportedFromIB2 3940.IBPluginDependency 3940.IBViewBoundsToFrameTransform 3940.ImportedFromIB2 @@ -11640,8 +11674,6 @@ LCAuLi4 4258.ImportedFromIB2 4259.IBPluginDependency 4259.ImportedFromIB2 - 4267.IBPluginDependency - 4267.ImportedFromIB2 4272.IBPluginDependency 4272.ImportedFromIB2 4274.IBPluginDependency @@ -12000,6 +12032,36 @@ LCAuLi4 5339.IBPluginDependency 5409.IBPluginDependency 5413.IBPluginDependency + 5456.IBPluginDependency + 5457.IBEditorWindowLastContentRect + 5457.IBPluginDependency + 5459.IBPluginDependency + 5459.ImportedFromIB2 + 5460.IBEditorWindowLastContentRect + 5460.IBPluginDependency + 5460.ImportedFromIB2 + 5497.IBPluginDependency + 5497.ImportedFromIB2 + 5498.IBEditorWindowLastContentRect + 5498.IBPluginDependency + 5498.ImportedFromIB2 + 5499.IBPluginDependency + 5499.ImportedFromIB2 + 5500.IBPluginDependency + 5500.ImportedFromIB2 + 5501.IBPluginDependency + 5501.ImportedFromIB2 + 5502.IBPluginDependency + 5502.ImportedFromIB2 + 5503.IBPluginDependency + 5503.ImportedFromIB2 + 5504.IBPluginDependency + 5504.ImportedFromIB2 + 5505.IBPluginDependency + 5505.ImportedFromIB2 + 5514.IBPluginDependency + 5515.IBPluginDependency + 5515.ImportedFromIB2 56.IBPluginDependency 56.ImportedFromIB2 57.IBEditorWindowLastContentRect @@ -12049,7 +12111,7 @@ LCAuLi4 com.apple.InterfaceBuilder.CocoaPlugin - {{816, 390}, {64, 6}} + {{787, 185}, {64, 6}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -12061,7 +12123,7 @@ LCAuLi4 com.apple.InterfaceBuilder.CocoaPlugin - {{758, 490}, {197, 173}} + {{521, 318}, {197, 173}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -12086,7 +12148,7 @@ LCAuLi4 com.apple.InterfaceBuilder.CocoaPlugin - {{929, 811}, {251, 163}} + {{845, 462}, {251, 163}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -12126,12 +12188,7 @@ LCAuLi4 com.apple.InterfaceBuilder.CocoaPlugin - {{816, 423}, {144, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{816, 460}, {64, 6}} + {{925, 349}, {64, 6}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -12251,7 +12308,7 @@ LCAuLi4 com.apple.InterfaceBuilder.CocoaPlugin - {{873, 380}, {243, 283}} + {{774, 342}, {243, 283}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -12309,7 +12366,7 @@ LCAuLi4 com.apple.InterfaceBuilder.CocoaPlugin - {{838, 533}, {161, 223}} + {{807, 533}, {161, 223}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -12393,14 +12450,14 @@ LCAuLi4 com.apple.InterfaceBuilder.CocoaPlugin - {{487, 663}, {518, 20}} + {{250, 491}, {595, 20}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{816, 300}, {208, 363}} + {{579, 168}, {208, 323}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -12478,25 +12535,6 @@ LCAuLi4 com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - {{816, 293}, {135, 133}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin P4AAAL+AAABCsgAAwvoAAA @@ -12527,8 +12565,6 @@ LCAuLi4 com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -12803,7 +12839,7 @@ LCAuLi4 com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{681, 280}, {222, 383}} + {{444, 108}, {222, 383}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -12858,7 +12894,7 @@ LCAuLi4 com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{631, 570}, {260, 93}} + {{394, 398}, {260, 93}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -12973,6 +13009,36 @@ LCAuLi4 com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + {{636, 418}, {156, 73}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + {{792, 465}, {64, 6}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{792, 308}, {135, 133}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin {{329, 186}, {267, 263}} com.apple.InterfaceBuilder.CocoaPlugin @@ -13029,7 +13095,7 @@ LCAuLi4 - 5416 + 5536 @@ -16094,6 +16160,1595 @@ LCAuLi4 + + YES + + VLCControls + NSObject + + YES + + YES + backward: + forward: + goToSpecificTime: + lockVideosAspectRatio: + loop: + mute: + next: + play: + prev: + quitAfterPlayback: + random: + repeat: + showPosition: + stop: + volumeDown: + volumeSliderUpdated: + volumeUp: + + + YES + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + backward: + forward: + goToSpecificTime: + lockVideosAspectRatio: + loop: + mute: + next: + play: + prev: + quitAfterPlayback: + random: + repeat: + showPosition: + stop: + volumeDown: + volumeSliderUpdated: + volumeUp: + + + YES + + backward: + id + + + forward: + id + + + goToSpecificTime: + id + + + lockVideosAspectRatio: + id + + + loop: + id + + + mute: + id + + + next: + id + + + play: + id + + + prev: + id + + + quitAfterPlayback: + id + + + random: + id + + + repeat: + id + + + showPosition: + id + + + stop: + id + + + volumeDown: + id + + + volumeSliderUpdated: + id + + + volumeUp: + id + + + + + YES + + YES + o_main + o_specificTime_cancel_btn + o_specificTime_enter_fld + o_specificTime_goTo_lbl + o_specificTime_mi + o_specificTime_ok_btn + o_specificTime_sec_lbl + o_specificTime_stepper + o_specificTime_win + + + YES + id + id + id + id + id + id + id + id + id + + + + YES + + YES + o_main + o_specificTime_cancel_btn + o_specificTime_enter_fld + o_specificTime_goTo_lbl + o_specificTime_mi + o_specificTime_ok_btn + o_specificTime_sec_lbl + o_specificTime_stepper + o_specificTime_win + + + YES + + o_main + id + + + o_specificTime_cancel_btn + id + + + o_specificTime_enter_fld + id + + + o_specificTime_goTo_lbl + id + + + o_specificTime_mi + id + + + o_specificTime_ok_btn + id + + + o_specificTime_sec_lbl + id + + + o_specificTime_stepper + id + + + o_specificTime_win + id + + + + + IBDocumentRelativeSource + ../../../../../modules/gui/macosx/controls.h + + + + VLCMainMenu + NSObject + + YES + + YES + addSubtitleFile: + createVideoSnapshot: + floatOnTop: + intfOpenCapture: + intfOpenDisc: + intfOpenFile: + intfOpenFileGeneric: + intfOpenNet: + openDocumentation: + openDonate: + openForum: + openReadMe: + openWebsite: + resizeVideoWindow: + setPlaybackRate: + showAudioEffects: + showBookmarks: + showConvertAndSave: + showInformationPanel: + showLicense: + showTrackSynchronization: + showVideoEffects: + showWizard: + telxNavLink: + telxTransparent: + toggleAtoBloop: + toggleAudioDevice: + toggleFullscreen: + toggleFullscreenDevice: + toggleJumpButtons: + togglePlaylistColumnTable: + togglePlaymodeButtons: + toggleRecord: + toggleSidebar: + toggleVar: + viewAbout: + viewErrorsAndWarnings: + viewHelp: + viewPreferences: + + + YES + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + addSubtitleFile: + createVideoSnapshot: + floatOnTop: + intfOpenCapture: + intfOpenDisc: + intfOpenFile: + intfOpenFileGeneric: + intfOpenNet: + openDocumentation: + openDonate: + openForum: + openReadMe: + openWebsite: + resizeVideoWindow: + setPlaybackRate: + showAudioEffects: + showBookmarks: + showConvertAndSave: + showInformationPanel: + showLicense: + showTrackSynchronization: + showVideoEffects: + showWizard: + telxNavLink: + telxTransparent: + toggleAtoBloop: + toggleAudioDevice: + toggleFullscreen: + toggleFullscreenDevice: + toggleJumpButtons: + togglePlaylistColumnTable: + togglePlaymodeButtons: + toggleRecord: + toggleSidebar: + toggleVar: + viewAbout: + viewErrorsAndWarnings: + viewHelp: + viewPreferences: + + + YES + + addSubtitleFile: + id + + + createVideoSnapshot: + id + + + floatOnTop: + id + + + intfOpenCapture: + id + + + intfOpenDisc: + id + + + intfOpenFile: + id + + + intfOpenFileGeneric: + id + + + intfOpenNet: + id + + + openDocumentation: + id + + + openDonate: + id + + + openForum: + id + + + openReadMe: + id + + + openWebsite: + id + + + resizeVideoWindow: + id + + + setPlaybackRate: + id + + + showAudioEffects: + id + + + showBookmarks: + id + + + showConvertAndSave: + id + + + showInformationPanel: + id + + + showLicense: + id + + + showTrackSynchronization: + id + + + showVideoEffects: + id + + + showWizard: + id + + + telxNavLink: + id + + + telxTransparent: + id + + + toggleAtoBloop: + id + + + toggleAudioDevice: + id + + + toggleFullscreen: + id + + + toggleFullscreenDevice: + id + + + toggleJumpButtons: + id + + + togglePlaylistColumnTable: + id + + + togglePlaymodeButtons: + id + + + toggleRecord: + id + + + toggleSidebar: + id + + + toggleVar: + id + + + viewAbout: + id + + + viewErrorsAndWarnings: + id + + + viewHelp: + id + + + viewPreferences: + id + + + + + YES + + YES + o_about + o_audioeffects + o_bookmarks + o_convertandsave + o_dmi_mute + o_dmi_next + o_dmi_play + o_dmi_previous + o_dmi_stop + o_extMgr + o_mi_AtoBloop + o_mi_about + o_mi_add_intf + o_mi_aspect_ratio + o_mi_audioeffects + o_mi_audiotrack + o_mi_bookmarks + o_mi_bring_atf + o_mi_bwd + o_mi_channels + o_mi_chapter + o_mi_checkForUpdate + o_mi_clear + o_mi_close_window + o_mi_controller + o_mi_convertandsave + o_mi_copy + o_mi_crop + o_mi_cut + o_mi_deinterlace + o_mi_deinterlace_mode + o_mi_device + o_mi_documentation + o_mi_donation + o_mi_double_window + o_mi_errorsAndWarnings + o_mi_extensions + o_mi_ffmpeg_pp + o_mi_fittoscreen + o_mi_floatontop + o_mi_forum + o_mi_fullscreen + o_mi_fwd + o_mi_half_window + o_mi_help + o_mi_hide + o_mi_hide_others + o_mi_info + o_mi_license + o_mi_loop + o_mi_messages + o_mi_minimize + o_mi_mute + o_mi_next + o_mi_normal_window + o_mi_openSubtitleFile + o_mi_open_capture + o_mi_open_disc + o_mi_open_file + o_mi_open_generic + o_mi_open_net + o_mi_open_recent + o_mi_open_wizard + o_mi_paste + o_mi_play + o_mi_player + o_mi_playlist + o_mi_prefs + o_mi_previous + o_mi_program + o_mi_quit + o_mi_quitAfterPB + o_mi_random + o_mi_rate + o_mi_rate_faster_lbl + o_mi_rate_fld + o_mi_rate_lbl + o_mi_rate_lbl_gray + o_mi_rate_normal_lbl + o_mi_rate_sld + o_mi_rate_slower_lbl + o_mi_rate_view + o_mi_readme + o_mi_record + o_mi_repeat + o_mi_screen + o_mi_select_all + o_mi_services + o_mi_show_all + o_mi_snapshot + o_mi_stop + o_mi_subtitle_track + o_mi_teletext + o_mi_teletext_blue + o_mi_teletext_green + o_mi_teletext_index + o_mi_teletext_red + o_mi_teletext_transparent + o_mi_teletext_yellow + o_mi_title + o_mi_toggleJumpButtons + o_mi_togglePlaymodeButtons + o_mi_toggleSidebar + o_mi_trackSynchronization + o_mi_videoeffects + o_mi_videotrack + o_mi_visual + o_mi_vol_down + o_mi_vol_up + o_mi_website + o_mu_add_intf + o_mu_aspect_ratio + o_mu_audio + o_mu_audiotrack + o_mu_channels + o_mu_chapter + o_mu_controls + o_mu_crop + o_mu_deinterlace + o_mu_deinterlace_mode + o_mu_device + o_mu_edit + o_mu_extensions + o_mu_ffmpeg_pp + o_mu_file + o_mu_help + o_mu_playlistTableColumns + o_mu_program + o_mu_screen + o_mu_subtitle_tracks + o_mu_subtitles + o_mu_title + o_mu_video + o_mu_videotrack + o_mu_view + o_mu_visual + o_mu_window + o_trackSynchronization + o_videoeffects + o_vmi_fullscreen + o_vmi_mute + o_vmi_next + o_vmi_play + o_vmi_prev + o_vmi_snapshot + o_vmi_stop + o_vmi_voldown + o_vmi_volup + o_vout_menu + + + YES + id + id + id + id + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + id + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + id + id + id + id + id + id + id + NSView + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenu + NSMenu + NSMenu + NSMenu + NSMenu + NSMenu + NSMenu + NSMenu + NSMenu + NSMenu + NSMenu + NSMenu + NSMenu + NSMenu + NSMenu + NSMenu + NSMenu + NSMenu + NSMenu + NSMenu + NSMenu + NSMenu + NSMenu + NSMenu + NSMenu + NSMenu + NSMenu + id + id + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenu + + + + YES + + YES + o_about + o_audioeffects + o_bookmarks + o_convertandsave + o_dmi_mute + o_dmi_next + o_dmi_play + o_dmi_previous + o_dmi_stop + o_extMgr + o_mi_AtoBloop + o_mi_about + o_mi_add_intf + o_mi_aspect_ratio + o_mi_audioeffects + o_mi_audiotrack + o_mi_bookmarks + o_mi_bring_atf + o_mi_bwd + o_mi_channels + o_mi_chapter + o_mi_checkForUpdate + o_mi_clear + o_mi_close_window + o_mi_controller + o_mi_convertandsave + o_mi_copy + o_mi_crop + o_mi_cut + o_mi_deinterlace + o_mi_deinterlace_mode + o_mi_device + o_mi_documentation + o_mi_donation + o_mi_double_window + o_mi_errorsAndWarnings + o_mi_extensions + o_mi_ffmpeg_pp + o_mi_fittoscreen + o_mi_floatontop + o_mi_forum + o_mi_fullscreen + o_mi_fwd + o_mi_half_window + o_mi_help + o_mi_hide + o_mi_hide_others + o_mi_info + o_mi_license + o_mi_loop + o_mi_messages + o_mi_minimize + o_mi_mute + o_mi_next + o_mi_normal_window + o_mi_openSubtitleFile + o_mi_open_capture + o_mi_open_disc + o_mi_open_file + o_mi_open_generic + o_mi_open_net + o_mi_open_recent + o_mi_open_wizard + o_mi_paste + o_mi_play + o_mi_player + o_mi_playlist + o_mi_prefs + o_mi_previous + o_mi_program + o_mi_quit + o_mi_quitAfterPB + o_mi_random + o_mi_rate + o_mi_rate_faster_lbl + o_mi_rate_fld + o_mi_rate_lbl + o_mi_rate_lbl_gray + o_mi_rate_normal_lbl + o_mi_rate_sld + o_mi_rate_slower_lbl + o_mi_rate_view + o_mi_readme + o_mi_record + o_mi_repeat + o_mi_screen + o_mi_select_all + o_mi_services + o_mi_show_all + o_mi_snapshot + o_mi_stop + o_mi_subtitle_track + o_mi_teletext + o_mi_teletext_blue + o_mi_teletext_green + o_mi_teletext_index + o_mi_teletext_red + o_mi_teletext_transparent + o_mi_teletext_yellow + o_mi_title + o_mi_toggleJumpButtons + o_mi_togglePlaymodeButtons + o_mi_toggleSidebar + o_mi_trackSynchronization + o_mi_videoeffects + o_mi_videotrack + o_mi_visual + o_mi_vol_down + o_mi_vol_up + o_mi_website + o_mu_add_intf + o_mu_aspect_ratio + o_mu_audio + o_mu_audiotrack + o_mu_channels + o_mu_chapter + o_mu_controls + o_mu_crop + o_mu_deinterlace + o_mu_deinterlace_mode + o_mu_device + o_mu_edit + o_mu_extensions + o_mu_ffmpeg_pp + o_mu_file + o_mu_help + o_mu_playlistTableColumns + o_mu_program + o_mu_screen + o_mu_subtitle_tracks + o_mu_subtitles + o_mu_title + o_mu_video + o_mu_videotrack + o_mu_view + o_mu_visual + o_mu_window + o_trackSynchronization + o_videoeffects + o_vmi_fullscreen + o_vmi_mute + o_vmi_next + o_vmi_play + o_vmi_prev + o_vmi_snapshot + o_vmi_stop + o_vmi_voldown + o_vmi_volup + o_vout_menu + + + YES + + o_about + id + + + o_audioeffects + id + + + o_bookmarks + id + + + o_convertandsave + id + + + o_dmi_mute + NSMenuItem + + + o_dmi_next + NSMenuItem + + + o_dmi_play + NSMenuItem + + + o_dmi_previous + NSMenuItem + + + o_dmi_stop + NSMenuItem + + + o_extMgr + id + + + o_mi_AtoBloop + NSMenuItem + + + o_mi_about + NSMenuItem + + + o_mi_add_intf + NSMenuItem + + + o_mi_aspect_ratio + NSMenuItem + + + o_mi_audioeffects + NSMenuItem + + + o_mi_audiotrack + NSMenuItem + + + o_mi_bookmarks + NSMenuItem + + + o_mi_bring_atf + NSMenuItem + + + o_mi_bwd + NSMenuItem + + + o_mi_channels + NSMenuItem + + + o_mi_chapter + NSMenuItem + + + o_mi_checkForUpdate + NSMenuItem + + + o_mi_clear + NSMenuItem + + + o_mi_close_window + NSMenuItem + + + o_mi_controller + NSMenuItem + + + o_mi_convertandsave + NSMenuItem + + + o_mi_copy + NSMenuItem + + + o_mi_crop + NSMenuItem + + + o_mi_cut + NSMenuItem + + + o_mi_deinterlace + NSMenuItem + + + o_mi_deinterlace_mode + NSMenuItem + + + o_mi_device + NSMenuItem + + + o_mi_documentation + NSMenuItem + + + o_mi_donation + NSMenuItem + + + o_mi_double_window + NSMenuItem + + + o_mi_errorsAndWarnings + NSMenuItem + + + o_mi_extensions + NSMenuItem + + + o_mi_ffmpeg_pp + NSMenuItem + + + o_mi_fittoscreen + NSMenuItem + + + o_mi_floatontop + NSMenuItem + + + o_mi_forum + NSMenuItem + + + o_mi_fullscreen + NSMenuItem + + + o_mi_fwd + NSMenuItem + + + o_mi_half_window + NSMenuItem + + + o_mi_help + NSMenuItem + + + o_mi_hide + NSMenuItem + + + o_mi_hide_others + NSMenuItem + + + o_mi_info + NSMenuItem + + + o_mi_license + NSMenuItem + + + o_mi_loop + NSMenuItem + + + o_mi_messages + NSMenuItem + + + o_mi_minimize + NSMenuItem + + + o_mi_mute + NSMenuItem + + + o_mi_next + NSMenuItem + + + o_mi_normal_window + NSMenuItem + + + o_mi_openSubtitleFile + NSMenuItem + + + o_mi_open_capture + NSMenuItem + + + o_mi_open_disc + NSMenuItem + + + o_mi_open_file + NSMenuItem + + + o_mi_open_generic + NSMenuItem + + + o_mi_open_net + NSMenuItem + + + o_mi_open_recent + NSMenuItem + + + o_mi_open_wizard + NSMenuItem + + + o_mi_paste + NSMenuItem + + + o_mi_play + NSMenuItem + + + o_mi_player + NSMenuItem + + + o_mi_playlist + NSMenuItem + + + o_mi_prefs + NSMenuItem + + + o_mi_previous + NSMenuItem + + + o_mi_program + NSMenuItem + + + o_mi_quit + NSMenuItem + + + o_mi_quitAfterPB + NSMenuItem + + + o_mi_random + NSMenuItem + + + o_mi_rate + NSMenuItem + + + o_mi_rate_faster_lbl + id + + + o_mi_rate_fld + id + + + o_mi_rate_lbl + id + + + o_mi_rate_lbl_gray + id + + + o_mi_rate_normal_lbl + id + + + o_mi_rate_sld + id + + + o_mi_rate_slower_lbl + id + + + o_mi_rate_view + NSView + + + o_mi_readme + NSMenuItem + + + o_mi_record + NSMenuItem + + + o_mi_repeat + NSMenuItem + + + o_mi_screen + NSMenuItem + + + o_mi_select_all + NSMenuItem + + + o_mi_services + NSMenuItem + + + o_mi_show_all + NSMenuItem + + + o_mi_snapshot + NSMenuItem + + + o_mi_stop + NSMenuItem + + + o_mi_subtitle_track + NSMenuItem + + + o_mi_teletext + NSMenuItem + + + o_mi_teletext_blue + NSMenuItem + + + o_mi_teletext_green + NSMenuItem + + + o_mi_teletext_index + NSMenuItem + + + o_mi_teletext_red + NSMenuItem + + + o_mi_teletext_transparent + NSMenuItem + + + o_mi_teletext_yellow + NSMenuItem + + + o_mi_title + NSMenuItem + + + o_mi_toggleJumpButtons + NSMenuItem + + + o_mi_togglePlaymodeButtons + NSMenuItem + + + o_mi_toggleSidebar + NSMenuItem + + + o_mi_trackSynchronization + NSMenuItem + + + o_mi_videoeffects + NSMenuItem + + + o_mi_videotrack + NSMenuItem + + + o_mi_visual + NSMenuItem + + + o_mi_vol_down + NSMenuItem + + + o_mi_vol_up + NSMenuItem + + + o_mi_website + NSMenuItem + + + o_mu_add_intf + NSMenu + + + o_mu_aspect_ratio + NSMenu + + + o_mu_audio + NSMenu + + + o_mu_audiotrack + NSMenu + + + o_mu_channels + NSMenu + + + o_mu_chapter + NSMenu + + + o_mu_controls + NSMenu + + + o_mu_crop + NSMenu + + + o_mu_deinterlace + NSMenu + + + o_mu_deinterlace_mode + NSMenu + + + o_mu_device + NSMenu + + + o_mu_edit + NSMenu + + + o_mu_extensions + NSMenu + + + o_mu_ffmpeg_pp + NSMenu + + + o_mu_file + NSMenu + + + o_mu_help + NSMenu + + + o_mu_playlistTableColumns + NSMenu + + + o_mu_program + NSMenu + + + o_mu_screen + NSMenu + + + o_mu_subtitle_tracks + NSMenu + + + o_mu_subtitles + NSMenu + + + o_mu_title + NSMenu + + + o_mu_video + NSMenu + + + o_mu_videotrack + NSMenu + + + o_mu_view + NSMenu + + + o_mu_visual + NSMenu + + + o_mu_window + NSMenu + + + o_trackSynchronization + id + + + o_videoeffects + id + + + o_vmi_fullscreen + NSMenuItem + + + o_vmi_mute + NSMenuItem + + + o_vmi_next + NSMenuItem + + + o_vmi_play + NSMenuItem + + + o_vmi_prev + NSMenuItem + + + o_vmi_snapshot + NSMenuItem + + + o_vmi_stop + NSMenuItem + + + o_vmi_voldown + NSMenuItem + + + o_vmi_volup + NSMenuItem + + + o_vout_menu + NSMenu + + + + + IBDocumentRelativeSource + ../../../../../modules/gui/macosx/MainMenu.h + + + YES diff --git a/modules/gui/macosx/MainMenu.h b/modules/gui/macosx/MainMenu.h index fccc80074d..b525b17c4a 100644 --- a/modules/gui/macosx/MainMenu.h +++ b/modules/gui/macosx/MainMenu.h @@ -143,15 +143,17 @@ IBOutlet NSMenu * o_mu_aspect_ratio; IBOutlet NSMenuItem * o_mi_crop; IBOutlet NSMenu * o_mu_crop; - IBOutlet NSMenuItem * o_mi_subtitle; - IBOutlet NSMenu * o_mu_subtitle; - IBOutlet NSMenuItem * o_mi_addSub; IBOutlet NSMenuItem * o_mi_deinterlace; IBOutlet NSMenu * o_mu_deinterlace; IBOutlet NSMenuItem * o_mi_deinterlace_mode; IBOutlet NSMenu * o_mu_deinterlace_mode; IBOutlet NSMenuItem * o_mi_ffmpeg_pp; IBOutlet NSMenu * o_mu_ffmpeg_pp; + + IBOutlet NSMenu * o_mu_subtitles; + IBOutlet NSMenuItem * o_mi_subtitle_track; + IBOutlet NSMenu * o_mu_subtitle_tracks; + IBOutlet NSMenuItem * o_mi_openSubtitleFile; IBOutlet NSMenuItem * o_mi_teletext; IBOutlet NSMenuItem * o_mi_teletext_transparent; IBOutlet NSMenuItem * o_mi_teletext_index; @@ -245,6 +247,10 @@ - (IBAction)createVideoSnapshot:(id)sender; - (IBAction)toggleFullscreenDevice:(id)sender; +- (IBAction)addSubtitleFile:(id)sender; +- (IBAction)telxTransparent:(id)sender; +- (IBAction)telxNavLink:(id)sender; + - (IBAction)showWizard:(id)sender; - (IBAction)showConvertAndSave:(id)sender; - (IBAction)showVideoEffects:(id)sender; diff --git a/modules/gui/macosx/MainMenu.m b/modules/gui/macosx/MainMenu.m index 72bb19057e..2858584030 100644 --- a/modules/gui/macosx/MainMenu.m +++ b/modules/gui/macosx/MainMenu.m @@ -361,15 +361,17 @@ static VLCMainMenu *_o_sharedInstance = nil; [o_mu_crop setTitle: _NS("Crop")]; [o_mi_screen setTitle: _NS("Fullscreen Video Device")]; [o_mu_screen setTitle: _NS("Fullscreen Video Device")]; - [o_mi_subtitle setTitle: _NS("Subtitle Track")]; - [o_mu_subtitle setTitle: _NS("Subtitle Track")]; - [o_mi_addSub setTitle: _NS("Open File...")]; [o_mi_deinterlace setTitle: _NS("Deinterlace")]; [o_mu_deinterlace setTitle: _NS("Deinterlace")]; [o_mi_deinterlace_mode setTitle: _NS("Deinterlace mode")]; [o_mu_deinterlace_mode setTitle: _NS("Deinterlace mode")]; [o_mi_ffmpeg_pp setTitle: _NS("Post processing")]; [o_mu_ffmpeg_pp setTitle: _NS("Post processing")]; + + [o_mu_subtitles setTitle:_NS("Subtitles")]; + [o_mi_subtitle_track setTitle: _NS("Subtitles Track")]; + [o_mu_subtitle_tracks setTitle: _NS("Subtitles Track")]; + [o_mi_openSubtitleFile setTitle: _NS("Open File...")]; [o_mi_teletext setTitle: _NS("Teletext")]; [o_mi_teletext_transparent setTitle: _NS("Transparent")]; [o_mi_teletext_index setTitle: _NS("Index")]; @@ -493,13 +495,9 @@ static VLCMainMenu *_o_sharedInstance = nil; [self setupVarMenuItem: o_mi_videotrack target: (vlc_object_t *)p_input var: "video-es" selector: @selector(toggleVar:)]; - [self setupVarMenuItem: o_mi_subtitle target: (vlc_object_t *)p_input + [self setupVarMenuItem: o_mi_subtitle_track target: (vlc_object_t *)p_input var: "spu-es" selector: @selector(toggleVar:)]; - /* special case for "Open File" inside the subtitles menu item */ - if ([o_mi_videotrack isEnabled] == YES) - [o_mi_subtitle setEnabled: YES]; - audio_output_t * p_aout = playlist_GetAout(p_playlist); if (p_aout != NULL) { [self setupVarMenuItem: o_mi_channels target: (vlc_object_t *)p_aout @@ -577,7 +575,7 @@ static VLCMainMenu *_o_sharedInstance = nil; [o_mi_audiotrack setEnabled: b_enabled]; [o_mi_visual setEnabled: b_enabled]; [o_mi_videotrack setEnabled: b_enabled]; - [o_mi_subtitle setEnabled: b_enabled]; + [o_mi_subtitle_track setEnabled: b_enabled]; [o_mi_channels setEnabled: b_enabled]; [o_mi_deinterlace setEnabled: b_enabled]; [o_mi_deinterlace_mode setEnabled: b_enabled]; @@ -585,6 +583,11 @@ static VLCMainMenu *_o_sharedInstance = nil; [o_mi_screen setEnabled: b_enabled]; [o_mi_aspect_ratio setEnabled: b_enabled]; [o_mi_crop setEnabled: b_enabled]; +} + +- (void)setSubtitleMenuEnabled:(BOOL)b_enabled +{ + [o_mi_openSubtitleFile setEnabled: b_enabled]; [o_mi_teletext setEnabled: b_enabled]; } @@ -603,6 +606,7 @@ static VLCMainMenu *_o_sharedInstance = nil; [o_mi_rate_lbl setHidden: YES]; [o_mi_rate_lbl_gray setHidden: NO]; } + [self setSubtitleMenuEnabled: b_enabled]; [o_pool release]; } @@ -841,6 +845,86 @@ static VLCMainMenu *_o_sharedInstance = nil; return o_vout_menu; } +#pragma mark - Subtitles Menu +- (IBAction)addSubtitleFile:(id)sender +{ + NSInteger i_returnValue = 0; + input_thread_t * p_input = pl_CurrentInput(VLCIntf); + if (!p_input) + return; + + input_item_t *p_item = input_GetItem(p_input); + if (!p_item) { + vlc_object_release(p_input); + return; + } + + char *path = input_item_GetURI(p_item); + if (!path) + path = strdup(""); + + NSOpenPanel * openPanel = [NSOpenPanel openPanel]; + [openPanel setCanChooseFiles: YES]; + [openPanel setCanChooseDirectories: NO]; + [openPanel setAllowsMultipleSelection: YES]; + [openPanel setAllowedFileTypes: [NSArray arrayWithObjects: @"cdg",@"@idx",@"srt",@"sub",@"utf",@"ass",@"ssa",@"aqt",@"jss",@"psb",@"rt",@"smi",@"txt",@"smil", nil]]; + [openPanel setDirectoryURL:[NSURL fileURLWithPath:[[NSString stringWithUTF8String:path] stringByExpandingTildeInPath]]]; + i_returnValue = [openPanel runModal]; + free(path); + + if (i_returnValue == NSOKButton) { + NSUInteger c = 0; + if (!p_input) + return; + + c = [[openPanel URLs] count]; + + for (int i = 0; i < c ; i++) { + msg_Dbg(VLCIntf, "loading subs from %s", [[[[openPanel URLs] objectAtIndex: i] path] UTF8String]); + if (input_AddSubtitle(p_input, [[[[openPanel URLs] objectAtIndex: i] path] UTF8String], TRUE)) + msg_Warn(VLCIntf, "unable to load subtitles from '%s'", + [[[[openPanel URLs] objectAtIndex: i] path] UTF8String]); + } + } + vlc_object_release(p_input); +} + +- (IBAction)telxTransparent:(id)sender +{ + vlc_object_t *p_vbi; + p_vbi = (vlc_object_t *) vlc_object_find_name(pl_Get(VLCIntf), "zvbi"); + if (p_vbi) { + var_SetBool(p_vbi, "vbi-opaque", [sender state]); + [sender setState: ![sender state]]; + vlc_object_release(p_vbi); + } +} + +- (IBAction)telxNavLink:(id)sender +{ + intf_thread_t * p_intf = VLCIntf; + vlc_object_t *p_vbi; + int i_page = 0; + + if ([[sender title] isEqualToString: _NS("Index")]) + i_page = 'i' << 16; + else if ([[sender title] isEqualToString: _NS("Red")]) + i_page = 'r' << 16; + else if ([[sender title] isEqualToString: _NS("Green")]) + i_page = 'g' << 16; + else if ([[sender title] isEqualToString: _NS("Yellow")]) + i_page = 'y' << 16; + else if ([[sender title] isEqualToString: _NS("Blue")]) + i_page = 'b' << 16; + if (i_page == 0) return; + + p_vbi = (vlc_object_t *) vlc_object_find_name(pl_Get(VLCIntf), "zvbi"); + if (p_vbi) { + var_SetInteger(p_vbi, "vbi-page", i_page); + vlc_object_release(p_vbi); + } +} + #pragma mark - #pragma mark Panels @@ -1143,15 +1227,6 @@ static VLCMainMenu *_o_sharedInstance = nil; [o_menu addItem: [NSMenuItem separatorItem]]; } - /* special case for the subtitles item */ - if ([[o_parent title] isEqualToString: _NS("Subtitle Track")] == YES) { - NSMenuItem * o_lmi_tmp; - o_lmi_tmp = [o_menu addItemWithTitle: _NS("Open File...") action: @selector(addSubtitleFile:) keyEquivalent: @""]; - [o_lmi_tmp setTarget: [[VLCMain sharedInstance] controls]]; - [o_lmi_tmp setEnabled: YES]; - [o_parent setEnabled: YES]; - } - /* Check the type of the object variable */ i_type = var_Type(p_object, psz_variable); @@ -1191,10 +1266,6 @@ static VLCMainMenu *_o_sharedInstance = nil; /* make (un)sensitive */ [o_parent setEnabled: (val_list.p_list->i_count > 1)]; - /* another special case for the subtitles item */ - if ([[o_parent title] isEqualToString: _NS("Subtitle Track")] == YES) - [o_menu addItem: [NSMenuItem separatorItem]]; - for (i = 0; i < val_list.p_list->i_count; i++) { NSMenuItem * o_lmi; NSString *o_title = @""; @@ -1236,13 +1307,6 @@ static VLCMainMenu *_o_sharedInstance = nil; } } - /* special case for the subtitles sub-menu - * In case that we don't have any subs, we don't want a separator item at the end */ - if ([[o_parent title] isEqualToString: _NS("Subtitle Track")] == YES) { - if ([o_menu numberOfItems] == 2) - [o_menu removeItemAtIndex: 1]; - } - /* clean up everything */ if ((i_type & VLC_VAR_TYPE) == VLC_VAR_STRING) free(val.psz_string); var_FreeList(&val_list, &text_list); @@ -1295,9 +1359,8 @@ static VLCMainMenu *_o_sharedInstance = nil; input_thread_t * p_input = playlist_CurrentInput(p_playlist); if ([o_title isEqualToString: _NS("Stop")]) { - if (p_input == NULL) { + if (!p_input) bEnabled = FALSE; - } [self setupMenus]; /* Make sure input menu is up to date */ } else if ([o_title isEqualToString: _NS("Previous")] || [o_title isEqualToString: _NS("Next")]) { @@ -1376,7 +1439,7 @@ static VLCMainMenu *_o_sharedInstance = nil; if (p_input) vlc_object_release(p_input); - return bEnabled ; + return bEnabled; } @end diff --git a/modules/gui/macosx/controls.h b/modules/gui/macosx/controls.h index 6f3b8aa35b..8daccc82d7 100644 --- a/modules/gui/macosx/controls.h +++ b/modules/gui/macosx/controls.h @@ -61,10 +61,7 @@ - (IBAction)showPosition: (id)sender; -- (IBAction)telxTransparent:(id)sender; -- (IBAction)telxNavLink:(id)sender; - (IBAction)lockVideosAspectRatio:(id)sender; -- (IBAction)addSubtitleFile:(id)sender; - (BOOL)keyEvent:(NSEvent *)o_event; diff --git a/modules/gui/macosx/controls.m b/modules/gui/macosx/controls.m index 72607bd867..74b2e091d6 100644 --- a/modules/gui/macosx/controls.m +++ b/modules/gui/macosx/controls.m @@ -56,7 +56,6 @@ [o_specificTime_goTo_lbl setStringValue: _NS("Jump to time")]; } - - (void)dealloc { [[NSNotificationCenter defaultCenter] removeObserver: self]; @@ -165,91 +164,12 @@ } } -- (IBAction)telxTransparent:(id)sender -{ - vlc_object_t *p_vbi; - p_vbi = (vlc_object_t *) vlc_object_find_name(pl_Get(VLCIntf), "zvbi"); - if (p_vbi) { - var_SetBool(p_vbi, "vbi-opaque", [sender state]); - [sender setState: ![sender state]]; - vlc_object_release(p_vbi); - } -} - -- (IBAction)telxNavLink:(id)sender -{ - intf_thread_t * p_intf = VLCIntf; - vlc_object_t *p_vbi; - int i_page = 0; - - if ([[sender title] isEqualToString: _NS("Index")]) - i_page = 'i' << 16; - else if ([[sender title] isEqualToString: _NS("Red")]) - i_page = 'r' << 16; - else if ([[sender title] isEqualToString: _NS("Green")]) - i_page = 'g' << 16; - else if ([[sender title] isEqualToString: _NS("Yellow")]) - i_page = 'y' << 16; - else if ([[sender title] isEqualToString: _NS("Blue")]) - i_page = 'b' << 16; - if (i_page == 0) return; - - p_vbi = (vlc_object_t *) vlc_object_find_name(pl_Get(VLCIntf), "zvbi"); - if (p_vbi) { - var_SetInteger(p_vbi, "vbi-page", i_page); - vlc_object_release(p_vbi); - } -} - - (IBAction)lockVideosAspectRatio:(id)sender { [[VLCCoreInteraction sharedInstance] setAspectRatioIsLocked: ![sender state]]; [sender setState: [[VLCCoreInteraction sharedInstance] aspectRatioIsLocked]]; } -- (IBAction)addSubtitleFile:(id)sender -{ - NSInteger i_returnValue = 0; - input_thread_t * p_input = pl_CurrentInput(VLCIntf); - if (!p_input) - return; - - input_item_t *p_item = input_GetItem(p_input); - if (!p_item) { - vlc_object_release(p_input); - return; - } - - char *path = input_item_GetURI(p_item); - if (!path) - path = strdup(""); - - NSOpenPanel * openPanel = [NSOpenPanel openPanel]; - [openPanel setCanChooseFiles: YES]; - [openPanel setCanChooseDirectories: NO]; - [openPanel setAllowsMultipleSelection: YES]; - [openPanel setAllowedFileTypes: [NSArray arrayWithObjects: @"cdg",@"@idx",@"srt",@"sub",@"utf",@"ass",@"ssa",@"aqt",@"jss",@"psb",@"rt",@"smi",@"txt",@"smil", nil]]; - [openPanel setDirectoryURL:[NSURL fileURLWithPath:[[NSString stringWithUTF8String:path] stringByExpandingTildeInPath]]]; - i_returnValue = [openPanel runModal]; - free(path); - - if (i_returnValue == NSOKButton) { - NSUInteger c = 0; - if (!p_input) - return; - - c = [[openPanel URLs] count]; - - for (int i = 0; i < c ; i++) { - msg_Dbg(VLCIntf, "loading subs from %s", [[[[openPanel URLs] objectAtIndex: i] path] UTF8String]); - if (input_AddSubtitle(p_input, [[[[openPanel URLs] objectAtIndex: i] path] UTF8String], TRUE)) - msg_Warn(VLCIntf, "unable to load subtitles from '%s'", - [[[[openPanel URLs] objectAtIndex: i] path] UTF8String]); - } - } - vlc_object_release(p_input); -} - - (BOOL)keyEvent:(NSEvent *)o_event { BOOL eventHandled = NO;