Changeset 343baae58877c7fd03f834d17d2f9eb6b48ebf03

Show
Ignore:
Timestamp:
13/02/08 18:58:15 (8 months ago)
Author:
Felix Paul Kühne <fkuehne@videolan.org>
git-committer:
Felix Paul Kühne <fkuehne@videolan.org> 1202925495 +0000
git-parent:

[429e624c65d15c4f6c8307c3e2b3eb66a9aaa0cf]

git-author:
Felix Paul Kühne <fkuehne@videolan.org> 1202925495 +0000
Message:

macosx: implemented the Video category of the SimplePrefs? panel. vout module and display device selectors are left as an exercise for the reader.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • extras/package/macosx/Resources/English.lproj/Preferences.nib/classes.nib

    r9f2ffff r343baae  
    44        {CLASS = MPSlider; LANGUAGE = ObjC; SUPERCLASS = NSSlider; },  
    55        {CLASS = NSDatePicker; LANGUAGE = ObjC; SUPERCLASS = NSControl; },  
    6         { 
    7             ACTIONS = {showPanel = id; };  
    8             CLASS = VLAboutBox;  
    9             LANGUAGE = ObjC;  
    10             SUPERCLASS = NSObject;  
    11         },  
    126        {CLASS = VLBrushedMetalImageView; LANGUAGE = ObjC; SUPERCLASS = NSImageView; },  
    137        {CLASS = VLCApplication; LANGUAGE = ObjC; SUPERCLASS = NSApplication; },  
    14         {CLASS = VLCControllerView; LANGUAGE = ObjC; SUPERCLASS = NSView; },  
    158        {CLASS = VLCControllerWindow; LANGUAGE = ObjC; SUPERCLASS = NSWindow; },  
    16         { 
    17             ACTIONS = { 
    18                 backward = id;  
    19                 faster = id;  
    20                 forward = id;  
    21                 loop = id;  
    22                 mute = id;  
    23                 next = id;  
    24                 pause = id;  
    25                 play = id;  
    26                 position = id;  
    27                 prev = id;  
    28                 random = id;  
    29                 repeat = id;  
    30                 slower = id;  
    31                 stop = id;  
    32                 toggleVar = id;  
    33                 volumeDown = id;  
    34                 volumeSliderUpdated = id;  
    35                 volumeUp = id;  
    36                 windowAction = id;  
    37             };  
    38             CLASS = VLCControls;  
    39             LANGUAGE = ObjC;  
    40             OUTLETS = { 
    41                 "o_btn_fullscreen" = id;  
    42                 "o_main" = id;  
    43                 "o_open" = id;  
    44                 "o_volumeslider" = id;  
    45             };  
    46             SUPERCLASS = NSObject;  
    47         },  
    48         { 
    49             ACTIONS = { 
    50                 bandSliderUpdated = id;  
    51                 changePreset = id;  
    52                 enable = id;  
    53                 preampSliderUpdated = id;  
    54                 toggleWindow = id;  
    55                 twopass = id;  
    56             };  
    57             CLASS = VLCEqualizer;  
    58             LANGUAGE = ObjC;  
    59             OUTLETS = { 
    60                 "o_btn_equalizer" = id;  
    61                 "o_ckb_2pass" = id;  
    62                 "o_ckb_enable" = id;  
    63                 "o_fld_preamp" = id;  
    64                 "o_popup_presets" = id;  
    65                 "o_slider_band1" = id;  
    66                 "o_slider_band10" = id;  
    67                 "o_slider_band2" = id;  
    68                 "o_slider_band3" = id;  
    69                 "o_slider_band4" = id;  
    70                 "o_slider_band5" = id;  
    71                 "o_slider_band6" = id;  
    72                 "o_slider_band7" = id;  
    73                 "o_slider_band8" = id;  
    74                 "o_slider_band9" = id;  
    75                 "o_slider_preamp" = id;  
    76                 "o_window" = id;  
    77             };  
    78             SUPERCLASS = NSObject;  
    79         },  
    80         { 
    81             ACTIONS = { 
    82                 createOutlineGroup = id;  
    83                 deleteOutlineGroup = id;  
    84                 infoCancel = id;  
    85                 infoOk = id;  
    86                 toggleInfoPanel = id;  
    87                 togglePlaylistInfoPanel = id;  
    88             };  
    89             CLASS = VLCInfo;  
    90             LANGUAGE = ObjC;  
    91             OUTLETS = { 
    92                 "o_author_lbl" = id;  
    93                 "o_author_txt" = id;  
    94                 "o_btn_cancel" = id;  
    95                 "o_btn_ok" = id;  
    96                 "o_info_window" = id;  
    97                 "o_outline_view" = id;  
    98                 "o_title_lbl" = id;  
    99                 "o_title_txt" = id;  
    100                 "o_uri_lbl" = id;  
    101                 "o_uri_txt" = id;  
    102             };  
    103             SUPERCLASS = NSObject;  
    104         },  
    105         { 
    106             ACTIONS = { 
    107                 clearRecentItems = id;  
    108                 closeError = id;  
    109                 openCrashLog = id;  
    110                 openDocumentation = id;  
    111                 openLicense = id;  
    112                 openReadMe = id;  
    113                 openRecentItem = id;  
    114                 openWebsite = id;  
    115                 reportABug = id;  
    116                 timesliderUpdate = id;  
    117                 viewAbout = id;  
    118                 viewPreferences = id;  
    119             };  
    120             CLASS = VLCMain;  
    121             LANGUAGE = ObjC;  
    122             OUTLETS = { 
    123                 "o_btn_ff" = id;  
    124                 "o_btn_fullscreen" = id;  
    125                 "o_btn_next" = id;  
    126                 "o_btn_play" = id;  
    127                 "o_btn_prev" = id;  
    128                 "o_btn_rewind" = id;  
    129                 "o_btn_stop" = id;  
    130                 "o_controls" = id;  
    131                 "o_dmi_mute" = id;  
    132                 "o_dmi_next" = id;  
    133                 "o_dmi_play" = id;  
    134                 "o_dmi_previous" = id;  
    135                 "o_dmi_stop" = id;  
    136                 "o_err_btn_dismiss" = id;  
    137                 "o_err_btn_msgs" = id;  
    138                 "o_err_bug_lbl" = id;  
    139                 "o_err_ckbk_surpress" = id;  
    140                 "o_err_lbl" = id;  
    141                 "o_err_msg" = id;  
    142                 "o_error" = id;  
    143                 "o_info" = id;  
    144                 "o_messages" = id;  
    145                 "o_mi_about" = id;  
    146                 "o_mi_add_intf" = id;  
    147                 "o_mi_audiotrack" = id;  
    148                 "o_mi_bring_atf" = id;  
    149                 "o_mi_bwd" = id;  
    150                 "o_mi_channels" = id;  
    151                 "o_mi_chapter" = id;  
    152                 "o_mi_clear" = id;  
    153                 "o_mi_close_window" = id;  
    154                 "o_mi_controller" = id;  
    155                 "o_mi_copy" = id;  
    156                 "o_mi_cut" = id;  
    157                 "o_mi_deinterlace" = id;  
    158                 "o_mi_device" = id;  
    159                 "o_mi_documentation" = id;  
    160                 "o_mi_double_window" = id;  
    161                 "o_mi_equalizer" = id;  
    162                 "o_mi_faster" = id;  
    163                 "o_mi_ffmpeg_pp" = id;  
    164                 "o_mi_fittoscreen" = id;  
    165                 "o_mi_floatontop" = id;  
    166                 "o_mi_fullscreen" = id;  
    167                 "o_mi_fwd" = id;  
    168                 "o_mi_half_window" = id;  
    169                 "o_mi_hide" = id;  
    170                 "o_mi_hide_others" = id;  
    171                 "o_mi_info" = id;  
    172                 "o_mi_license" = id;  
    173                 "o_mi_loop" = id;  
    174                 "o_mi_messages" = id;  
    175                 "o_mi_minimize" = id;  
    176                 "o_mi_mute" = id;  
    177                 "o_mi_next" = id;  
    178                 "o_mi_normal_window" = id;  
    179                 "o_mi_open_disc" = id;  
    180                 "o_mi_open_file" = id;  
    181                 "o_mi_open_generic" = id;  
    182                 "o_mi_open_net" = id;  
    183                 "o_mi_open_recent" = id;  
    184                 "o_mi_open_recent_cm" = id;  
    185                 "o_mi_paste" = id;  
    186                 "o_mi_play" = id;  
    187                 "o_mi_playlist" = id;  
    188                 "o_mi_prefs" = id;  
    189                 "o_mi_previous" = id;  
    190                 "o_mi_program" = id;  
    191                 "o_mi_quit" = id;  
    192                 "o_mi_random" = id;  
    193                 "o_mi_readme" = id;  
    194                 "o_mi_repeat" = id;  
    195                 "o_mi_reportabug" = id;  
    196                 "o_mi_screen" = id;  
    197                 "o_mi_select_all" = id;  
    198                 "o_mi_services" = id;  
    199                 "o_mi_show_all" = id;  
    200                 "o_mi_slower" = id;  
    201                 "o_mi_snapshot" = id;  
    202                 "o_mi_stop" = id;  
    203                 "o_mi_subtitle" = id;  
    204                 "o_mi_title" = id;  
    205                 "o_mi_videotrack" = id;  
    206                 "o_mi_visual" = id;  
    207                 "o_mi_vol_down" = id;  
    208                 "o_mi_vol_up" = id;  
    209                 "o_mi_website" = id;  
    210                 "o_msgs_btn_crashlog" = id;  
    211                 "o_msgs_panel" = id;  
    212                 "o_mu_add_intf" = id;  
    213                 "o_mu_audio" = id;  
    214                 "o_mu_audiotrack" = id;  
    215                 "o_mu_channels" = id;  
    216                 "o_mu_chapter" = id;  
    217                 "o_mu_controls" = id;  
    218                 "o_mu_deinterlace" = id;  
    219                 "o_mu_device" = id;  
    220                 "o_mu_edit" = id;  
    221                 "o_mu_ffmpeg_pp" = id;  
    222                 "o_mu_file" = id;  
    223                 "o_mu_help" = id;  
    224                 "o_mu_program" = id;  
    225                 "o_mu_screen" = id;  
    226                 "o_mu_subtitle" = id;  
    227                 "o_mu_title" = id;  
    228                 "o_mu_video" = id;  
    229                 "o_mu_videotrack" = id;  
    230                 "o_mu_visual" = id;  
    231                 "o_mu_window" = id;  
    232                 "o_playlist" = id;  
    233                 "o_prefs" = id;  
    234                 "o_scrollfield" = id;  
    235                 "o_timefield" = id;  
    236                 "o_timeslider" = id;  
    237                 "o_volumeslider" = id;  
    238                 "o_window" = id;  
    239             };  
    240             SUPERCLASS = NSObject;  
    241         },  
    242         { 
    243             ACTIONS = { 
    244                 openDisc = id;  
    245                 openDiscMenusChanged = id;  
    246                 openDiscStepperChanged = id;  
    247                 openDiscTypeChanged = id;  
    248                 openFile = id;  
    249                 openFileBrowse = id;  
    250                 openFileGeneric = id;  
    251                 openFileStreamChanged = id;  
    252                 openNet = id;  
    253                 openNetModeChanged = id;  
    254                 openNetStepperChanged = id;  
    255                 openVTSBrowse = id;  
    256                 panelCancel = id;  
    257                 panelOk = id;  
    258                 subCloseSheet = id;  
    259                 subDelayStepperChanged = id;  
    260                 subFileBrowse = id;  
    261                 subFpsStepperChanged = id;  
    262                 subOverride = id;  
    263                 subSettings = id;  
    264                 subsChanged = id;  
    265             };  
    266             CLASS = VLCOpen;  
    267             LANGUAGE = ObjC;  
    268             OUTLETS = { 
    269                 "o_btn_cancel" = id;  
    270                 "o_btn_ok" = id;  
    271                 "o_disc_chapter" = id;  
    272                 "o_disc_chapter_lbl" = id;  
    273                 "o_disc_chapter_stp" = id;  
    274                 "o_disc_device" = id;  
    275                 "o_disc_device_lbl" = id;  
    276                 "o_disc_dvd_menus" = id;  
    277                 "o_disc_title" = id;  
    278                 "o_disc_title_lbl" = id;  
    279                 "o_disc_title_stp" = id;  
    280                 "o_disc_type" = id;  
    281                 "o_disc_videots_btn_browse" = id;  
    282                 "o_disc_videots_folder" = id;  
    283                 "o_file_btn_browse" = id;  
    284                 "o_file_path" = id;  
    285                 "o_file_stream" = id;  
    286                 "o_file_sub_align_lbl" = id;  
    287                 "o_file_sub_align_pop" = id;  
    288                 "o_file_sub_btn_browse" = id;  
    289                 "o_file_sub_btn_settings" = id;  
    290                 "o_file_sub_ckbox" = id;  
    291                 "o_file_sub_delay" = id;  
    292                 "o_file_sub_delay_lbl" = id;  
    293                 "o_file_sub_delay_stp" = id;  
    294                 "o_file_sub_encoding_lbl" = id;  
    295                 "o_file_sub_encoding_pop" = id;  
    296                 "o_file_sub_file_box" = id;  
    297                 "o_file_sub_font_box" = id;  
    298                 "o_file_sub_fps" = id;  
    299                 "o_file_sub_fps_lbl" = id;  
    300                 "o_file_sub_fps_stp" = id;  
    301                 "o_file_sub_ok_btn" = id;  
    302                 "o_file_sub_override" = id;  
    303                 "o_file_sub_path" = id;  
    304                 "o_file_sub_sheet" = id;  
    305                 "o_file_sub_size_lbl" = id;  
    306                 "o_file_sub_size_pop" = id;  
    307                 "o_mrl" = id;  
    308                 "o_mrl_lbl" = id;  
    309                 "o_net_http_url" = id;  
    310                 "o_net_http_url_lbl" = id;  
    311                 "o_net_mode" = id;  
    312                 "o_net_udp_port" = id;  
    313                 "o_net_udp_port_lbl" = id;  
    314                 "o_net_udp_port_stp" = id;  
    315                 "o_net_udpm_addr" = id;  
    316                 "o_net_udpm_addr_lbl" = id;  
    317                 "o_net_udpm_port" = id;  
    318                 "o_net_udpm_port_lbl" = id;  
    319                 "o_net_udpm_port_stp" = id;  
    320                 "o_output_ckbox" = id;  
    321                 "o_panel" = id;  
    322                 "o_playlist" = id;  
    323                 "o_sout_options" = id;  
    324                 "o_tabview" = id;  
    325             };  
    326             SUPERCLASS = NSObject;  
    327         },  
    328         { 
    329             ACTIONS = { 
    330                 announceChanged = id;  
    331                 outputChanged = id;  
    332                 outputCloseSheet = id;  
    333                 outputFileBrowse = id;  
    334                 outputInfoChanged = id;  
    335                 outputMethodChanged = id;  
    336                 outputSettings = id;  
    337                 streamPortStepperChanged = id;  
    338                 streamTTLStepperChanged = id;  
    339                 transcodeChanged = id;  
    340                 transcodeInfoChanged = id;  
    341             };  
    342             CLASS = VLCOutput;  
    343             LANGUAGE = ObjC;  
    344             OUTLETS = { 
    345                 "o_btn_browse" = id;  
    346                 "o_btn_ok" = id;  
    347                 "o_channel_name" = id;  
    348                 "o_channel_name_lbl" = id;  
    349                 "o_display" = id;  
    350                 "o_dump_chkbox" = id;  
    351                 "o_file_chkbox" = id;  
    352                 "o_file_field" = id;  
    353                 "o_http_chkbox" = id;  
    354                 "o_method" = id;  
    355                 "o_misc_lbl" = id;  
    356                 "o_mux_lbl" = id;  
    357                 "o_mux_selector" = id;  
    358                 "o_open_panel" = id;  
    359                 "o_options_lbl" = id;  
    360                 "o_output_ckbox" = id;  
    361                 "o_output_settings" = id;  
    362                 "o_output_sheet" = id;  
    363                 "o_rtsp_chkbox" = id;  
    364                 "o_sap_chkbox" = id;  
    365                 "o_sdp_url" = id;  
    366                 "o_sdp_url_lbl" = id;  
    367                 "o_slp_chkbox" = id;  
    368                 "o_stream_address" = id;  
    369                 "o_stream_address_lbl" = id;  
    370                 "o_stream_port" = id;  
    371                 "o_stream_port_lbl" = id;  
    372                 "o_stream_port_stp" = id;  
    373                 "o_stream_ttl" = id;  
    374                 "o_stream_ttl_lbl" = id;  
    375                 "o_stream_ttl_stp" = id;  
    376                 "o_stream_type" = id;  
    377                 "o_stream_type_lbl" = id;  
    378                 "o_transcode_audio_bitrate" = id;  
    379                 "o_transcode_audio_bitrate_lbl" = id;  
    380                 "o_transcode_audio_channels" = id;  
    381                 "o_transcode_audio_channels_lbl" = id;  
    382                 "o_transcode_audio_chkbox" = id;  
    383                 "o_transcode_audio_selector" = id;  
    384                 "o_transcode_lbl" = id;  
    385                 "o_transcode_video_bitrate" = id;  
    386                 "o_transcode_video_bitrate_lbl" = id;  
    387                 "o_transcode_video_chkbox" = id;  
    388                 "o_transcode_video_scale" = id;  
    389                 "o_transcode_video_scale_lbl" = id;  
    390                 "o_transcode_video_selector" = id;  
    391             };  
    392             SUPERCLASS = NSObject;  
    393         },  
    394         { 
    395             ACTIONS = { 
    396                 deleteItem = id;  
    397                 handlePopUp = id;  
    398                 playItem = id;  
    399                 searchItem = id;  
    400                 selectAll = id;  
    401                 sortNodeByAuthor = id;  
    402                 sortNodeByName = id;  
    403                 toggleWindow = id;  
    404             };  
    405             CLASS = VLCPlaylist;  
    406             LANGUAGE = ObjC;  
    407             OUTLETS = { 
    408                 "o_btn_playlist" = id;  
    409                 "o_controller" = id;  
    410                 "o_ctx_menu" = id;  
    411                 "o_loop_popup" = id;  
    412                 "o_mi_delete" = id;  
    413                 "o_mi_info" = id;  
    414                 "o_mi_play" = id;  
    415                 "o_mi_save_playlist" = id;  
    416                 "o_mi_selectall" = id;  
    417                 "o_mi_sort_author" = id;  
    418                 "o_mi_sort_name" = id;  
    419                 "o_outline_view" = id;  
    420                 "o_random_ckb" = id;  
    421                 "o_search_field" = id;  
    422                 "o_status_field" = id;  
    423                 "o_tc_author" = id;  
    424                 "o_tc_duration" = id;  
    425                 "o_tc_name" = id;  
    426             };  
    427             SUPERCLASS = NSObject;  
    428         },  
    4299        {CLASS = VLCPlaylistView; LANGUAGE = ObjC; SUPERCLASS = NSOutlineView; },  
    43010        { 
     
    44525        },  
    44626        { 
    447             ACTIONS = {audioSettingChanged = id; buttonAction = id; interfaceSettingChanged = id; };  
     27            ACTIONS = { 
     28                audioSettingChanged = id;  
     29                buttonAction = id;  
     30                interfaceSettingChanged = id;  
     31                videoSettingChanged = id;  
     32            };  
    44833            CLASS = VLCSimplePrefs;  
    44934            LANGUAGE = ObjC;  
     
    47459                "o_intf_art_pop" = id;  
    47560                "o_intf_art_txt" = id;  
     61                "o_intf_embedded_ckb" = id;  
    47662                "o_intf_fspanel_ckb" = id;  
    47763                "o_intf_lang_pop" = id;  
     
    48773                "o_sprefs_save_btn" = id;  
    48874                "o_sprefs_win" = id;  
     75                "o_video_black_ckb" = id;  
     76                "o_video_device_pop" = id;  
     77                "o_video_device_txt" = id;  
     78                "o_video_display_box" = id;  
     79                "o_video_enable_ckb" = id;  
     80                "o_video_fullscreen_ckb" = id;  
     81                "o_video_onTop_ckb" = id;  
     82                "o_video_output_pop" = id;  
     83                "o_video_output_txt" = id;  
     84                "o_video_skipFrames_ckb" = id;  
     85                "o_video_snap_box" = id;  
     86                "o_video_snap_folder_btn" = id;  
     87                "o_video_snap_folder_fld" = id;  
     88                "o_video_snap_folder_txt" = id;  
     89                "o_video_snap_format_pop" = id;  
     90                "o_video_snap_format_txt" = id;  
     91                "o_video_snap_prefix_fld" = id;  
     92                "o_video_snap_prefix_txt" = id;  
     93                "o_video_snap_seqnum_ckb" = id;  
     94                "o_video_view" = id;  
    48995            };  
    49096            SUPERCLASS = NSObject;  
  • extras/package/macosx/Resources/English.lproj/Preferences.nib/info.nib

    r9f2ffff r343baae  
    44<dict> 
    55    <key>IBDocumentLocation</key> 
    6     <string>-145 -8 505 518 0 0 1280 778 </string> 
     6    <string>113 117 505 518 0 0 1280 778 </string> 
    77    <key>IBEditorPositions</key> 
    88    <dict> 
    99        <key>2311</key> 
    10         <string>345 417 590 241 0 0 1280 778 </string> 
     10        <string>345 406 590 264 0 0 1280 778 </string> 
    1111        <key>2330</key> 
    12         <string>345 266 590 502 0 0 1280 778 </string> 
     12        <string>450 263 590 502 0 0 1280 778 </string> 
    1313        <key>2440</key> 
    14         <string>179 151 586 376 0 0 1280 778 </string> 
     14        <string>345 343 590 389 0 0 1280 778 </string> 
    1515    </dict> 
    1616    <key>IBFramework Version</key> 
     
    3535    <key>IBOpenObjects</key> 
    3636    <array> 
     37        <integer>2311</integer> 
     38        <integer>2440</integer> 
     39        <integer>2265</integer> 
    3740        <integer>2330</integer> 
    38         <integer>2265</integer> 
    39         <integer>2311</integer> 
    4041    </array> 
    4142    <key>IBSystem Version</key> 
  • modules/gui/macosx/prefs.m

    r9f2ffff r343baae  
    394394 
    395395                if( !p_item ) continue; 
     396                if( !p_item->i_type ) break; 
    396397                int i_category = -1; 
    397398                int i_subcategory = -1; 
  • modules/gui/macosx/simple_prefs.h

    r8e64cfd r343baae  
    5151    IBOutlet id o_audio_vol_sld; 
    5252    IBOutlet id o_audio_vol_txt; 
     53 
    5354    IBOutlet id o_intf_art_pop; 
    5455    IBOutlet id o_intf_art_txt; 
     56    IBOutlet id o_intf_embedded_ckb; 
    5557    IBOutlet id o_intf_fspanel_ckb; 
    5658    IBOutlet id o_intf_lang_pop; 
     
    5961    IBOutlet id o_intf_network_box; 
    6062    IBOutlet id o_intf_view; 
     63 
    6164    IBOutlet id o_sprefs_basic_box; 
    6265    IBOutlet id o_sprefs_basicFull_matrix; 
     
    6770    IBOutlet id o_sprefs_win; 
    6871 
     72    IBOutlet id o_video_black_ckb; 
     73    IBOutlet id o_video_device_pop; 
     74    IBOutlet id o_video_device_txt; 
     75    IBOutlet id o_video_display_box; 
     76    IBOutlet id o_video_enable_ckb; 
     77    IBOutlet id o_video_fullscreen_ckb; 
     78    IBOutlet id o_video_onTop_ckb; 
     79    IBOutlet id o_video_output_pop; 
     80    IBOutlet id o_video_output_txt; 
     81    IBOutlet id o_video_skipFrames_ckb; 
     82    IBOutlet id o_video_snap_box; 
     83    IBOutlet id o_video_snap_folder_btn; 
     84    IBOutlet id o_video_snap_folder_fld; 
     85    IBOutlet id o_video_snap_folder_txt; 
     86    IBOutlet id o_video_snap_format_pop; 
     87    IBOutlet id o_video_snap_format_txt; 
     88    IBOutlet id o_video_snap_prefix_fld; 
     89    IBOutlet id o_video_snap_prefix_txt; 
     90    IBOutlet id o_video_snap_seqnum_ckb; 
     91    IBOutlet id o_video_view; 
     92 
    6993    BOOL b_audioSettingChanged; 
    7094    BOOL b_intfSettingChanged; 
     95    BOOL b_videoSettingChanged; 
    7196    id o_currentlyShownCategoryView; 
    7297     
    7398    NSToolbar *o_sprefs_toolbar; 
     99    NSOpenPanel *o_selectFolderPanel; 
    74100     
    75101    intf_thread_t *p_intf; 
     
    77103+ (VLCSimplePrefs *)sharedInstance; 
    78104 
     105/* toolbar */ 
    79106- (NSToolbarItem *) toolbar: (NSToolbar *)o_toolbar  
    80107      itemForItemIdentifier: (NSString *)o_itemIdent  
     
    103130 
    104131/* video */ 
     132- (IBAction)videoSettingChanged:(id)sender; 
     133- (void)showVideoSettings; 
    105134 
    106135/* subtitles */ 
  • modules/gui/macosx/simple_prefs.m

    r8e64cfd r343baae  
    2828static NSString* VLCIntfSettingToolbarIdentifier = @"Intf Settings Item Identifier"; 
    2929static NSString* VLCAudioSettingToolbarIdentifier = @"Audio Settings Item Identifier"; 
     30static NSString* VLCVideoSettingToolbarIdentifier = @"Video Settings Item Identifier"; 
    3031 
    3132@implementation VLCSimplePrefs 
     
    112113        [o_toolbarItem setAutovalidates: YES]; 
    113114    } 
     115    else if( [o_itemIdent isEqual: VLCVideoSettingToolbarIdentifier] ) 
     116    { 
     117        o_toolbarItem = [[[NSToolbarItem alloc] initWithItemIdentifier: o_itemIdent] autorelease]; 
     118         
     119        [o_toolbarItem setLabel: _NS("Video")]; 
     120        [o_toolbarItem setPaletteLabel: _NS("General Video settings")]; 
     121         
     122        [o_toolbarItem setToolTip: _NS("General Video settings")]; 
     123        [o_toolbarItem setImage: [NSImage imageNamed: @"spref_cone_Video_64"]]; 
     124         
     125        [o_toolbarItem setTarget: self]; 
     126        [o_toolbarItem setAction: @selector(showVideoSettings)]; 
     127         
     128        [o_toolbarItem setEnabled: YES]; 
     129        [o_toolbarItem setAutovalidates: YES]; 
     130    } 
    114131     
    115132    return o_toolbarItem; 
     
    118135- (NSArray *)toolbarDefaultItemIdentifiers: (NSToolbar *)toolbar 
    119136{ 
    120     return [NSArray arrayWithObjects: VLCIntfSettingToolbarIdentifier, VLCAudioSettingToolbarIdentifier, NSToolbarFlexibleSpaceItemIdentifier, nil]; 
     137    return [NSArray arrayWithObjects: VLCIntfSettingToolbarIdentifier, VLCAudioSettingToolbarIdentifier, VLCVideoSettingToolbarIdentifier, NSToolbarFlexibleSpaceItemIdentifier, nil]; 
    121138} 
    122139 
    123140- (NSArray *)toolbarAllowedItemIdentifiers: (NSToolbar *)toolbar 
    124141{ 
    125     return [NSArray arrayWithObjects: VLCIntfSettingToolbarIdentifier, VLCAudioSettingToolbarIdentifier, NSToolbarFlexibleSpaceItemIdentifier, nil]; 
     142    return [NSArray arrayWithObjects: VLCIntfSettingToolbarIdentifier, VLCAudioSettingToolbarIdentifier, VLCVideoSettingToolbarIdentifier, NSToolbarFlexibleSpaceItemIdentifier, nil]; 
    126143} 
    127144 
    128145- (NSArray *)toolbarSelectableItemIdentifiers:(NSToolbar *)toolbar 
    129146{ 
    130     return [NSArray arrayWithObjects: VLCIntfSettingToolbarIdentifier, VLCAudioSettingToolbarIdentifier, nil]; 
     147    return [NSArray arrayWithObjects: VLCIntfSettingToolbarIdentifier, VLCAudioSettingToolbarIdentifier, VLCVideoSettingToolbarIdentifier, nil]; 
    131148} 
    132149 
    133150- (void)initStrings 
    134151{ 
    135     [o_sprefs_reset_btn setEnabled: NO]; 
    136152    msg_Warn( p_intf, "localisation of the simple preferences not implemented!" ); 
    137153} 
     
    140156{ 
    141157    module_config_t *p_item; 
    142     int i, y
     158    int i, y = 0
    143159    char *psz_tmp; 
    144160 
     
    165181    [o_intf_meta_ckb setState: config_GetInt( p_intf, "fetch-meta" )]; 
    166182    [o_intf_fspanel_ckb setState: config_GetInt( p_intf, "macosx-fspanel" )]; 
     183    [o_intf_embedded_ckb setState: config_GetInt( p_intf, "embeded-video" )]; 
    167184 
    168185 
     
    210227     * video settings * 
    211228     ******************/ 
    212      
     229    [o_video_enable_ckb setState: config_GetInt( p_intf, "video" )]; 
     230    [o_video_fullscreen_ckb setState: config_GetInt( p_intf, "fullscreen" )]; 
     231    [o_video_onTop_ckb setState: config_GetInt( p_intf, "video-on-top" )]; 
     232    [o_video_skipFrames_ckb setState: config_GetInt( p_intf, "skip-frames" )]; 
     233    [o_video_black_ckb setState: config_GetInt( p_intf, "macosx-black" )]; 
     234 
     235    msg_Warn( p_intf, "vout module and display device selectors not implemented!" ); 
     236 
     237    if( config_GetPsz( p_intf, "snapshot-path" ) != NULL ) 
     238        [o_video_snap_folder_fld setStringValue: [NSString stringWithUTF8String: config_GetPsz( p_intf, "snapshot-path" )]]; 
     239    [o_video_snap_prefix_fld setStringValue: [NSString stringWithUTF8String: config_GetPsz( p_intf, "snapshot-prefix" )]]; 
     240    [o_video_snap_seqnum_ckb setState: config_GetInt( p_intf, "snapshot-sequential" )]; 
     241    [o_video_snap_format_pop removeAllItems]; 
     242    p_item = config_FindConfig( VLC_OBJECT(p_intf), "snapshot-format" ); 
     243    for( i = 0; p_item->ppsz_list[i] != nil; i++ ) 
     244    { 
     245        [o_video_snap_format_pop addItemWithTitle: [NSString stringWithUTF8String: p_item->ppsz_list[i]]]; 
     246        if( p_item->value.psz && !strcmp( p_item->value.psz, p_item->ppsz_list[i] ) ) 
     247            y = i; 
     248    } 
     249    [o_video_snap_format_pop selectItemAtIndex: y]; 
     250 
    213251    /******************* 
    214252     * codecs settings * 
     
    297335        config_PutInt( p_intf, "fetch-meta", [o_intf_meta_ckb state] ); 
    298336        config_PutInt( p_intf, "macosx-fspanel", [o_intf_fspanel_ckb state] ); 
     337        config_PutInt( p_intf, "video-embeded", [o_intf_embedded_ckb state] ); 
    299338 
    300339        /* okay, let's save our changes to vlcrc */ 
     
    303342 
    304343        if( i != 0 ) 
    305             msg_Err( p_intf, "An error occured while saving the Audio settings using SimplePrefs" ); 
     344        { 
     345            msg_Err( p_intf, "An error occured while saving the Interface settings using SimplePrefs" ); 
     346            i = 0; 
     347        } 
    306348 
    307349        b_intfSettingChanged = NO; 
     
    346388        msg_Warn( p_intf, "visualizer not implemented!" ); 
    347389 
    348         if( [o_audio_last_ckb state] == NSOnState ) 
    349             config_AddIntf( VLC_OBJECT( p_intf ), "audioscrobbler" ); 
    350         else 
    351             config_RemoveIntf( VLC_OBJECT( p_intf ), "audioscrobbler" ); 
    352  
    353         config_PutPsz( p_intf, "lastfm-username", [[o_audio_lastuser_fld stringValue] UTF8String] ); 
    354         config_PutPsz( p_intf, "lastfm-password", [[o_audio_lastuser_fld stringValue] UTF8String] ); 
     390        /* Last.FM is optional */ 
     391        if( module_Exists( p_intf, "audioscrobbler" ) ) 
     392        {             
     393            if( [o_audio_last_ckb state] == NSOnState ) 
     394                config_AddIntf( VLC_OBJECT( p_intf ), "audioscrobbler" ); 
     395            else 
     396                config_RemoveIntf( VLC_OBJECT( p_intf ), "audioscrobbler" ); 
     397 
     398            config_PutPsz( p_intf, "lastfm-username", [[o_audio_lastuser_fld stringValue] UTF8String] ); 
     399            config_PutPsz( p_intf, "lastfm-password", [[o_audio_lastuser_fld stringValue] UTF8String] ); 
     400        } 
    355401 
    356402        /* okay, let's save our changes to vlcrc */ 
     
    360406 
    361407        if( i != 0 ) 
     408        { 
    362409            msg_Err( p_intf, "An error occured while saving the Audio settings using SimplePrefs" ); 
     410            i = 0; 
     411        } 
    363412        b_audioSettingChanged = NO; 
    364413    } 
     414     
     415    /****************** 
     416     * video settings * 
     417     ******************/ 
     418    if( b_videoSettingChanged ) 
     419    { 
     420        config_PutInt( p_intf, "video", [o_video_enable_ckb state] ); 
     421        config_PutInt( p_intf, "fullscreen", [o_video_fullscreen_ckb state] ); 
     422        config_PutInt( p_intf, "video-on-top", [o_video_onTop_ckb state] ); 
     423        config_PutInt( p_intf, "skip-frames", [o_video_skipFrames_ckb state] ); 
     424        config_PutInt( p_intf, "macosx-black", [o_video_black_ckb state] ); 
     425 
     426        msg_Warn( p_intf, "vout module and display device selectors not implemented!" ); 
     427 
     428        config_PutPsz( p_intf, "snapshot-path", [[o_video_snap_folder_fld stringValue] UTF8String] ); 
     429        config_PutPsz( p_intf, "snapshot-prefix", [[o_video_snap_prefix_fld stringValue] UTF8String] ); 
     430        config_PutInt( p_intf, "snapshot-sequential", [o_video_snap_seqnum_ckb state] ); 
     431 
     432        if( [o_video_snap_format_pop indexOfSelectedItem] >= 0 ) 
     433            config_PutPsz( p_intf, "snapshot-format", [[[o_video_snap_format_pop selectedItem] title] UTF8String] ); 
     434 
     435        i = config_SaveConfigFile( p_intf, "main" ); 
     436        i = i + config_SaveConfigFile( p_intf, "macosx" ); 
     437         
     438        if( i != 0 ) 
     439        { 
     440            msg_Err( p_intf, "An error occured while saving the Video settings using SimplePrefs" ); 
     441            i = 0; 
     442        } 
     443        b_videoSettingChanged = NO; 
     444    } 
    365445} 
    366446 
    367447- (void)showSettingsForCategory: (id)o_new_category_view 
    368448{ 
    369     msg_Dbg( p_intf, "switching to another category" ); 
    370449    NSRect o_win_rect, o_view_rect, o_old_view_rect; 
    371450    o_win_rect = [o_sprefs_win frame]; 
     
    428507    [self showSettingsForCategory: o_audio_view]; 
    429508} 
     509 
     510- (IBAction)videoSettingChanged:(id)sender 
     511{ 
     512    if( sender == o_video_snap_folder_btn ) 
     513    { 
     514        o_selectFolderPanel = [[NSOpenPanel alloc] init]; 
     515        [o_selectFolderPanel setCanChooseDirectories: YES]; 
     516        [o_selectFolderPanel setCanChooseFiles: NO]; 
     517        [o_selectFolderPanel setResolvesAliases: YES]; 
     518        [o_selectFolderPanel setAllowsMultipleSelection: NO]; 
     519        [o_selectFolderPanel setMessage: _NS("Choose the Folder to save your video snapshots to.")]; 
     520        [o_selectFolderPanel setCanCreateDirectories: YES]; 
     521        [o_selectFolderPanel setPrompt: _NS("Choose")]; 
     522        [o_selectFolderPanel beginSheetForDirectory: nil file: nil modalForWindow: o_sprefs_win  
     523                                      modalDelegate: self  
     524                                     didEndSelector: @selector(savePanelDidEnd:returnCode:contextInfo:) 
     525                                        contextInfo: nil]; 
     526    } 
     527    else 
     528        b_videoSettingChanged = YES; 
     529} 
     530 
     531- (void)savePanelDidEnd:(NSOpenPanel * )panel returnCode: (int)returnCode contextInfo: (void *)contextInfo 
     532{ 
     533    if( returnCode == NSOKButton ) 
     534    { 
     535        [o_video_snap_folder_fld setStringValue: [o_selectFolderPanel filename]]; 
     536        b_videoSettingChanged = YES; 
     537    } 
     538 
     539    [o_selectFolderPanel release]; 
     540} 
     541 
     542- (void)showVideoSettings 
     543{ 
     544    msg_Dbg( p_intf, "showing video settings" ); 
     545    [self showSettingsForCategory: o_video_view]; 
     546} 
    430547@end