[gnome-subtitles] Include SubtitleMode in SubtitleTypeInfo



commit 22d926f1fb72649708459d98361d13d13d1e153f
Author: Pedro Castro <mail pedrocastro org>
Date:   Sat Feb 5 18:50:22 2011 +0000

    Include SubtitleMode in SubtitleTypeInfo

 src/SubLib/Core/Domain/Enumerations.cs     |    4 ++--
 src/SubLib/Core/Domain/SubtitleTypeInfo.cs |   14 +++++++++++---
 2 files changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/src/SubLib/Core/Domain/Enumerations.cs b/src/SubLib/Core/Domain/Enumerations.cs
index 74bb0a2..bb8d1c0 100644
--- a/src/SubLib/Core/Domain/Enumerations.cs
+++ b/src/SubLib/Core/Domain/Enumerations.cs
@@ -1,6 +1,6 @@
 /*
  * This file is part of SubLib.
- * Copyright (C) 2005-2010 Pedro Castro
+ * Copyright (C) 2005-2011 Pedro Castro
  *
  * SubLib is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -137,7 +137,7 @@ public enum SubtitleTextType {
 /// <summary>
 /// Represents the timing mode used by a subtitle format.
 /// </summary>
-internal enum SubtitleMode {
+public enum SubtitleMode {
 	/// <summary>Time based timing mode.</summary>
 	Times,
 	
diff --git a/src/SubLib/Core/Domain/SubtitleTypeInfo.cs b/src/SubLib/Core/Domain/SubtitleTypeInfo.cs
index ac83dd2..ae44adb 100644
--- a/src/SubLib/Core/Domain/SubtitleTypeInfo.cs
+++ b/src/SubLib/Core/Domain/SubtitleTypeInfo.cs
@@ -1,6 +1,6 @@
 /*
  * This file is part of SubLib.
- * Copyright (C) 2006-2008 Pedro Castro
+ * Copyright (C) 2006-2008,2011 Pedro Castro
  *
  * SubLib is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -26,16 +26,19 @@ namespace SubLib.Core.Domain {
 public class SubtitleTypeInfo : IComparable {
 	private string name;
 	private SubtitleType type;
+	private SubtitleMode mode;
 	private string[] extensions;
 
 
 	/// <summary>Initializes a new instance of the <see cref="SubtitleTypeInfo" /> class.</summary>
 	/// <param name="name">The name of the subtitle type.</param>
 	/// <param name="type">The subtitle type.</param>
+	/// <param name="mode">The subtitle mode.</param>
 	/// <param name="extensions">The extensions the subtitle type uses.</param>
-	public SubtitleTypeInfo (string name, SubtitleType type, string[] extensions) {
+	public SubtitleTypeInfo (string name, SubtitleType type, SubtitleMode mode, string[] extensions) {
 		this.name = name;
 		this.type = type;
+		this.mode = mode;
 		this.extensions = extensions;
 	}
 	
@@ -49,6 +52,11 @@ public class SubtitleTypeInfo : IComparable {
 		get { return type; }
 	}
 	
+	/// <summary>The subtitle mode.</summary>
+	public SubtitleMode Mode {
+		get { return mode; }
+	}
+	
 	/// <summary>The extensions the subtitle type uses.</summary>
 	public string[] Extensions {
 		get { return extensions; }
@@ -94,7 +102,7 @@ public class SubtitleTypeInfo : IComparable {
 
 	/* Internal members */
 	
-	internal SubtitleTypeInfo (SubtitleFormat format) : this(format.Name, format.Type, format.Extensions) {
+	internal SubtitleTypeInfo (SubtitleFormat format) : this(format.Name, format.Type, format.Mode, format.Extensions) {
 	}
 
 	/* Private members */



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