[longomatch] Use constants in more places



commit 2c41810e4da4f3f1d2f5a89506c909a465840ea0
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Thu Aug 2 00:09:57 2012 +0200

    Use constants in more places

 LongoMatch.Core/Config.cs            |    5 ++++-
 LongoMatch.GUI/Gui/MainWindow.cs     |    3 ++-
 LongoMatch.Services/Services/Core.cs |    3 ++-
 3 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/LongoMatch.Core/Config.cs b/LongoMatch.Core/Config.cs
index 04979e2..dc25016 100644
--- a/LongoMatch.Core/Config.cs
+++ b/LongoMatch.Core/Config.cs
@@ -18,6 +18,8 @@
 using System;
 using System.IO;
 
+using LongoMatch.Common;
+
 namespace LongoMatch
 {
 	public class Config
@@ -51,7 +53,8 @@ namespace LongoMatch
 		}
 
 		public static string ImagesDir() {
-			return RelativeToPrefix("share/longomatch/images");
+			return RelativeToPrefix(String.Format("share/{0}/images",
+						Constants.SOFTWARE_NAME.ToLower()));
 		}
 
 		public static string DBDir() {
diff --git a/LongoMatch.GUI/Gui/MainWindow.cs b/LongoMatch.GUI/Gui/MainWindow.cs
index a4acfd0..a593b1c 100644
--- a/LongoMatch.GUI/Gui/MainWindow.cs
+++ b/LongoMatch.GUI/Gui/MainWindow.cs
@@ -102,9 +102,10 @@ namespace LongoMatch.Gui
 
 		#region Constructors
 		public MainWindow(IGUIToolkit guiToolkit) :
-		base("LongoMatch")
+		base(Constants.SOFTWARE_NAME)
 		{
 			this.Build();
+			Title = Constants.SOFTWARE_NAME;
 
 			this.guiToolKit = guiToolkit;
 			
diff --git a/LongoMatch.Services/Services/Core.cs b/LongoMatch.Services/Services/Core.cs
index 2480717..734bc2e 100644
--- a/LongoMatch.Services/Services/Core.cs
+++ b/LongoMatch.Services/Services/Core.cs
@@ -171,7 +171,8 @@ namespace LongoMatch.Services
 			if (Environment.OSVersion.Platform == PlatformID.Win32NT)
 				Config.configDirectory = Config.homeDirectory;
 			else
-				Config.configDirectory = System.IO.Path.Combine(home,".longomatch");
+				Config.configDirectory = System.IO.Path.Combine(home,"." +
+					Constants.SOFTWARE_NAME.ToLower());
 		}
 
 		private static bool? debugging = null;	



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