[gnome-subtitles] Set default newline type to Windows (fixes #609345)



commit 87446f6fb32ef2d553bfab09effb6bd2b9e93d6f
Author: Pedro Castro <mail>
Date:   Thu Feb 11 00:29:49 2010 +0000

    Set default newline type to Windows (fixes #609345)

 data/gnome-subtitles.schemas                   |   22 ++++++++++++++++++++++
 src/GnomeSubtitles/Core/Config.cs              |    7 ++++---
 src/GnomeSubtitles/Dialog/PreferencesDialog.cs |    2 +-
 3 files changed, 27 insertions(+), 4 deletions(-)
---
diff --git a/data/gnome-subtitles.schemas b/data/gnome-subtitles.schemas
index 48dbee8..99856e7 100644
--- a/data/gnome-subtitles.schemas
+++ b/data/gnome-subtitles.schemas
@@ -167,5 +167,27 @@
 				<long>Subtitle format to use when saving files. Besides the actual format, used when "RememberLastUsed" or "Specific" are set in the file_save_format_option key, other possible values are "KeepExisting" and "CurrentLocale".</long>
 			</locale>
 		</schema>
+		<schema>
+			<key>/schemas/apps/gnome-subtitles/preferences/defaults/file_save_newline_option</key>
+			<applyto>/apps/gnome-subtitles/preferences/defaults/file_save_newline_option</applyto>
+			<owner>gnome-subtitles</owner>
+			<type>string</type>
+			<default>Specific</default>
+			<locale name="C">
+				<short>File Save newline option</short>
+				<long>Newline option to use by default when saving files. Possible values are: "RememberLastUsed" to remember the last used newline type, and "Specific" to use a specific newline type. The newline type for "RememberLastUsed" and "Specific" is stored in the file_save_newline key.</long>
+			</locale>
+		</schema>
+		<schema>
+			<key>/schemas/apps/gnome-subtitles/preferences/defaults/file_save_newline</key>
+			<applyto>/apps/gnome-subtitles/preferences/defaults/file_save_newline</applyto>
+			<owner>gnome-subtitles</owner>
+			<type>string</type>
+			<default>Windows</default>
+			<locale name="C">
+				<short>File Save newline</short>
+				<long>Newline type to use when saving files.</long>
+			</locale>
+		</schema>
 	</schemalist>
 </gconfschemafile>
diff --git a/src/GnomeSubtitles/Core/Config.cs b/src/GnomeSubtitles/Core/Config.cs
index dba9839..c473557 100644
--- a/src/GnomeSubtitles/Core/Config.cs
+++ b/src/GnomeSubtitles/Core/Config.cs
@@ -48,10 +48,11 @@ public class Config {
 
 	/* Constant key strings */
 	private const string keyPrefsEncodingsShownInMenu = keyPrefsEncodings + "shown_in_menu";
+	private const string keyPrefsTranslationSaveAll = keyPrefsTranslation + "save_all";
+	private const string keyPrefsVideoAutoChooseFile = keyPrefsVideo + "auto_choose_file";
 	private const string keyPrefsSpellCheckActiveTextLanguage = keyPrefsSpellCheck + "active_text_language";
 	private const string keyPrefsSpellCheckActiveTranslationLanguage = keyPrefsSpellCheck + "active_translation_language";
 	private const string keyPrefsSpellCheckAutocheck = keyPrefsSpellCheck + "autocheck";
-	private const string keyPrefsVideoAutoChooseFile = keyPrefsVideo + "auto_choose_file";
 	private const string keyPrefsWindowHeight = keyPrefsWindow + "height";
 	private const string keyPrefsWindowWidth = keyPrefsWindow + "width";
 	private const string keyPrefsDefaultsFileOpenEncodingOption = keyPrefsDefaults + "file_open_encoding_option";
@@ -63,7 +64,7 @@ public class Config {
 	private const string keyPrefsDefaultsFileSaveFormat = keyPrefsDefaults + "file_save_format";
 	private const string keyPrefsDefaultsFileSaveNewlineOption = keyPrefsDefaults + "file_save_newline_option";
 	private const string keyPrefsDefaultsFileSaveNewline = keyPrefsDefaults + "file_save_newline";
-	private const string keyPrefsTranslationSaveAll = keyPrefsTranslation + "save_all";
+	
 
 	public Config () {
 		client = new Client();
@@ -174,7 +175,7 @@ public class Config {
 	}
 
 	public NewlineType PrefsDefaultsFileSaveNewline {
-		get { return (NewlineType)GetEnumValue(keyPrefsDefaultsFileSaveNewline, Core.Util.GetSystemNewlineType()); }
+		get { return (NewlineType)GetEnumValue(keyPrefsDefaultsFileSaveNewline, NewlineType.Windows); }
 		set { Set(keyPrefsDefaultsFileSaveNewline, value.ToString()); }
 	}
 
diff --git a/src/GnomeSubtitles/Dialog/PreferencesDialog.cs b/src/GnomeSubtitles/Dialog/PreferencesDialog.cs
index b586423..4a8cc7b 100644
--- a/src/GnomeSubtitles/Dialog/PreferencesDialog.cs
+++ b/src/GnomeSubtitles/Dialog/PreferencesDialog.cs
@@ -159,7 +159,7 @@ public class PreferencesDialog : GladeDialog {
 
 		fileSaveEncoding.ActiveSelection = 0; //Keep Existing
 		fileSaveFormat.ActiveSelection = 0; //Keep Existing
-		fileSaveNewline.ChosenNewlineType = Core.Util.GetSystemNewlineType();
+		fileSaveNewline.ChosenNewlineType = NewlineType.Windows;
 	}
 
 	



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