[ease] Unify the placement of temporary directory names.



commit 4559054415beb73c4f2823510001b20bd91af4da
Author: Nate Stedman <natesm gmail com>
Date:   Wed Jun 23 21:45:52 2010 -0400

    Unify the placement of temporary directory names.

 src/ease-handle.vala         |   12 ++++++++----
 src/ease-temp.vala           |    4 +++-
 src/ease-welcome-window.vala |    6 +++---
 3 files changed, 14 insertions(+), 8 deletions(-)
---
diff --git a/src/ease-handle.vala b/src/ease-handle.vala
index 534a909..4c1f7d7 100644
--- a/src/ease-handle.vala
+++ b/src/ease-handle.vala
@@ -33,12 +33,12 @@ public class Ease.Handle : Clutter.Texture
 	/**
 	 * The path to the white circle with a black border.
 	 */
-	public const string W_PATH = "ease/svg/handle-white.svg";
+	public const string W_PATH = "handle-white.svg";
 	
 	/**
 	 * The path to the black circle with a white border.
 	 */
-	public const string B_PATH = "ease/svg/handle-black.svg";
+	public const string B_PATH = "handle-black.svg";
 	
 	/**
 	 * Creates a Handle. Does automatically set the Handle's position - call
@@ -229,11 +229,15 @@ public class Ease.Handle : Clutter.Texture
 	{
 		if (flipped)
 		{
-			filename = data_path(W_PATH);
+			filename = data_path(Path.build_filename(Temp.TEMP_DIR,
+	                                                 Temp.IMG_DIR,
+	                                                 W_PATH));
 		}
 		else
 		{
-			filename = data_path(B_PATH);
+			filename = data_path(Path.build_filename(Temp.TEMP_DIR,
+	                                                 Temp.IMG_DIR,
+	                                                 B_PATH));
 		}
 		
 		flipped = !flipped;
diff --git a/src/ease-temp.vala b/src/ease-temp.vala
index 540d195..38e8666 100644
--- a/src/ease-temp.vala
+++ b/src/ease-temp.vala
@@ -32,7 +32,9 @@ public static class Ease.Temp : Object
 	private static Gee.LinkedList<string> folders;
 	
 	private const int ARCHIVE_BUFFER = 4096;
-	private const string TEMP_DIR = "ease";
+	public const string TEMP_DIR = "ease";
+	public const string THEME_DIR = "themes";
+	public const string IMG_DIR = "svg";
 	
 	/**
 	 * Requests a temporary directory.
diff --git a/src/ease-welcome-window.vala b/src/ease-welcome-window.vala
index 3b0d1e8..b2764d6 100644
--- a/src/ease-welcome-window.vala
+++ b/src/ease-welcome-window.vala
@@ -35,8 +35,6 @@ public class Ease.WelcomeWindow : Gtk.Window
 	// themes
 	private Gee.ArrayList<Theme> themes = new Gee.ArrayList<Theme>();
 	private Theme selected_theme;
-	private const string EASE_DIR = "ease";
-	private const string THEME_DIR = "themes";
 
 	// clutter view
 	private ScrollableEmbed embed;
@@ -157,7 +155,9 @@ public class Ease.WelcomeWindow : Gtk.Window
 			string[] data_dirs = Environment.get_system_data_dirs();
 			foreach (string dir in data_dirs)
 			{
-				var filename = Path.build_filename(dir, EASE_DIR, THEME_DIR);
+				var filename = Path.build_filename(dir,
+				                                   Temp.TEMP_DIR,
+				                                   Temp.THEME_DIR);
 				var file = File.new_for_path(filename);
 				
 				if (file.query_exists(null))



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