Commit 676a627a authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

macosx: Use a toolbar to display controls. (Doesn't look like a toolbar though)

Also, make sure we do use the slider.
parent 1b6fc300
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IBClasses</key>
<array>
<dict>
<key>CLASS</key>
<string>VLCTimeField</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSTextField</string>
</dict>
<dict>
<key>CLASS</key>
<string>VLCControllerView</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSView</string>
</dict>
<dict>
<key>CLASS</key>
<string>VLCEmbeddedWindow</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>OUTLETS</key>
<dict>
<key>o_btn_backward</key>
<string>id</string>
<key>o_btn_forward</key>
<string>id</string>
<key>o_btn_fullscreen</key>
<string>id</string>
<key>o_btn_play</key>
<string>id</string>
<key>o_slider</key>
<string>id</string>
<key>o_time</key>
<string>id</string>
<key>o_view</key>
<string>id</string>
</dict>
<key>SUPERCLASS</key>
<string>NSWindow</string>
</dict>
<dict>
<key>CLASS</key>
<string>VLCPlaylistCommon</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>OUTLETS</key>
<dict>
<key>o_outline_view</key>
<string>id</string>
<key>o_tc_author</key>
<string>id</string>
<key>o_tc_duration</key>
<string>id</string>
<key>o_tc_name</key>
<string>id</string>
</dict>
<key>SUPERCLASS</key>
<string>NSObject</string>
</dict>
<dict>
<key>ACTIONS</key>
<dict>
<key>checkForUpdate</key>
<string>id</string>
<key>clearRecentItems</key>
<string>id</string>
<key>intfOpenCapture</key>
<string>id</string>
<key>intfOpenDisc</key>
<string>id</string>
<key>intfOpenFile</key>
<string>id</string>
<key>intfOpenFileGeneric</key>
<string>id</string>
<key>intfOpenNet</key>
<string>id</string>
<key>openCrashLog</key>
<string>id</string>
<key>openDocumentation</key>
<string>id</string>
<key>openDonate</key>
<string>id</string>
<key>openForum</key>
<string>id</string>
<key>openReadMe</key>
<string>id</string>
<key>openRecentItem</key>
<string>id</string>
<key>openWebsite</key>
<string>id</string>
<key>showBookmarks</key>
<string>id</string>
<key>showExtended</key>
<string>id</string>
<key>showInformationPanel</key>
<string>id</string>
<key>showLicense</key>
<string>id</string>
<key>showMessagesPanel</key>
<string>id</string>
<key>showWizard</key>
<string>id</string>
<key>timesliderUpdate</key>
<string>id</string>
<key>togglePlaylist</key>
<string>id</string>
<key>viewAbout</key>
<string>id</string>
<key>viewErrorsAndWarnings</key>
<string>id</string>
<key>viewHelp</key>
<string>id</string>
<key>viewPreferences</key>
<string>id</string>
</dict>
<key>CLASS</key>
<string>VLCMain</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>OUTLETS</key>
<dict>
<key>o_about</key>
<string>id</string>
<key>o_bookmarks</key>
<string>id</string>
<key>o_btn_equalizer</key>
<string>id</string>
<key>o_btn_ff</key>
<string>id</string>
<key>o_btn_fullscreen</key>
<string>id</string>
<key>o_btn_next</key>
<string>id</string>
<key>o_btn_play</key>
<string>id</string>
<key>o_btn_playlist</key>
<string>id</string>
<key>o_btn_prev</key>
<string>id</string>
<key>o_btn_rewind</key>
<string>id</string>
<key>o_btn_stop</key>
<string>id</string>
<key>o_controls</key>
<string>id</string>
<key>o_dmi_mute</key>
<string>id</string>
<key>o_dmi_next</key>
<string>id</string>
<key>o_dmi_play</key>
<string>id</string>
<key>o_dmi_previous</key>
<string>id</string>
<key>o_dmi_stop</key>
<string>id</string>
<key>o_embedded_list</key>
<string>id</string>
<key>o_embedded_window</key>
<string>id</string>
<key>o_extended</key>
<string>id</string>
<key>o_eyetv</key>
<string>id</string>
<key>o_info</key>
<string>id</string>
<key>o_interaction_list</key>
<string>id</string>
<key>o_main_pgbar</key>
<string>id</string>
<key>o_messages</key>
<string>id</string>
<key>o_mi_about</key>
<string>id</string>
<key>o_mi_add_intf</key>
<string>id</string>
<key>o_mi_aspect_ratio</key>
<string>id</string>
<key>o_mi_audiotrack</key>
<string>id</string>
<key>o_mi_bookmarks</key>
<string>id</string>
<key>o_mi_bring_atf</key>
<string>id</string>
<key>o_mi_bwd</key>
<string>id</string>
<key>o_mi_bwd1m</key>
<string>id</string>
<key>o_mi_bwd5m</key>
<string>id</string>
<key>o_mi_channels</key>
<string>id</string>
<key>o_mi_chapter</key>
<string>id</string>
<key>o_mi_checkForUpdate</key>
<string>id</string>
<key>o_mi_clear</key>
<string>id</string>
<key>o_mi_close_window</key>
<string>id</string>
<key>o_mi_controller</key>
<string>id</string>
<key>o_mi_copy</key>
<string>id</string>
<key>o_mi_crop</key>
<string>id</string>
<key>o_mi_cut</key>
<string>id</string>
<key>o_mi_deinterlace</key>
<string>id</string>
<key>o_mi_device</key>
<string>id</string>
<key>o_mi_documentation</key>
<string>id</string>
<key>o_mi_donation</key>
<string>id</string>
<key>o_mi_double_window</key>
<string>id</string>
<key>o_mi_equalizer</key>
<string>id</string>
<key>o_mi_errorsAndWarnings</key>
<string>id</string>
<key>o_mi_extended</key>
<string>id</string>
<key>o_mi_faster</key>
<string>id</string>
<key>o_mi_ffmpeg_pp</key>
<string>id</string>
<key>o_mi_fittoscreen</key>
<string>id</string>
<key>o_mi_floatontop</key>
<string>id</string>
<key>o_mi_forum</key>
<string>id</string>
<key>o_mi_fullscreen</key>
<string>id</string>
<key>o_mi_fwd</key>
<string>id</string>
<key>o_mi_fwd1m</key>
<string>id</string>
<key>o_mi_fwd5m</key>
<string>id</string>
<key>o_mi_half_window</key>
<string>id</string>
<key>o_mi_help</key>
<string>id</string>
<key>o_mi_hide</key>
<string>id</string>
<key>o_mi_hide_others</key>
<string>id</string>
<key>o_mi_info</key>
<string>id</string>
<key>o_mi_license</key>
<string>id</string>
<key>o_mi_loop</key>
<string>id</string>
<key>o_mi_messages</key>
<string>id</string>
<key>o_mi_minimize</key>
<string>id</string>
<key>o_mi_mute</key>
<string>id</string>
<key>o_mi_next</key>
<string>id</string>
<key>o_mi_normal_window</key>
<string>id</string>
<key>o_mi_open_capture</key>
<string>id</string>
<key>o_mi_open_disc</key>
<string>id</string>
<key>o_mi_open_file</key>
<string>id</string>
<key>o_mi_open_generic</key>
<string>id</string>
<key>o_mi_open_net</key>
<string>id</string>
<key>o_mi_open_recent</key>
<string>id</string>
<key>o_mi_open_recent_cm</key>
<string>id</string>
<key>o_mi_open_wizard</key>
<string>id</string>
<key>o_mi_paste</key>
<string>id</string>
<key>o_mi_play</key>
<string>id</string>
<key>o_mi_playlist</key>
<string>id</string>
<key>o_mi_prefs</key>
<string>id</string>
<key>o_mi_previous</key>
<string>id</string>
<key>o_mi_program</key>
<string>id</string>
<key>o_mi_quit</key>
<string>id</string>
<key>o_mi_random</key>
<string>id</string>
<key>o_mi_readme</key>
<string>id</string>
<key>o_mi_repeat</key>
<string>id</string>
<key>o_mi_screen</key>
<string>id</string>
<key>o_mi_select_all</key>
<string>id</string>
<key>o_mi_services</key>
<string>id</string>
<key>o_mi_show_all</key>
<string>id</string>
<key>o_mi_slower</key>
<string>id</string>
<key>o_mi_snapshot</key>
<string>id</string>
<key>o_mi_sprefs</key>
<string>id</string>
<key>o_mi_stop</key>
<string>id</string>
<key>o_mi_subtitle</key>
<string>id</string>
<key>o_mi_title</key>
<string>id</string>
<key>o_mi_videotrack</key>
<string>id</string>
<key>o_mi_visual</key>
<string>id</string>
<key>o_mi_vol_down</key>
<string>id</string>
<key>o_mi_vol_up</key>
<string>id</string>
<key>o_mi_website</key>
<string>id</string>
<key>o_msgs_btn_crashlog</key>
<string>id</string>
<key>o_msgs_panel</key>
<string>id</string>
<key>o_mu_add_intf</key>
<string>id</string>
<key>o_mu_aspect_ratio</key>
<string>id</string>
<key>o_mu_audio</key>
<string>id</string>
<key>o_mu_audiotrack</key>
<string>id</string>
<key>o_mu_channels</key>
<string>id</string>
<key>o_mu_chapter</key>
<string>id</string>
<key>o_mu_controls</key>
<string>id</string>
<key>o_mu_crop</key>
<string>id</string>
<key>o_mu_deinterlace</key>
<string>id</string>
<key>o_mu_device</key>
<string>id</string>
<key>o_mu_edit</key>
<string>id</string>
<key>o_mu_ffmpeg_pp</key>
<string>id</string>
<key>o_mu_file</key>
<string>id</string>
<key>o_mu_help</key>
<string>id</string>
<key>o_mu_program</key>
<string>id</string>
<key>o_mu_screen</key>
<string>id</string>
<key>o_mu_subtitle</key>
<string>id</string>
<key>o_mu_title</key>
<string>id</string>
<key>o_mu_video</key>
<string>id</string>
<key>o_mu_videotrack</key>
<string>id</string>
<key>o_mu_visual</key>
<string>id</string>
<key>o_mu_window</key>
<string>id</string>
<key>o_open</key>
<string>id</string>
<key>o_playlist</key>
<string>id</string>
<key>o_playlist_view</key>
<string>id</string>
<key>o_prefs</key>
<string>id</string>
<key>o_scrollfield</key>
<string>id</string>
<key>o_sprefs</key>
<string>id</string>
<key>o_timefield</key>
<string>id</string>
<key>o_timeslider</key>
<string>id</string>
<key>o_update</key>
<string>id</string>
<key>o_vmi_fullscreen</key>
<string>id</string>
<key>o_vmi_mute</key>
<string>id</string>
<key>o_vmi_next</key>
<string>id</string>
<key>o_vmi_play</key>
<string>id</string>
<key>o_vmi_prev</key>
<string>id</string>
<key>o_vmi_snapshot</key>
<string>id</string>
<key>o_vmi_stop</key>
<string>id</string>
<key>o_vmi_voldown</key>
<string>id</string>
<key>o_vmi_volup</key>
<string>id</string>
<key>o_volumeslider</key>
<string>id</string>
<key>o_vout_menu</key>
<string>id</string>
<key>o_window</key>
<string>id</string>
<key>o_wizard</key>
<string>id</string>
</dict>
<key>SUPERCLASS</key>
<string>NSObject</string>
</dict>
<dict>
<key>CLASS</key>
<string>NSApplication</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSResponder</string>
</dict>
<dict>
<key>CLASS</key>
<string>FirstResponder</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSObject</string>
</dict>
<dict>
<key>CLASS</key>
<string>ITSlider</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSSlider</string>
</dict>
<dict>
<key>CLASS</key>
<string>NSObject</string>
<key>LANGUAGE</key>
<string>ObjC</string>
</dict>
<dict>
<key>ACTIONS</key>
<dict>
<key>backward</key>
<string>id</string>
<key>faster</key>
<string>id</string>
<key>forward</key>
<string>id</string>
<key>goToSpecificTime</key>
<string>id</string>
<key>loop</key>
<string>id</string>
<key>mute</key>
<string>id</string>
<key>next</key>
<string>id</string>
<key>pause</key>
<string>id</string>
<key>play</key>
<string>id</string>
<key>position</key>
<string>id</string>
<key>prev</key>
<string>id</string>
<key>random</key>
<string>id</string>
<key>repeat</key>
<string>id</string>
<key>repeatButtonAction</key>
<string>id</string>
<key>showPosition</key>
<string>id</string>
<key>slower</key>
<string>id</string>
<key>stop</key>
<string>id</string>
<key>toggleVar</key>
<string>id</string>
<key>toogleFullscreen</key>
<string>id</string>
<key>volumeDown</key>
<string>id</string>
<key>volumeSliderUpdated</key>
<string>id</string>
<key>volumeUp</key>
<string>id</string>
<key>windowAction</key>
<string>id</string>
</dict>
<key>CLASS</key>
<string>VLCControls</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>OUTLETS</key>
<dict>
<key>o_btn_addNode</key>
<string>id</string>
<key>o_btn_repeat</key>
<string>id</string>
<key>o_btn_shuffle</key>
<string>id</string>
<key>o_fs_panel</key>
<string>id</string>
<key>o_main</key>
<string>id</string>
<key>o_specificTime_cancel_btn</key>
<string>id</string>
<key>o_specificTime_enter_fld</key>
<string>id</string>
<key>o_specificTime_goTo_lbl</key>
<string>id</string>
<key>o_specificTime_mi</key>
<string>id</string>
<key>o_specificTime_ok_btn</key>
<string>id</string>
<key>o_specificTime_sec_lbl</key>
<string>id</string>
<key>o_specificTime_stepper</key>
<string>id</string>
<key>o_specificTime_win</key>
<string>id</string>
<key>o_volumeslider</key>
<string>id</string>
</dict>
<key>SUPERCLASS</key>
<string>NSObject</string>
</dict>
<dict>
<key>CLASS</key>
<string>VLCPlaylistView</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSOutlineView</string>
</dict>
<dict>
<key>CLASS</key>
<string>VLCVoutView</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>OUTLETS</key>
<dict>
<key>o_window</key>
<string>id</string>
</dict>
<key>SUPERCLASS</key>
<string>NSView</string>
</dict>
<dict>
<key>CLASS</key>
<string>VLCControllerWindow</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSWindow</string>
</dict>
<dict>
<key>CLASS</key>
<string>MPSlider</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSSlider</string>
</dict>
<dict>
<key>CLASS</key>
<string>VLCFSPanel</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSWindow</string>
</dict>
<dict>
<key>CLASS</key>
<string>VLCEmbeddedVoutView</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>VLCVoutView</string>
</dict>
<dict>
<key>ACTIONS</key>
<dict>
<key>bandSliderUpdated</key>
<string>id</string>
<key>changePreset</key>
<string>id</string>
<key>enable</key>
<string>id</string>
<key>preampSliderUpdated</key>
<string>id</string>
<key>toggleWindow</key>
<string>id</string>
<key>twopass</key>
<string>id</string>
</dict>
<key>CLASS</key>
<string>VLCEqualizer</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>OUTLETS</key>
<dict>
<key>o_btn_equalizer</key>
<string>id</string>
<key>o_ckb_2pass</key>
<string>id</string>
<key>o_ckb_enable</key>
<string>id</string>
<key>o_fld_preamp</key>
<string>id</string>
<key>o_popup_presets</key>
<string>id</string>
<key>o_slider_band1</key>
<string>id</string>
<key>o_slider_band10</key>
<string>id</string>
<key>o_slider_band2</key>
<string>id</string>
<key>o_slider_band3</key>
<string>id</string>
<key>o_slider_band4</key>
<string>id</string>
<key>o_slider_band5</key>
<string>id</string>
<key>o_slider_band6</key>
<string>id</string>
<key>o_slider_band7</key>
<string>id</string>
<key>o_slider_band8</key>
<string>id</string>
<key>o_slider_band9</key>
<string>id</string>
<key>o_slider_preamp</key>
<string>id</string>
<key>o_window</key>
<string>id</string>
</dict>
<key>SUPERCLASS</key>
<string>NSObject</string>
</dict>
<dict>
<key>CLASS</key>
<string>VLBrushedMetalImageView</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSImageView</string>
</dict>
<dict>
<key>ACTIONS</key>
<dict>
<key>addNode</key>
<string>id</string>
<key>deleteItem</key>
<string>id</string>
<key>playItem</key>
<string>id</string>
<key>preparseItem</key>
<string>id</string>
<key>recursiveExpandNode</key>
<string>id</string>
<key>savePlaylist</key>
<string>id</string>
<key>searchItem</key>
<string>id</string>
<key>selectAll</key>
<string>id</string>
<key>servicesChange</key>
<string>id</string>
<key>sortNodeByAuthor</key>
<string>id</string>
<key>sortNodeByName</key>
<string>id</string>
</dict>
<key>CLASS</key>
<string>VLCPlaylist</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>OUTLETS</key>
<dict>
<key>o_btn_addNode</key>
<string>id</string>
<key>o_btn_playlist</key>
<string>id</string>
<key>o_controller</key>
<string>id</string>
<key>o_ctx_menu</key>
<string>id</string>
<key>o_mi_addNode</key>
<string>id</string>
<key>o_mi_delete</key>
<string>id</string>
<key>o_mi_info</key>
<string>id</string>
<key>o_mi_play</key>
<string>id</string>
<key>o_mi_preparse</key>
<string>id</string>
<key>o_mi_recursive_expand</key>
<string>id</string>
<key>o_mi_save_playlist</key>
<string>id</string>
<key>o_mi_selectall</key>
<string>id</string>
<key>o_mi_services</key>
<string>id</string>
<key>o_mi_sort_author</key>
<string>id</string>
<key>o_mi_sort_name</key>
<string>id</string>
<key>o_mm_mi_services</key>
<string>id</string>
<key>o_mm_mu_services</key>
<string>id</string>
<key>o_mu_services</key>
<string>id</string>
<key>o_outline_view</key>
<string>id</string>
<key>o_playlist_view</key>
<string>id</string>
<key>o_playlist_wizard</key>
<string>id</string>
<key>o_random_ckb</key>
<string>id</string>
<key>o_save_accessory_popup</key>
<string>id</string>
<key>o_save_accessory_text</key>
<string>id</string>
<key>o_save_accessory_view</key>
<string>id</string>
<key>o_search_field</key>
<string>id</string>
<key>o_status_field</key>
<string>id</string>
<key>o_tc_author</key>
<string>id</string>
<key>o_tc_duration</key>
<string>id</string>
<key>o_tc_name</key>
<string>id</string>
<key>o_tc_sortColumn</key>
<string>id</string>
</dict>
<key>SUPERCLASS</key>
<string>VLCPlaylistCommon</string>
</dict>
<dict>
<key>ACTIONS</key>
<dict>
<key>add</key>
<string>id</string>
<key>clear</key>
<string>id</string>
<key>edit</key>
<string>id</string>
<key>edit_cancel</key>
<string>id</string>
<key>edit_ok</key>
<string>id</string>
<key>extract</key>
<string>id</string>
<key>goToBookmark</key>
<string>id</string>
<key>remove</key>
<string>id</string>
</dict>
<key>CLASS</key>
<string>VLCBookmarks</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>OUTLETS</key>
<dict>
<key>o_bookmarks_window</key>
<string>id</string>
<key>o_btn_add</key>
<string>id</string>
<key>o_btn_clear</key>
<string>id</string>
<key>o_btn_edit</key>
<string>id</string>
<key>o_btn_extract</key>
<string>id</string>
<key>o_btn_rm</key>
<string>id</string>
<key>o_edit_btn_cancel</key>
<string>id</string>
<key>o_edit_btn_ok</key>
<string>id</string>
<key>o_edit_fld_bytes</key>
<string>id</string>
<key>o_edit_fld_name</key>
<string>id</string>
<key>o_edit_fld_time</key>
<string>id</string>
<key>o_edit_lbl_bytes</key>
<string>id</string>
<key>o_edit_lbl_name</key>
<string>id</string>
<key>o_edit_lbl_time</key>
<string>id</string>
<key>o_edit_window</key>
<string>id</string>
<key>o_tbl_dataTable</key>
<string>id</string>
</dict>
<key>SUPERCLASS</key>
<string>NSObject</string>
</dict>
</array>
<key>IBVersion</key>
<string>1</string>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IBFramework Version</key>
<string>667</string>
<key>IBLastKnownRelativeProjectPath</key>
<string>../../vlc.xcodeproj</string>
<key>IBOldestOS</key>
<integer>5</integer>
<key>IBOpenObjects</key>
<array>
<integer>2211</integer>
</array>
<key>IBSystem Version</key>
<string>9E17</string>
<key>targetFramework</key>
<string>IBCocoaFramework</string>
</dict>
</plist>
...@@ -94,6 +94,10 @@ struct intf_sys_t ...@@ -94,6 +94,10 @@ struct intf_sys_t
*****************************************************************************/ *****************************************************************************/
@class AppleRemote; @class AppleRemote;
@class VLCInformation; @class VLCInformation;
@class VLControllerWindow;
@class VLCEmbeddedWindow;
@class VLCControls;
@class VLCPlaylist;
@interface VLCMain : NSObject @interface VLCMain : NSObject
{ {
intf_thread_t *p_intf; /* The main intf object */ intf_thread_t *p_intf; /* The main intf object */
...@@ -121,171 +125,173 @@ struct intf_sys_t ...@@ -121,171 +125,173 @@ struct intf_sys_t
BOOL nib_update_loaded; /* update nibfile */ BOOL nib_update_loaded; /* update nibfile */
BOOL nib_info_loaded; /* information panel nibfile */ BOOL nib_info_loaded; /* information panel nibfile */
IBOutlet id o_window; /* main window */ IBOutlet VLControllerWindow * o_window; /* main window */
IBOutlet id o_playlist_view;/* playlist view */ IBOutlet NSView * o_playlist_view;/* playlist view */
IBOutlet id o_scrollfield; /* info field */ IBOutlet id o_scrollfield; /* info field */
IBOutlet id o_timefield; /* time field */ IBOutlet NSTextField * o_timefield; /* time field */
IBOutlet id o_timeslider; /* time slider */ IBOutlet NSSlider * o_timeslider; /* time slider */
IBOutlet id o_embedded_window; /* Embedded Vout Window */ IBOutlet VLCEmbeddedWindow * o_embedded_window; /* Embedded Vout Window */
float f_slider; /* slider value */ float f_slider; /* slider value */
float f_slider_old; /* old slider val */ float f_slider_old; /* old slider val */
IBOutlet id o_volumeslider; /* volume slider */ IBOutlet NSSlider * o_volumeslider; /* volume slider */
IBOutlet id o_main_pgbar; /* playlist window progress bar */ IBOutlet NSView * toolbarMediaControl; /* view with the controls */
IBOutlet id o_btn_prev; /* btn previous */
IBOutlet id o_btn_rewind; /* btn rewind */ IBOutlet NSProgressIndicator * o_main_pgbar; /* playlist window progress bar */
IBOutlet id o_btn_play; /* btn play */ IBOutlet NSButton * o_btn_prev; /* btn previous */
IBOutlet id o_btn_stop; /* btn stop */ IBOutlet NSButton * o_btn_rewind; /* btn rewind */
IBOutlet id o_btn_ff; /* btn fast forward */ IBOutlet NSButton * o_btn_play; /* btn play */
IBOutlet id o_btn_next; /* btn next */ IBOutlet NSButton * o_btn_stop; /* btn stop */
IBOutlet id o_btn_fullscreen;/* btn fullscreen (embedded vout window) */ IBOutlet NSButton * o_btn_ff; /* btn fast forward */
IBOutlet id o_btn_playlist; /* btn playlist */ IBOutlet NSButton * o_btn_next; /* btn next */
IBOutlet id o_btn_equalizer; /* eq btn */ IBOutlet NSButton * o_btn_fullscreen;/* btn fullscreen (embedded vout window) */
IBOutlet NSButton * o_btn_playlist; /* btn playlist */
IBOutlet NSButton * o_btn_equalizer; /* eq btn */
NSImage * o_img_play; /* btn play img */ NSImage * o_img_play; /* btn play img */
NSImage * o_img_pause; /* btn pause img */ NSImage * o_img_pause; /* btn pause img */
NSImage * o_img_play_pressed; /* btn play img */ NSImage * o_img_play_pressed; /* btn play img */
NSImage * o_img_pause_pressed; /* btn pause img */ NSImage * o_img_pause_pressed; /* btn pause img */
IBOutlet id o_controls; /* VLCControls */ IBOutlet VLCControls * o_controls; /* VLCControls */
IBOutlet id o_playlist; /* VLCPlaylist */ IBOutlet VLCPlaylist * o_playlist; /* VLCPlaylist */
IBOutlet id o_messages; /* messages tv */ IBOutlet id o_messages; /* messages tv */
IBOutlet id o_msgs_panel; /* messages panel */ IBOutlet id o_msgs_panel; /* messages panel */
NSMutableArray * o_msg_arr; /* messages array */ NSMutableArray * o_msg_arr; /* messages array */
NSLock * o_msg_lock; /* messages lock */ NSLock * o_msg_lock; /* messages lock */
IBOutlet id o_msgs_btn_crashlog; /* messages open crashlog */ IBOutlet NSButton * o_msgs_btn_crashlog; /* messages open crashlog */
/* main menu */ /* main menu */
IBOutlet id o_mi_about; IBOutlet NSMenuItem * o_mi_about;
IBOutlet id o_mi_prefs; IBOutlet NSMenuItem * o_mi_prefs;
IBOutlet id o_mi_sprefs; IBOutlet NSMenuItem * o_mi_sprefs;
IBOutlet id o_mi_checkForUpdate; IBOutlet NSMenuItem * o_mi_checkForUpdate;
IBOutlet id o_mi_add_intf; IBOutlet NSMenuItem * o_mi_add_intf;
IBOutlet id o_mu_add_intf; IBOutlet NSMenu * o_mu_add_intf;
IBOutlet id o_mi_services; IBOutlet NSMenuItem * o_mi_services;
IBOutlet id o_mi_hide; IBOutlet NSMenuItem * o_mi_hide;
IBOutlet id o_mi_hide_others; IBOutlet NSMenuItem * o_mi_hide_others;
IBOutlet id o_mi_show_all; IBOutlet NSMenuItem * o_mi_show_all;
IBOutlet id o_mi_quit; IBOutlet NSMenuItem * o_mi_quit;
IBOutlet id o_mu_file; IBOutlet NSMenu * o_mu_file;
IBOutlet id o_mi_open_file; IBOutlet NSMenuItem * o_mi_open_file;
IBOutlet id o_mi_open_generic; IBOutlet NSMenuItem * o_mi_open_generic;
IBOutlet id o_mi_open_disc; IBOutlet NSMenuItem * o_mi_open_disc;
IBOutlet id o_mi_open_net; IBOutlet NSMenuItem * o_mi_open_net;
IBOutlet id o_mi_open_capture; IBOutlet NSMenuItem * o_mi_open_capture;
IBOutlet id o_mi_open_recent; IBOutlet NSMenuItem * o_mi_open_recent;
IBOutlet id o_mi_open_recent_cm; IBOutlet NSMenuItem * o_mi_open_recent_cm;
IBOutlet id o_mi_open_wizard; IBOutlet NSMenuItem * o_mi_open_wizard;
IBOutlet id o_mu_edit; IBOutlet NSMenu * o_mu_edit;
IBOutlet id o_mi_cut; IBOutlet NSMenuItem * o_mi_cut;
IBOutlet id o_mi_copy; IBOutlet NSMenuItem * o_mi_copy;
IBOutlet id o_mi_paste; IBOutlet NSMenuItem * o_mi_paste;
IBOutlet id o_mi_clear; IBOutlet NSMenuItem * o_mi_clear;
IBOutlet id o_mi_select_all; IBOutlet NSMenuItem * o_mi_select_all;
IBOutlet id o_mu_controls; IBOutlet NSMenu * o_mu_controls;
IBOutlet id o_mi_play; IBOutlet NSMenuItem * o_mi_play;
IBOutlet id o_mi_stop; IBOutlet NSMenuItem * o_mi_stop;
IBOutlet id o_mi_faster; IBOutlet NSMenuItem * o_mi_faster;
IBOutlet id o_mi_slower; IBOutlet NSMenuItem * o_mi_slower;
IBOutlet id o_mi_previous; IBOutlet NSMenuItem * o_mi_previous;
IBOutlet id o_mi_next; IBOutlet NSMenuItem * o_mi_next;
IBOutlet id o_mi_random; IBOutlet NSMenuItem * o_mi_random;
IBOutlet id o_mi_repeat; IBOutlet NSMenuItem * o_mi_repeat;
IBOutlet id o_mi_loop; IBOutlet NSMenuItem * o_mi_loop;
IBOutlet id o_mi_fwd; IBOutlet NSMenuItem * o_mi_fwd;
IBOutlet id o_mi_bwd; IBOutlet NSMenuItem * o_mi_bwd;
IBOutlet id o_mi_fwd1m; IBOutlet NSMenuItem * o_mi_fwd1m;
IBOutlet id o_mi_bwd1m; IBOutlet NSMenuItem * o_mi_bwd1m;
IBOutlet id o_mi_fwd5m; IBOutlet NSMenuItem * o_mi_fwd5m;
IBOutlet id o_mi_bwd5m; IBOutlet NSMenuItem * o_mi_bwd5m;
IBOutlet id o_mi_program; IBOutlet NSMenuItem * o_mi_program;
IBOutlet id o_mu_program; IBOutlet NSMenuItem * o_mu_program;
IBOutlet id o_mi_title; IBOutlet NSMenuItem * o_mi_title;
IBOutlet id o_mu_title; IBOutlet NSMenu * o_mu_title;
IBOutlet id o_mi_chapter; IBOutlet NSMenuItem * o_mi_chapter;
IBOutlet id o_mu_chapter; IBOutlet NSMenu * o_mu_chapter;
IBOutlet id o_mu_audio; IBOutlet NSMenu * o_mu_audio;
IBOutlet id o_mi_vol_up; IBOutlet NSMenuItem * o_mi_vol_up;
IBOutlet id o_mi_vol_down; IBOutlet NSMenuItem * o_mi_vol_down;
IBOutlet id o_mi_mute; IBOutlet NSMenuItem * o_mi_mute;
IBOutlet id o_mi_audiotrack; IBOutlet NSMenuItem * o_mi_audiotrack;
IBOutlet id o_mu_audiotrack; IBOutlet NSMenu * o_mu_audiotrack;
IBOutlet id o_mi_channels; IBOutlet NSMenuItem * o_mi_channels;
IBOutlet id o_mu_channels; IBOutlet NSMenu * o_mu_channels;
IBOutlet id o_mi_device; IBOutlet NSMenuItem * o_mi_device;
IBOutlet id o_mu_device; IBOutlet NSMenu * o_mu_device;
IBOutlet id o_mi_visual; IBOutlet NSMenuItem * o_mi_visual;
IBOutlet id o_mu_visual; IBOutlet NSMenu * o_mu_visual;
IBOutlet id o_mu_video; IBOutlet NSMenu * o_mu_video;
IBOutlet id o_mi_half_window; IBOutlet NSMenuItem * o_mi_half_window;
IBOutlet id o_mi_normal_window; IBOutlet NSMenuItem * o_mi_normal_window;
IBOutlet id o_mi_double_window; IBOutlet NSMenuItem * o_mi_double_window;
IBOutlet id o_mi_fittoscreen; IBOutlet NSMenuItem * o_mi_fittoscreen;
IBOutlet id o_mi_fullscreen; IBOutlet NSMenuItem * o_mi_fullscreen;
IBOutlet id o_mi_floatontop; IBOutlet NSMenuItem * o_mi_floatontop;
IBOutlet id o_mi_snapshot; IBOutlet NSMenuItem * o_mi_snapshot;
IBOutlet id o_mi_videotrack; IBOutlet NSMenuItem * o_mi_videotrack;
IBOutlet id o_mu_videotrack; IBOutlet NSMenu * o_mu_videotrack;
IBOutlet id o_mi_screen; IBOutlet NSMenuItem * o_mi_screen;
IBOutlet id o_mu_screen; IBOutlet NSMenu * o_mu_screen;
IBOutlet id o_mi_aspect_ratio; IBOutlet NSMenuItem * o_mi_aspect_ratio;
IBOutlet id o_mu_aspect_ratio; IBOutlet NSMenu * o_mu_aspect_ratio;
IBOutlet id o_mi_crop; IBOutlet NSMenuItem * o_mi_crop;
IBOutlet id o_mu_crop; IBOutlet NSMenu * o_mu_crop;
IBOutlet id o_mi_subtitle; IBOutlet NSMenuItem * o_mi_subtitle;
IBOutlet id o_mu_subtitle; IBOutlet NSMenu * o_mu_subtitle;
IBOutlet id o_mi_deinterlace; IBOutlet NSMenuItem * o_mi_deinterlace;
IBOutlet id o_mu_deinterlace; IBOutlet NSMenu * o_mu_deinterlace;
IBOutlet id o_mi_ffmpeg_pp; IBOutlet NSMenuItem * o_mi_ffmpeg_pp;
IBOutlet id o_mu_ffmpeg_pp; IBOutlet NSMenuItem * o_mu_ffmpeg_pp;
IBOutlet id o_mu_window; IBOutlet NSMenu * o_mu_window;
IBOutlet id o_mi_minimize; IBOutlet NSMenuItem * o_mi_minimize;
IBOutlet id o_mi_close_window; IBOutlet NSMenuItem * o_mi_close_window;
IBOutlet id o_mi_controller; IBOutlet NSMenuItem * o_mi_controller;
IBOutlet id o_mi_equalizer; IBOutlet NSMenuItem * o_mi_equalizer;
IBOutlet id o_mi_extended; IBOutlet NSMenuItem * o_mi_extended;
IBOutlet id o_mi_bookmarks; IBOutlet NSMenuItem * o_mi_bookmarks;
IBOutlet id o_mi_playlist; IBOutlet NSMenuItem * o_mi_playlist;
IBOutlet id o_mi_info; IBOutlet NSMenuItem * o_mi_info;
IBOutlet id o_mi_messages; IBOutlet NSMenuItem * o_mi_messages;
IBOutlet id o_mi_bring_atf; IBOutlet NSMenuItem * o_mi_bring_atf;
IBOutlet id o_mu_help; IBOutlet NSMenu * o_mu_help;
IBOutlet id o_mi_help; IBOutlet NSMenuItem * o_mi_help;
IBOutlet id o_mi_readme; IBOutlet NSMenuItem * o_mi_readme;
IBOutlet id o_mi_documentation; IBOutlet NSMenuItem * o_mi_documentation;
IBOutlet id o_mi_license; IBOutlet NSMenuItem * o_mi_license;
IBOutlet id o_mi_website; IBOutlet NSMenuItem * o_mi_website;
IBOutlet id o_mi_donation; IBOutlet NSMenuItem * o_mi_donation;
IBOutlet id o_mi_forum; IBOutlet NSMenuItem * o_mi_forum;
IBOutlet id o_mi_errorsAndWarnings; IBOutlet NSMenuItem * o_mi_errorsAndWarnings;
/* dock menu */ /* dock menu */
IBOutlet id o_dmi_play; IBOutlet NSMenuItem * o_dmi_play;
IBOutlet id o_dmi_stop; IBOutlet NSMenuItem * o_dmi_stop;
IBOutlet id o_dmi_next; IBOutlet NSMenuItem * o_dmi_next;
IBOutlet id o_dmi_previous; IBOutlet NSMenuItem * o_dmi_previous;
IBOutlet id o_dmi_mute; IBOutlet NSMenuItem * o_dmi_mute;
/* vout menu */ /* vout menu */
IBOutlet id o_vout_menu; IBOutlet NSMenu * o_vout_menu;
IBOutlet id o_vmi_play; IBOutlet NSMenuItem * o_vmi_play;
IBOutlet id o_vmi_stop; IBOutlet NSMenuItem * o_vmi_stop;
IBOutlet id o_vmi_prev; IBOutlet NSMenuItem * o_vmi_prev;
IBOutlet id o_vmi_next; IBOutlet NSMenuItem * o_vmi_next;
IBOutlet id o_vmi_volup; IBOutlet NSMenuItem * o_vmi_volup;
IBOutlet id o_vmi_voldown; IBOutlet NSMenuItem * o_vmi_voldown;
IBOutlet id o_vmi_mute; IBOutlet NSMenuItem * o_vmi_mute;
IBOutlet id o_vmi_fullscreen; IBOutlet NSMenuItem * o_vmi_fullscreen;
IBOutlet id o_vmi_snapshot; IBOutlet NSMenuItem * o_vmi_snapshot;
bool b_small_window; bool b_small_window;
......
...@@ -387,8 +387,9 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -387,8 +387,9 @@ static VLCMain *_o_sharedMainInstance = nil;
if( nib_main_loaded ) return; if( nib_main_loaded ) return;
[self initStrings]; [self initStrings];
[o_window setExcludedFromWindowsMenu: TRUE];
[o_msgs_panel setExcludedFromWindowsMenu: TRUE]; [o_window setExcludedFromWindowsMenu: YES];
[o_msgs_panel setExcludedFromWindowsMenu: YES];
[o_msgs_panel setDelegate: self]; [o_msgs_panel setDelegate: self];
i_key = config_GetInt( p_intf, "key-quit" ); i_key = config_GetInt( p_intf, "key-quit" );
...@@ -509,6 +510,72 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -509,6 +510,72 @@ static VLCMain *_o_sharedMainInstance = nil;
nib_main_loaded = TRUE; nib_main_loaded = TRUE;
} }
#pragma mark Toolbar delegate
/* Our item identifiers */
static NSString * VLCToolbarMediaControl = @"VLCToolbarMediaControl";
- (NSArray *)toolbarAllowedItemIdentifiers:(NSToolbar *)toolbar
{
NSLog(@"toolbarAllowedItemIdentifiers %s", __func__);
return [NSArray arrayWithObjects:
// NSToolbarCustomizeToolbarItemIdentifier,
// NSToolbarFlexibleSpaceItemIdentifier,
// NSToolbarSpaceItemIdentifier,
// NSToolbarSeparatorItemIdentifier,
VLCToolbarMediaControl,
nil ];
}
- (NSArray *) toolbarDefaultItemIdentifiers: (NSToolbar *) toolbar
{
NSLog(@"toolbarAllowedItemIdentifiers %s", __func__);
return [NSArray arrayWithObjects:
VLCToolbarMediaControl,
nil ];
}
- (NSToolbarItem *) toolbar:(NSToolbar *)toolbar itemForItemIdentifier:(NSString *)itemIdentifier willBeInsertedIntoToolbar:(BOOL)flag
{
NSLog(@"toolbarAllowedItemIdentifiers %s", __func__);
NSToolbarItem *toolbarItem = [[[NSToolbarItem alloc] initWithItemIdentifier: itemIdentifier] autorelease];
if( [itemIdentifier isEqual: VLCToolbarMediaControl] )
{
[toolbarItem setLabel:@"Media Controls"];
[toolbarItem setPaletteLabel:@"Media Controls"];
NSSize size = toolbarMediaControl.frame.size;
[toolbarItem setView:toolbarMediaControl];
[toolbarItem setMinSize:size];
size.width += 1000.;
[toolbarItem setMaxSize:size];
// Hack: For some reason we need to make sure
// that the those element are on top
// Add them again will put them frontmost
[toolbarMediaControl addSubview:o_scrollfield];
[toolbarMediaControl addSubview:o_timeslider];
[toolbarMediaControl addSubview:o_timefield];
[toolbarMediaControl addSubview:o_main_pgbar];
/* TODO: setup a menu */
}
else
{
/* itemIdentifier referred to a toolbar item that is not
* provided or supported by us or Cocoa
* Returning nil will inform the toolbar
* that this kind of item is not supported */
toolbarItem = nil;
}
return toolbarItem;
}
#pragma mark -
- (void)controlTintChanged - (void)controlTintChanged
{ {
BOOL b_playing = NO; BOOL b_playing = NO;
...@@ -553,7 +620,7 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -553,7 +620,7 @@ static VLCMain *_o_sharedMainInstance = nil;
- (void)initStrings - (void)initStrings
{ {
[o_window setTitle: _NS("VLC - Controller")]; [o_window setTitle: _NS("VLC")];
[self setScrollField:_NS("VLC media player") stopAfter:-1]; [self setScrollField:_NS("VLC media player") stopAfter:-1];
/* button controls */ /* button controls */
...@@ -1230,11 +1297,20 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -1230,11 +1297,20 @@ static VLCMain *_o_sharedMainInstance = nil;
/* TODO: fix i_size use */ /* TODO: fix i_size use */
b_plmul = p_playlist->items.i_size > 1; b_plmul = p_playlist->items.i_size > 1;
p_input = vlc_object_find( p_playlist, VLC_OBJECT_INPUT, p_input = playlist_CurrentInput( p_playlist );
FIND_CHILD ); bool b_buffering = NO;
if( ( b_input = ( p_input != NULL ) ) ) if( ( b_input = ( p_input != NULL ) ) )
{ {
/* seekable streams */
int state = input_GetState( p_input );
if ( state == INIT_S ||
state == OPENING_S ||
state == BUFFERING_S )
{
b_buffering = YES;
}
/* seekable streams */ /* seekable streams */
b_seekable = var_GetBool( p_input, "seekable" ); b_seekable = var_GetBool( p_input, "seekable" );
...@@ -1247,12 +1323,25 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -1247,12 +1323,25 @@ static VLCMain *_o_sharedMainInstance = nil;
} }
pl_Release( p_intf ); pl_Release( p_intf );
if( b_buffering )
{
[o_main_pgbar startAnimation:self];
[o_main_pgbar setIndeterminate:YES];
[o_main_pgbar setHidden:NO];
}
else
{
[o_main_pgbar stopAnimation:self];
[o_main_pgbar setHidden:YES];
}
[o_btn_stop setEnabled: b_input]; [o_btn_stop setEnabled: b_input];
[o_btn_ff setEnabled: b_seekable]; [o_btn_ff setEnabled: b_seekable];
[o_btn_rewind setEnabled: b_seekable]; [o_btn_rewind setEnabled: b_seekable];
[o_btn_prev setEnabled: (b_plmul || b_chapters)]; [o_btn_prev setEnabled: (b_plmul || b_chapters)];
[o_btn_next setEnabled: (b_plmul || b_chapters)]; [o_btn_next setEnabled: (b_plmul || b_chapters)];
NSLog(@"seekable %d", b_seekable);
[o_timeslider setFloatValue: 0.0]; [o_timeslider setFloatValue: 0.0];
[o_timeslider setEnabled: b_seekable]; [o_timeslider setEnabled: b_seekable];
[o_timefield setStringValue: @"00:00"]; [o_timefield setStringValue: @"00:00"];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment