[gnome-subtitles] Code cleanup



commit 1927f070ea7deaff58c777a87b5e3388ff5cd425
Author: Pedro Castro <mail pedrocastro org>
Date:   Sun Jun 7 19:46:49 2009 +0100

    Code cleanup
---
 src/GnomeSubtitles/Core/SpellLanguage.cs           |    6 +++---
 src/GnomeSubtitles/Core/SpellLanguages.cs          |    2 +-
 .../Dialog/TimingsSynchronizeDialog.cs             |    8 ++++----
 src/SubLib/Core/Search/SubtitleReplaceResult.cs    |   10 +++++-----
 4 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/GnomeSubtitles/Core/SpellLanguage.cs b/src/GnomeSubtitles/Core/SpellLanguage.cs
index a529653..8f1e142 100644
--- a/src/GnomeSubtitles/Core/SpellLanguage.cs
+++ b/src/GnomeSubtitles/Core/SpellLanguage.cs
@@ -1,6 +1,6 @@
 /*
  * This file is part of Gnome Subtitles.
- * Copyright (C) 2008 Pedro Castro
+ * Copyright (C) 2008-2009 Pedro Castro
  *
  * Gnome Subtitles is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -34,7 +34,7 @@ public class SpellLanguage : IComparable {
 	private static string countryGroupName = "country";
 	private static Regex regex = new Regex(@"^(?<" + langGroupName + @">[a-zA-Z]+)(_(?<" + countryGroupName + @">[a-zA-Z]+))?$", RegexOptions.IgnoreCase);
 		
-	public SpellLanguage (String id) {
+	public SpellLanguage (string id) {
 		this.id = id;
 		this.name = GetNameFromID(id);
 	}
@@ -90,7 +90,7 @@ public class SpellLanguage : IComparable {
 		return info.EnglishName;
 	}
 	
-	private string GetUnknownNameFromID (String id) {
+	private string GetUnknownNameFromID (string id) {
 		return prefixUnknown + " (" + id + ")";
 	}
 	
diff --git a/src/GnomeSubtitles/Core/SpellLanguages.cs b/src/GnomeSubtitles/Core/SpellLanguages.cs
index 3451c5b..f796fd9 100644
--- a/src/GnomeSubtitles/Core/SpellLanguages.cs
+++ b/src/GnomeSubtitles/Core/SpellLanguages.cs
@@ -135,7 +135,7 @@ public class SpellLanguages {
 		else
 			activeTranslationLanguageIndex = index;
 
-		String activeLanguageID = (isEmpty ? String.Empty : activeLanguage.ID);
+		string activeLanguageID = (isEmpty ? String.Empty : activeLanguage.ID);
 		SetActiveLanguageInConfig(textType, activeLanguageID);
 
 		EmitLanguageChanged(textType);
diff --git a/src/GnomeSubtitles/Dialog/TimingsSynchronizeDialog.cs b/src/GnomeSubtitles/Dialog/TimingsSynchronizeDialog.cs
index e891f9b..f7381bd 100644
--- a/src/GnomeSubtitles/Dialog/TimingsSynchronizeDialog.cs
+++ b/src/GnomeSubtitles/Dialog/TimingsSynchronizeDialog.cs
@@ -99,7 +99,7 @@ public class TimingsSynchronizeDialog : GladeDialog {
 	}
 	
 	private void UpdateStatusMessage () {
-		String message = String.Empty;
+		string message = String.Empty;
 		switch (syncPoints.Collection.Count) {
 			case 0:
 				message = Catalog.GetString("Add sync points by selecting subtitles and adjusting the video to their correct position. At least 2 points are needed.");
@@ -108,7 +108,7 @@ public class TimingsSynchronizeDialog : GladeDialog {
 				message = Catalog.GetString("Add 1 more sync point to start synchronizing. Adding more points will improve accuracy.");
 				break;
 			default:
-				String allSubtitlesSyncMessage = Catalog.GetString("Synchronization is ready. All subtitles will be synchronized.");
+				string allSubtitlesSyncMessage = Catalog.GetString("Synchronization is ready. All subtitles will be synchronized.");
 				if (syncAllSubtitlesCheckButton.Active)
 					message = allSubtitlesSyncMessage;
 				else {
@@ -152,14 +152,14 @@ public class TimingsSynchronizeDialog : GladeDialog {
 		
 		SyncPoint first = syncPoints.Collection.Get(0);
 		if (first.SubtitleNumber > 0) {
-			String firstInterval = "1" + (first.SubtitleNumber > 1 ? "-" + first.SubtitleNumber : String.Empty);
+			string firstInterval = "1" + (first.SubtitleNumber > 1 ? "-" + first.SubtitleNumber : String.Empty);
 			intervals.Add(firstInterval);
 		}
 		
 		SyncPoint last = syncPoints.Collection.Get(syncPoints.Collection.Count - 1);
 		int lastSubtitleNumber = subtitles.Count - 1;
 		if (last.SubtitleNumber < lastSubtitleNumber) {
-			String lastInterval = (last.SubtitleNumber < lastSubtitleNumber - 1 ? (last.SubtitleNumber + 2) + "-" : String.Empty) + (lastSubtitleNumber + 1);
+			string lastInterval = (last.SubtitleNumber < lastSubtitleNumber - 1 ? (last.SubtitleNumber + 2) + "-" : String.Empty) + (lastSubtitleNumber + 1);
 			intervals.Add(lastInterval);
 		}
 		
diff --git a/src/SubLib/Core/Search/SubtitleReplaceResult.cs b/src/SubLib/Core/Search/SubtitleReplaceResult.cs
index b91366c..55654bf 100644
--- a/src/SubLib/Core/Search/SubtitleReplaceResult.cs
+++ b/src/SubLib/Core/Search/SubtitleReplaceResult.cs
@@ -24,10 +24,10 @@ namespace SubLib.Core.Search {
 
 public class SubtitleReplaceResult {
 	private int number = -1;
-	private String text = String.Empty;
-	private String translation = String.Empty;
+	private string text = String.Empty;
+	private string translation = String.Empty;
 
-	public SubtitleReplaceResult (int number, String text, String translation) {
+	public SubtitleReplaceResult (int number, string text, string translation) {
 		this.number = number;
 		this.text = text;
 		this.translation = translation;
@@ -39,11 +39,11 @@ public class SubtitleReplaceResult {
 		get { return number; }
 	}
 
-	public String Text {
+	public string Text {
 		get { return text; }
 	}
 
-	public String Translation {
+	public string Translation {
 		get { return translation; }
 	}
 



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