]> git.sesse.net Git - vlc/blob - modules/gui/macosx/simple_prefs.m
qt4/macosx: fixed the embedded vout setting
[vlc] / modules / gui / macosx / simple_prefs.m
1 /*****************************************************************************
2 * simple_prefs.m: Simple Preferences for Mac OS X
3 *****************************************************************************
4 * Copyright (C) 2008 the VideoLAN team
5 * $Id$
6 *
7 * Authors: Felix Paul Kühne <fkuehne at videolan dot org>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22 *****************************************************************************/
23
24 #import "simple_prefs.h"
25 #import "prefs.h"
26
27 static NSString* VLCSPrefsToolbarIdentifier = @"Our Simple Preferences Toolbar Identifier";
28 static NSString* VLCIntfSettingToolbarIdentifier = @"Intf Settings Item Identifier";
29 static NSString* VLCAudioSettingToolbarIdentifier = @"Audio Settings Item Identifier";
30 static NSString* VLCVideoSettingToolbarIdentifier = @"Video Settings Item Identifier";
31
32 @implementation VLCSimplePrefs
33
34 static VLCSimplePrefs *_o_sharedInstance = nil;
35
36 + (VLCSimplePrefs *)sharedInstance
37 {
38     return _o_sharedInstance ? _o_sharedInstance : [[self alloc] init];
39 }
40
41 - (id)init
42 {
43     if (_o_sharedInstance) {
44         [self dealloc];
45     } else {
46         p_intf = VLCIntf;
47         _o_sharedInstance = [super init];
48     }
49     
50     return _o_sharedInstance;
51 }
52
53 - (void)dealloc
54 {
55     [o_currentlyShownCategoryView release];
56     [o_sprefs_toolbar release];
57     
58     [super dealloc];
59 }
60
61 - (void)awakeFromNib
62 {
63     [self initStrings];
64
65     [self resetControls];
66     
67     /* setup the toolbar */
68     o_sprefs_toolbar = [[[NSToolbar alloc] initWithIdentifier: VLCSPrefsToolbarIdentifier] autorelease];
69     [o_sprefs_toolbar setAllowsUserCustomization: NO];
70     [o_sprefs_toolbar setAutosavesConfiguration: NO];
71     [o_sprefs_toolbar setDisplayMode: NSToolbarDisplayModeIconAndLabel];
72     [o_sprefs_toolbar setSizeMode: NSToolbarSizeModeRegular];
73     [o_sprefs_toolbar setDelegate: self];
74     [o_sprefs_win setToolbar: o_sprefs_toolbar];
75 }
76
77 - (NSToolbarItem *) toolbar: (NSToolbar *)o_sprefs_toolbar 
78       itemForItemIdentifier: (NSString *)o_itemIdent 
79   willBeInsertedIntoToolbar: (BOOL)b_willBeInserted
80 {
81     NSToolbarItem *o_toolbarItem = nil;
82     
83     if( [o_itemIdent isEqual: VLCIntfSettingToolbarIdentifier] )
84     {
85         o_toolbarItem = [[[NSToolbarItem alloc] initWithItemIdentifier: o_itemIdent] autorelease];
86
87         [o_toolbarItem setLabel: _NS("Interface")];
88         [o_toolbarItem setPaletteLabel: _NS("Interface settings")];
89
90         [o_toolbarItem setToolTip: _NS("Interface settings")];
91         [o_toolbarItem setImage: [NSImage imageNamed: @"spref_cone_Interface_64"]];
92
93         [o_toolbarItem setTarget: self];
94         [o_toolbarItem setAction: @selector(showInterfaceSettings)];
95
96         [o_toolbarItem setEnabled: YES];
97         [o_toolbarItem setAutovalidates: YES];
98     }
99     else if( [o_itemIdent isEqual: VLCAudioSettingToolbarIdentifier] )
100     {
101         o_toolbarItem = [[[NSToolbarItem alloc] initWithItemIdentifier: o_itemIdent] autorelease];
102
103         [o_toolbarItem setLabel: _NS("Audio")];
104         [o_toolbarItem setPaletteLabel: _NS("General Audio settings")];
105
106         [o_toolbarItem setToolTip: _NS("General Audio settings")];
107         [o_toolbarItem setImage: [NSImage imageNamed: @"spref_cone_Audio_64"]];
108
109         [o_toolbarItem setTarget: self];
110         [o_toolbarItem setAction: @selector(showAudioSettings)];
111
112         [o_toolbarItem setEnabled: YES];
113         [o_toolbarItem setAutovalidates: YES];
114     }
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     }
131     
132     return o_toolbarItem;
133 }
134
135 - (NSArray *)toolbarDefaultItemIdentifiers: (NSToolbar *)toolbar
136 {
137     return [NSArray arrayWithObjects: VLCIntfSettingToolbarIdentifier, VLCAudioSettingToolbarIdentifier, VLCVideoSettingToolbarIdentifier, NSToolbarFlexibleSpaceItemIdentifier, nil];
138 }
139
140 - (NSArray *)toolbarAllowedItemIdentifiers: (NSToolbar *)toolbar
141 {
142     return [NSArray arrayWithObjects: VLCIntfSettingToolbarIdentifier, VLCAudioSettingToolbarIdentifier, VLCVideoSettingToolbarIdentifier, NSToolbarFlexibleSpaceItemIdentifier, nil];
143 }
144
145 - (NSArray *)toolbarSelectableItemIdentifiers:(NSToolbar *)toolbar
146 {
147     return [NSArray arrayWithObjects: VLCIntfSettingToolbarIdentifier, VLCAudioSettingToolbarIdentifier, VLCVideoSettingToolbarIdentifier, nil];
148 }
149
150 - (void)initStrings
151 {
152     msg_Warn( p_intf, "localisation of the simple preferences not implemented!" );
153 }
154
155 - (void)resetControls
156 {
157     module_config_t *p_item;
158     int i, y = 0;
159     char *psz_tmp;
160
161     /**********************
162      * interface settings *
163      **********************/
164     [o_intf_lang_pop removeAllItems];
165     p_item = config_FindConfig( VLC_OBJECT(p_intf), "language" );
166     for( i = 0; p_item->ppsz_list[i] != nil; i++ )
167     {
168         [o_intf_lang_pop addItemWithTitle: _NS( p_item->ppsz_list_text[i] )];
169         if( p_item->value.psz && !strcmp( p_item->value.psz, p_item->ppsz_list[i] ) )
170             y = i;
171     }
172     [o_intf_lang_pop selectItemAtIndex: y];
173
174     [o_intf_art_pop removeAllItems];
175     p_item = config_FindConfig( VLC_OBJECT(p_intf), "album-art" );
176     for( i = 0; i < p_item->i_list; i++ )
177         [o_intf_art_pop addItemWithTitle: _NS( p_item->ppsz_list_text[i] )];
178     [o_intf_art_pop selectItemAtIndex: 0];
179     [o_intf_art_pop selectItemAtIndex: p_item->value.i];
180
181     [o_intf_meta_ckb setState: config_GetInt( p_intf, "fetch-meta" )];
182     [o_intf_fspanel_ckb setState: config_GetInt( p_intf, "macosx-fspanel" )];
183     [o_intf_embedded_ckb setState: config_GetInt( p_intf, "embedded-video" )];
184
185
186     /******************
187      * audio settings *
188      ******************/
189     [o_audio_enable_ckb setState: config_GetInt( p_intf, "audio" )];
190     [o_audio_vol_fld setIntValue: config_GetInt( p_intf, "volume" )];
191     [o_audio_vol_sld setIntValue: config_GetInt( p_intf, "volume" )];
192
193     [o_audio_spdif_ckb setState: config_GetInt( p_intf, "spdif" )];
194
195     [o_audio_dolby_pop removeAllItems];
196     p_item = config_FindConfig( VLC_OBJECT(p_intf), "force-dolby-surround" );
197     for( i = 0; i < p_item->i_list; i++ )
198         [o_audio_dolby_pop addItemWithTitle: _NS( p_item->ppsz_list_text[i] )];
199     [o_audio_dolby_pop selectItemAtIndex: 0];
200     [o_audio_dolby_pop selectItemAtIndex: p_item->value.i];
201     
202     [o_audio_lang_fld setStringValue: [NSString stringWithUTF8String: config_GetPsz( p_intf, "audio-language" )]];
203
204     [o_audio_headphone_ckb setState: config_GetInt( p_intf, "headphone-dolby" )];
205     
206     psz_tmp = config_GetPsz( p_intf, "audio-filter" );
207     if( psz_tmp )
208         [o_audio_norm_ckb setState: (int)strstr( psz_tmp, "normvol" )];
209     [o_audio_norm_fld setFloatValue: config_GetFloat( p_intf, "norm-max-level" )];
210     
211     // visualizer
212     msg_Warn( p_intf, "visualizer not implemented!" );
213     
214     /* Last.FM is optional */
215     if( module_Exists( p_intf, "audioscrobbler" ) )
216     {
217         [o_audio_lastuser_fld setStringValue: [NSString stringWithUTF8String: config_GetPsz( p_intf, "lastfm-username" )]];
218         [o_audio_lastpwd_fld setStringValue: [NSString stringWithUTF8String: config_GetPsz( p_intf, "lastfm-password" )]];
219         
220         if( config_ExistIntf( VLC_OBJECT( p_intf ), "audioscrobbler" ) )
221             [o_audio_last_ckb setState: NSOnState];
222         else
223             [o_audio_last_ckb setState: NSOffState];
224     }
225
226     /******************
227      * video settings *
228      ******************/
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
251     /*******************
252      * codecs settings *
253      *******************/
254
255     /*********************
256      * subtitle settings *
257      *********************/
258     
259     /********************
260      * hotkeys settings *
261      ********************/
262 }
263
264 - (void)showSimplePrefs
265 {
266     /* we want to show the interface settings, if no category was chosen */
267     if( [o_sprefs_toolbar selectedItemIdentifier] == nil )
268     {
269         [o_sprefs_toolbar setSelectedItemIdentifier: VLCIntfSettingToolbarIdentifier];
270         [self showInterfaceSettings];
271     }
272
273     [o_sprefs_win makeKeyAndOrderFront: self];
274 }
275
276 - (IBAction)buttonAction:(id)sender
277 {
278     if( sender == o_sprefs_cancel_btn )
279         [o_sprefs_win orderOut: sender];
280     else if( sender == o_sprefs_save_btn )
281     {
282         [self saveChangedSettings];
283         [o_sprefs_win orderOut: sender];
284     }
285     else if( sender == o_sprefs_reset_btn )
286         NSBeginInformationalAlertSheet( _NS("Reset Preferences"), _NS("Cancel"),
287                                         _NS("Continue"), nil, o_sprefs_win, self,
288                                         @selector(sheetDidEnd: returnCode: contextInfo:), NULL, nil,
289                                         _NS("Beware this will reset the VLC media player preferences.\n"
290                                             "Are you sure you want to continue?") );
291     else if( sender == o_sprefs_basicFull_matrix )
292     {
293         [o_sprefs_win orderOut: self];
294         [[[VLCMain sharedInstance] getPreferences] showPrefs];
295         [self resetControls];
296     }
297     else
298         msg_Err( p_intf, "unknown buttonAction sender" );
299 }
300
301 - (void)sheetDidEnd:(NSWindow *)o_sheet 
302          returnCode:(int)i_return
303         contextInfo:(void *)o_context
304 {
305     if( i_return == NSAlertAlternateReturn )
306     {
307         config_ResetAll( p_intf );
308         b_intfSettingChanged, b_videoSettingChanged, b_audioSettingChanged = YES;
309         [self resetControls];
310     }
311 }
312
313 - (void)saveChangedSettings
314 {
315     module_config_t *p_item;
316     char *psz_tmp;
317     int i;
318     
319     /**********************
320      * interface settings *
321      **********************/
322     if( b_intfSettingChanged )
323     {
324         p_item = config_FindConfig( VLC_OBJECT(p_intf), "language" );
325         if( [o_intf_lang_pop indexOfSelectedItem] >= 0 )
326             config_PutPsz( p_intf, "language", strdup( p_item->ppsz_list[[o_intf_lang_pop indexOfSelectedItem]] ) );
327         else
328             config_PutPsz( p_intf, "language", strdup( [[VLCMain sharedInstance] delocalizeString: [o_intf_lang_pop stringValue]] ) );
329
330         p_item = config_FindConfig( VLC_OBJECT(p_intf), "album-art" );
331         if( [o_intf_art_pop indexOfSelectedItem] >= 0 )
332             config_PutInt( p_intf, "album-art", p_item->pi_list[[o_intf_art_pop indexOfSelectedItem]] );
333         else
334             config_PutInt( p_intf, "album-art", [o_intf_art_pop intValue] );
335
336         config_PutInt( p_intf, "fetch-meta", [o_intf_meta_ckb state] );
337         config_PutInt( p_intf, "macosx-fspanel", [o_intf_fspanel_ckb state] );
338         config_PutInt( p_intf, "video-embeded", [o_intf_embedded_ckb state] );
339
340         /* okay, let's save our changes to vlcrc */
341         i = config_SaveConfigFile( p_intf, "main" );
342         i = config_SaveConfigFile( p_intf, "macosx" );
343
344         if( i != 0 )
345         {
346             msg_Err( p_intf, "An error occured while saving the Interface settings using SimplePrefs" );
347             i = 0;
348         }
349
350         b_intfSettingChanged = NO;
351     }
352     
353     /******************
354      * audio settings *
355      ******************/
356     if( b_audioSettingChanged )
357     {
358         config_PutInt( p_intf, "audio", [o_audio_enable_ckb state] );
359         config_PutInt( p_intf, "volume", [o_audio_vol_sld intValue] );
360         config_PutInt( p_intf, "spdif", [o_audio_spdif_ckb state] );
361
362         p_item = config_FindConfig( VLC_OBJECT(p_intf), "force-dolby-surround" );
363         if( [o_audio_dolby_pop indexOfSelectedItem] >= 0 )
364             config_PutInt( p_intf, "force-dolby-surround", p_item->pi_list[[o_audio_dolby_pop indexOfSelectedItem]] );
365         else
366             config_PutInt( p_intf, "force-dolby-surround", [o_audio_dolby_pop intValue] );
367
368         config_PutPsz( p_intf, "audio-language", [[o_audio_lang_fld stringValue] UTF8String] );
369         config_PutInt( p_intf, "headphone-dolby", [o_audio_headphone_ckb state] );
370
371         psz_tmp = config_GetPsz( p_intf, "audio-filter" );
372         if(! psz_tmp)
373             config_PutPsz( p_intf, "audio-filter", "volnorm" );
374         else if( (int)strstr( psz_tmp, "normvol" ) == NO )
375         {
376             /* work-around a GCC 4.0.1 bug */
377             psz_tmp = (char *)[[NSString stringWithFormat: @"%s:volnorm", psz_tmp] UTF8String];
378             config_PutPsz( p_intf, "audio-filter", psz_tmp );
379         }
380         else
381         {
382             psz_tmp = (char *)[[[NSString stringWithUTF8String: psz_tmp] stringByTrimmingCharactersInSet: [NSCharacterSet characterSetWithCharactersInString:@":volnorm"]] UTF8String];
383             psz_tmp = (char *)[[[NSString stringWithUTF8String: psz_tmp] stringByTrimmingCharactersInSet: [NSCharacterSet characterSetWithCharactersInString:@"volnorm:"]] UTF8String];
384             psz_tmp = (char *)[[[NSString stringWithUTF8String: psz_tmp] stringByTrimmingCharactersInSet: [NSCharacterSet characterSetWithCharactersInString:@"volnorm"]] UTF8String];
385             config_PutPsz( p_intf, "audio-filter", psz_tmp );
386         }
387         config_PutFloat( p_intf, "norm-max-level", [o_audio_norm_fld floatValue] );
388
389         msg_Warn( p_intf, "visualizer not implemented!" );
390
391         /* Last.FM is optional */
392         if( module_Exists( p_intf, "audioscrobbler" ) )
393         {            
394             if( [o_audio_last_ckb state] == NSOnState )
395                 config_AddIntf( VLC_OBJECT( p_intf ), "audioscrobbler" );
396             else
397                 config_RemoveIntf( VLC_OBJECT( p_intf ), "audioscrobbler" );
398
399             config_PutPsz( p_intf, "lastfm-username", [[o_audio_lastuser_fld stringValue] UTF8String] );
400             config_PutPsz( p_intf, "lastfm-password", [[o_audio_lastuser_fld stringValue] UTF8String] );
401         }
402
403         /* okay, let's save our changes to vlcrc */
404         i = config_SaveConfigFile( p_intf, "main" );
405         i = i + config_SaveConfigFile( p_intf, "audioscrobbler" );
406         i = i + config_SaveConfigFile( p_intf, "volnorm" );
407
408         if( i != 0 )
409         {
410             msg_Err( p_intf, "An error occured while saving the Audio settings using SimplePrefs" );
411             i = 0;
412         }
413         b_audioSettingChanged = NO;
414     }
415     
416     /******************
417      * video settings *
418      ******************/
419     if( b_videoSettingChanged )
420     {
421         config_PutInt( p_intf, "video", [o_video_enable_ckb state] );
422         config_PutInt( p_intf, "fullscreen", [o_video_fullscreen_ckb state] );
423         config_PutInt( p_intf, "video-on-top", [o_video_onTop_ckb state] );
424         config_PutInt( p_intf, "skip-frames", [o_video_skipFrames_ckb state] );
425         config_PutInt( p_intf, "macosx-black", [o_video_black_ckb state] );
426
427         msg_Warn( p_intf, "vout module and display device selectors not implemented!" );
428
429         config_PutPsz( p_intf, "snapshot-path", [[o_video_snap_folder_fld stringValue] UTF8String] );
430         config_PutPsz( p_intf, "snapshot-prefix", [[o_video_snap_prefix_fld stringValue] UTF8String] );
431         config_PutInt( p_intf, "snapshot-sequential", [o_video_snap_seqnum_ckb state] );
432
433         if( [o_video_snap_format_pop indexOfSelectedItem] >= 0 )
434             config_PutPsz( p_intf, "snapshot-format", [[[o_video_snap_format_pop selectedItem] title] UTF8String] );
435
436         i = config_SaveConfigFile( p_intf, "main" );
437         i = i + config_SaveConfigFile( p_intf, "macosx" );
438         
439         if( i != 0 )
440         {
441             msg_Err( p_intf, "An error occured while saving the Video settings using SimplePrefs" );
442             i = 0;
443         }
444         b_videoSettingChanged = NO;
445     }
446 }
447
448 - (void)showSettingsForCategory: (id)o_new_category_view
449 {
450     NSRect o_win_rect, o_view_rect, o_old_view_rect;
451     o_win_rect = [o_sprefs_win frame];
452     o_view_rect = [o_new_category_view frame];
453     
454     if( o_currentlyShownCategoryView != nil )
455     {
456         /* restore our window's height, if we've shown another category previously */
457         o_old_view_rect = [o_currentlyShownCategoryView frame];
458         o_win_rect.size.height = o_win_rect.size.height - o_old_view_rect.size.height;
459         
460         /* remove our previous category view */
461         [o_currentlyShownCategoryView removeFromSuperviewWithoutNeedingDisplay];
462     }
463     
464     o_win_rect.size.height = o_win_rect.size.height + o_view_rect.size.height;
465     
466     [o_sprefs_win displayIfNeeded];
467     [o_sprefs_win setFrame: o_win_rect display:YES animate: YES];
468     
469     [o_new_category_view setFrame: NSMakeRect( 0, 
470                                                [o_sprefs_controls_box frame].size.height, 
471                                                o_view_rect.size.width, 
472                                                o_view_rect.size.height )];
473     [o_new_category_view setNeedsDisplay: YES];
474     [o_new_category_view setAutoresizesSubviews: YES];
475     [[o_sprefs_win contentView] addSubview: o_new_category_view];
476     
477     /* keep our current category for further reference */
478     [o_currentlyShownCategoryView release];
479     o_currentlyShownCategoryView = o_new_category_view;
480     [o_currentlyShownCategoryView retain];
481 }
482
483 - (IBAction)interfaceSettingChanged:(id)sender
484 {
485     b_intfSettingChanged = YES;
486 }
487
488 - (void)showInterfaceSettings
489 {
490     msg_Dbg( p_intf, "showing interface settings" );
491     [self showSettingsForCategory: o_intf_view];
492 }
493
494 - (IBAction)audioSettingChanged:(id)sender
495 {
496     if( sender == o_audio_vol_sld )
497         [o_audio_vol_fld setIntValue: [o_audio_vol_sld intValue]];
498     
499     if( sender == o_audio_vol_fld )
500         [o_audio_vol_sld setIntValue: [o_audio_vol_fld intValue]];
501     
502     b_audioSettingChanged = YES;
503 }
504
505 - (void)showAudioSettings
506 {
507     msg_Dbg( p_intf, "showing audio settings" );
508     [self showSettingsForCategory: o_audio_view];
509 }
510
511 - (IBAction)videoSettingChanged:(id)sender
512 {
513     if( sender == o_video_snap_folder_btn )
514     {
515         o_selectFolderPanel = [[NSOpenPanel alloc] init];
516         [o_selectFolderPanel setCanChooseDirectories: YES];
517         [o_selectFolderPanel setCanChooseFiles: NO];
518         [o_selectFolderPanel setResolvesAliases: YES];
519         [o_selectFolderPanel setAllowsMultipleSelection: NO];
520         [o_selectFolderPanel setMessage: _NS("Choose the Folder to save your video snapshots to.")];
521         [o_selectFolderPanel setCanCreateDirectories: YES];
522         [o_selectFolderPanel setPrompt: _NS("Choose")];
523         [o_selectFolderPanel beginSheetForDirectory: nil file: nil modalForWindow: o_sprefs_win 
524                                       modalDelegate: self 
525                                      didEndSelector: @selector(savePanelDidEnd:returnCode:contextInfo:)
526                                         contextInfo: nil];
527     }
528     else
529         b_videoSettingChanged = YES;
530 }
531
532 - (void)savePanelDidEnd:(NSOpenPanel * )panel returnCode: (int)returnCode contextInfo: (void *)contextInfo
533 {
534     if( returnCode == NSOKButton )
535     {
536         [o_video_snap_folder_fld setStringValue: [o_selectFolderPanel filename]];
537         b_videoSettingChanged = YES;
538     }
539
540     [o_selectFolderPanel release];
541 }
542
543 - (void)showVideoSettings
544 {
545     msg_Dbg( p_intf, "showing video settings" );
546     [self showSettingsForCategory: o_video_view];
547 }
548 @end