summaryrefslogtreecommitdiffstats
path: root/macosx/HBSubtitlesDefaults.m
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2015-10-22 16:22:46 +0200
committerDamiano Galassi <[email protected]>2015-10-22 16:22:46 +0200
commitd49d34b76ba5ee2e417479e2098b687453c2962a (patch)
treecb83a729a4d3e392b98eea8fd7905ebcffbfe1f1 /macosx/HBSubtitlesDefaults.m
parent618bfd0bb81b4d70e640e49835da19177d7b2650 (diff)
MacGui: partial undo/redo support in the defaults sheets.
Diffstat (limited to 'macosx/HBSubtitlesDefaults.m')
-rw-r--r--macosx/HBSubtitlesDefaults.m67
1 files changed, 67 insertions, 0 deletions
diff --git a/macosx/HBSubtitlesDefaults.m b/macosx/HBSubtitlesDefaults.m
index a390a86b3..ac52c4a52 100644
--- a/macosx/HBSubtitlesDefaults.m
+++ b/macosx/HBSubtitlesDefaults.m
@@ -19,6 +19,73 @@
return self;
}
+#pragma mark - Properties
+
+- (void)setTrackSelectionBehavior:(HBSubtitleTrackSelectionBehavior)trackSelectionBehavior
+{
+ if (trackSelectionBehavior != _trackSelectionBehavior)
+ {
+ [[self.undo prepareWithInvocationTarget:self] setTrackSelectionBehavior:_trackSelectionBehavior];
+ }
+ _trackSelectionBehavior = trackSelectionBehavior;
+}
+
+- (void)setAddForeignAudioSearch:(BOOL)addForeignAudioSearch
+{
+ if (addForeignAudioSearch != _addForeignAudioSearch)
+ {
+ [[self.undo prepareWithInvocationTarget:self] setAddForeignAudioSearch:_addForeignAudioSearch];
+ }
+ _addForeignAudioSearch = addForeignAudioSearch;
+}
+
+- (void)setAddForeignAudioSubtitle:(BOOL)addForeignAudioSubtitle
+{
+ if (addForeignAudioSubtitle != _addForeignAudioSubtitle)
+ {
+ [[self.undo prepareWithInvocationTarget:self] setAddForeignAudioSubtitle:_addForeignAudioSubtitle];
+ }
+ _addForeignAudioSubtitle = addForeignAudioSubtitle;
+}
+
+- (void)setAddCC:(BOOL)addCC
+{
+ if (addCC != _addCC)
+ {
+ [[self.undo prepareWithInvocationTarget:self] setAddCC:_addCC];
+ }
+ _addCC = addCC;
+}
+
+- (void)setBurnInBehavior:(HBSubtitleTrackBurnInBehavior)burnInBehavior
+{
+ if (burnInBehavior != _burnInBehavior)
+ {
+ [[self.undo prepareWithInvocationTarget:self] setBurnInBehavior:_burnInBehavior];
+ }
+ _burnInBehavior = burnInBehavior;
+}
+
+- (void)setBurnInDVDSubtitles:(BOOL)burnInDVDSubtitles
+{
+ if (burnInDVDSubtitles != _burnInDVDSubtitles)
+ {
+ [[self.undo prepareWithInvocationTarget:self] setBurnInDVDSubtitles:_burnInDVDSubtitles];
+ }
+ _burnInDVDSubtitles = burnInDVDSubtitles;
+}
+
+- (void)setBurnInBluraySubtitles:(BOOL)burnInBluraySubtitles
+{
+ if (burnInBluraySubtitles != _burnInBluraySubtitles)
+ {
+ [[self.undo prepareWithInvocationTarget:self] setBurnInBluraySubtitles:_burnInBluraySubtitles];
+ }
+ _burnInBluraySubtitles = burnInBluraySubtitles;
+}
+
+#pragma mark - HBPresetCoding
+
- (void)applyPreset:(HBPreset *)preset
{
if ([preset[@"SubtitleTrackSelectionBehavior"] isEqualToString:@"first"])