[gnome-subtitles] Seek the video to the first subtitle after timing change or shift. TODO: apply this to more commands



commit 371fe8df765d69dbc837b477fee1f6f2800160cc
Author: Pedro Castro <mail pedrocastro org>
Date:   Sun Jun 5 20:45:43 2011 +0100

    Seek the video to the first subtitle after timing change or shift.
    TODO: apply this to more commands and make it configurable in gconf.

 .../Core/Command/ChangeTimingCommand.cs            |    4 ++++
 .../Core/Command/ShiftTimingsCommand.cs            |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/GnomeSubtitles/Core/Command/ChangeTimingCommand.cs b/src/GnomeSubtitles/Core/Command/ChangeTimingCommand.cs
index 63e9311..8fda56d 100644
--- a/src/GnomeSubtitles/Core/Command/ChangeTimingCommand.cs
+++ b/src/GnomeSubtitles/Core/Command/ChangeTimingCommand.cs
@@ -55,6 +55,10 @@ public abstract class ChangeTimingCommand : FixedSingleSelectionCommand {
 		storedTime = previousTime;
 		return true;
 	}
+	
+	protected override void PostProcess () {
+		Base.Ui.Video.SeekToSelection();
+	}
 
 	protected abstract TimeSpan GetPreviousTime ();
 	protected abstract void SetTime (TimeSpan storedTime);
diff --git a/src/GnomeSubtitles/Core/Command/ShiftTimingsCommand.cs b/src/GnomeSubtitles/Core/Command/ShiftTimingsCommand.cs
index 1fa845b..45a002d 100644
--- a/src/GnomeSubtitles/Core/Command/ShiftTimingsCommand.cs
+++ b/src/GnomeSubtitles/Core/Command/ShiftTimingsCommand.cs
@@ -62,6 +62,10 @@ public class ShiftTimingsCommand : FixedMultipleSelectionCommand {
 		return true;
 	}
 	
+	protected override void PostProcess () {
+		Base.Ui.Video.SeekToSelection();
+	}
+	
 	/* Private Members */
 
 	private void ShiftTimesAll () {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]