/*****************************************************************************
* TrackSynchronization.m: MacOS X interface module
*****************************************************************************
- * Copyright (C) 2011-2012 VLC authors and VideoLAN
- * Copyright (C) 2011-2012 Felix Paul Kühne
+ * Copyright (C) 2011-2014 VLC authors and VideoLAN
+ * Copyright (C) 2011-2014 Felix Paul Kühne
* $Id$
*
* Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
#import "CompatibilityFixes.h"
#import "intf.h"
-#import "VideoEffects.h"
#import <vlc_common.h>
#import "TrackSynchronization.h"
+#import "CoreInteraction.h"
#define SUBSDELAY_CFG_MODE "subsdelay-mode"
#define SUBSDELAY_CFG_FACTOR "subsdelay-factor"
[[o_av_value_fld formatter] setFormat:[NSString stringWithFormat:@"#,##0.000 %@", _NS("s")]];
[o_av_value_fld setToolTip: _NS("A positive value means that the audio is ahead of the video")];
[o_sv_lbl setStringValue: _NS("Subtitles/Video")];
- [o_sv_advance_lbl setStringValue: _NS("Subtitle track syncronization:")];
+ [o_sv_advance_lbl setStringValue: _NS("Subtitle track synchronization:")];
[[o_sv_advance_value_fld formatter] setFormat:[NSString stringWithFormat:@"#,##0.000 %@", _NS("s")]];
[o_sv_advance_value_fld setToolTip: _NS("A positive value means that the subtitles are ahead of the video")];
- [o_sv_speed_lbl setStringValue: _NS("Subtitles speed:")];
+ [o_sv_speed_lbl setStringValue: _NS("Subtitle speed:")];
[[o_sv_speed_value_fld formatter] setFormat:[NSString stringWithFormat:@"#,##0.000 %@", _NS("fps")]];
- [o_sv_dur_lbl setStringValue: _NS("Subtitles duration factor:")];
+ [o_sv_dur_lbl setStringValue: _NS("Subtitle duration factor:")];
int i_mode = var_InheritInteger(p_intf, SUBSDELAY_CFG_MODE);
NSString * o_toolTip, * o_suffix;
switch (i_mode) {
default:
case SUBSDELAY_MODE_ABSOLUTE:
- o_toolTip = _NS("Extend subtitles duration by this value.\nSet 0 to disable.");
+ o_toolTip = _NS("Extend subtitle duration by this value.\nSet 0 to disable.");
o_suffix = @" s";
break;
case SUBSDELAY_MODE_RELATIVE_SOURCE_DELAY:
- o_toolTip = _NS("Multiply subtitles duration by this value.\nSet 0 to disable.");
+ o_toolTip = _NS("Multiply subtitle duration by this value.\nSet 0 to disable.");
o_suffix = @"";
break;
case SUBSDELAY_MODE_RELATIVE_SOURCE_CONTENT:
- o_toolTip = _NS("Recalculate subtitles duration according\nto their content and this value.\nSet 0 to disable.");
+ o_toolTip = _NS("Recalculate subtitle duration according\nto their content and this value.\nSet 0 to disable.");
o_suffix = @"";
break;
}
[self resetValues:self];
}
+- (void)updateCocoaWindowLevel:(NSInteger)i_level
+{
+ if (o_window && [o_window isVisible] && [o_window level] != i_level)
+ [o_window setLevel: i_level];
+}
+
- (IBAction)toggleWindow:(id)sender
{
if ([o_window isVisible])
[o_window orderOut:sender];
- else
+ else {
+ [o_window setLevel: [[[VLCMain sharedInstance] voutController] currentStatusWindowLevel]];
[o_window makeKeyAndOrderFront:sender];
+ }
}
- (IBAction)resetValues:(id)sender
var_SetFloat(p_obj, SUBSDELAY_CFG_FACTOR, f_factor);
vlc_object_release(p_obj);
}
- [[VLCVideoEffects sharedInstance] setVideoFilter: "subsdelay" on: f_factor > 0];
+ [[VLCCoreInteraction sharedInstance] setVideoFilter: "subsdelay" on: f_factor > 0];
vlc_object_release(p_input);
}