From 02b77f3bc692e0d059c29ea907393fda31a3790b Mon Sep 17 00:00:00 2001 From: sr55 Date: Sat, 30 Jun 2012 17:37:25 +0000 Subject: WinGui: Assorted fixes. - Implementation of CanBeBurned and CanBeForced on the subtitles panel. - Save updates to user presets from the Presets Options Menu. (Can use Add Preset to overwrite preset configuration instead also) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4800 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- .../Model/Encoding/SubtitleTrack.cs | 60 ++++++++++++++++++---- .../Services/PresetService.cs | 3 ++ 2 files changed, 52 insertions(+), 11 deletions(-) (limited to 'win/CS/HandBrake.ApplicationServices') diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleTrack.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleTrack.cs index 334d636d6..42161a52d 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleTrack.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleTrack.cs @@ -150,17 +150,6 @@ namespace HandBrake.ApplicationServices.Model.Encoding } } - /// - /// Gets a value indicating whether this is an SRT subtitle. - /// - public bool IsSrtSubtitle - { - get - { - return this.SrtFileName != "-" && this.SrtFileName != null; - } - } - /// /// Gets or sets SourceTrack. /// @@ -179,6 +168,9 @@ namespace HandBrake.ApplicationServices.Model.Encoding { this.Track = this.sourceTrack.ToString(); } + + this.NotifyOfPropertyChange(() => this.CanBeBurned); + this.NotifyOfPropertyChange(() => this.CanBeForced); } } @@ -231,5 +223,51 @@ namespace HandBrake.ApplicationServices.Model.Encoding public string Track { get; set; } #endregion + + /// + /// Gets a value indicating whether CanForced. + /// + public bool CanBeForced + { + get + { + if (this.SourceTrack != null) + { + return this.SourceTrack.SubtitleType == SubtitleType.VobSub || this.SourceTrack.SubtitleType == SubtitleType.PGS + || this.SourceTrack.SubtitleType == SubtitleType.ForeignAudioSearch; + } + + return false; + } + } + + /// + /// Gets a value indicating whether CanBeBurned. + /// + public bool CanBeBurned + { + get + { + if (this.SourceTrack != null) + { + return this.SourceTrack.SubtitleType == SubtitleType.VobSub || this.SourceTrack.SubtitleType == SubtitleType.PGS + || this.SourceTrack.SubtitleType == SubtitleType.ForeignAudioSearch || this.SourceTrack.SubtitleType == SubtitleType.SSA; + } + + return false; + } + } + + + /// + /// Gets a value indicating whether this is an SRT subtitle. + /// + public bool IsSrtSubtitle + { + get + { + return this.SrtFileName != "-" && this.SrtFileName != null; + } + } } } \ No newline at end of file diff --git a/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs b/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs index bab41a9b8..8337ddd56 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs @@ -161,6 +161,9 @@ namespace HandBrake.ApplicationServices.Services { preset.Task = update.Task; preset.UsePictureFilters = update.UsePictureFilters; + preset.PictureSettingsMode = update.PictureSettingsMode; + preset.Category = update.Category; + preset.Description = update.Description; // Update the presets file this.UpdatePresetFiles(); -- cgit v1.2.3