]> granicus.if.org Git - handbrake/commitdiff
MacGui: append "(Modified)" to the preset name.
authorDamiano Galassi <damiog@gmail.com>
Tue, 19 Dec 2017 11:20:43 +0000 (12:20 +0100)
committerDamiano Galassi <damiog@gmail.com>
Tue, 19 Dec 2017 11:20:43 +0000 (12:20 +0100)
macosx/HBController.m
macosx/HBJob.m

index 172a291b62e82d5a39b7420469fc2654a48689c7..187bf79290181fa6247c2cbe8097ac0bc2fcab08 100644 (file)
  */
 - (void)customSettingUsed
 {
-    // Deselect the currently selected Preset if there is one
-    [fPresetsView deselect];
-
     // Update the preset and file name only if we are not
     // undoing or redoing, because if so it's already stored
     // in the undo manager.
     if (!(undo.isUndoing || undo.isRedoing))
     {
         // Change UI to show "Custom" settings are being used
-        self.job.presetName = NSLocalizedString(@"Custom", @"");
+        if (![self.job.presetName hasSuffix:NSLocalizedString(@"(Modified)", nil)])
+        {
+            self.job.presetName = [NSString stringWithFormat:@"%@ %@", self.job.presetName, NSLocalizedString(@"(Modified)", nil)];
+        }
         self.edited = YES;
         [self updateFileName];
     }
index 1e1d479a7b619e316476f75fa0ebb92580a2c761..1644a7fcfbcb719a8e07e44ef5839c645414d8ee 100644 (file)
@@ -232,6 +232,8 @@ NSString *HBChaptersChangedNotification  = @"HBChaptersChangedNotification";
         [[self.undo prepareWithInvocationTarget:self] setMp4HttpOptimize:_mp4HttpOptimize];
     }
     _mp4HttpOptimize = mp4HttpOptimize;
+
+    [[NSNotificationCenter defaultCenter] postNotificationName:HBContainerChangedNotification object:self];
 }
 
 - (void)setAlignAVStart:(BOOL)alignAVStart
@@ -241,6 +243,8 @@ NSString *HBChaptersChangedNotification  = @"HBChaptersChangedNotification";
         [[self.undo prepareWithInvocationTarget:self] setAlignAVStart:_alignAVStart];
     }
     _alignAVStart = alignAVStart;
+
+    [[NSNotificationCenter defaultCenter] postNotificationName:HBContainerChangedNotification object:self];
 }
 
 - (void)setMp4iPodCompatible:(BOOL)mp4iPodCompatible
@@ -250,6 +254,8 @@ NSString *HBChaptersChangedNotification  = @"HBChaptersChangedNotification";
         [[self.undo prepareWithInvocationTarget:self] setMp4iPodCompatible:_mp4iPodCompatible];
     }
     _mp4iPodCompatible = mp4iPodCompatible;
+
+    [[NSNotificationCenter defaultCenter] postNotificationName:HBContainerChangedNotification object:self];
 }
 
 - (void)setChaptersEnabled:(BOOL)chaptersEnabled