[ease] [themes] No need to archive themes



commit b136b4eb4725054e91b94e4308d0c71bf4362bb9
Author: Nate Stedman <natesm gmail com>
Date:   Mon Jul 26 20:56:26 2010 -0400

    [themes] No need to archive themes
    
    Themes could be distributed as .easetheme packages,
    but there's no reason to install them as such and
    waste time unarchiving them every time Ease is run.

 Makefile.am          |    3 +--
 configure.ac         |    6 ------
 data/Makefile.am     |   39 +++++++++++++++++++++++++++++----------
 data/themes/build.sh |   16 ----------------
 src/ease-theme.vala  |   20 ++++----------------
 5 files changed, 34 insertions(+), 50 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 8b81905..81a15e8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -101,7 +101,6 @@ doc: src/*.vala
 	valadoc --internal --private --pkg "json-glib-1.0" --pkg "gee-1.0"  --pkg "clutter-gtk-0.10" --pkg "libarchive" --directory=./doc --basedir=src ./src/*.vala
 	gnome-open doc/doc/Ease.html
 
-archive: data/themes/* examples/*
-	sh data/themes/build.sh
+archive: examples/*
 	sh examples/build.sh
 
diff --git a/configure.ac b/configure.ac
index 7fdd951..3f14b7b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -43,10 +43,4 @@ AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Gettext Package])
 AC_SUBST(GETTEXT_PACKAGE)
 AM_GLIB_GNU_GETTEXT
 
-dnl Package Themes
-AC_CONFIG_COMMANDS([build-themes], [sh data/themes/build.sh])
-
-dnl Package Example .ease files
-AC_CONFIG_COMMANDS([build-examples], [sh examples/build.sh])
-
 AC_OUTPUT
diff --git a/data/Makefile.am b/data/Makefile.am
index e9a6bbf..5553ac3 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -13,18 +13,37 @@ ui_DATA = $(wildcard $(top_srcdir)/data/ui/*.ui)
 jsondir = $(datadir)/ease
 json_DATA = theme-defaults.json
 
-themedir = $(datadir)/ease/themes
-theme_DATA = \
-	themes/White.easetheme \
-	themes/Black.easetheme \
-	themes/Blue.easetheme \
-	themes/Red.easetheme \
-	themes/Green.easetheme \
-	themes/Goddard.easetheme \
-	$(NULL)
+blackdir = $(datadir)/ease/themes/Black
+black_DATA = themes/Black/Theme.json
+
+bluedir = $(datadir)/ease/themes/Blue
+blue_DATA = themes/Blue/Theme.json
+
+goddarddir = $(datadir)/ease/themes/Goddard
+goddard_DATA = themes/Goddard/Theme.json
+
+goddardmediadir = $(datadir)/ease/themes/Goddard/Media
+goddardmedia_DATA = themes/Goddard/Media/default.jpg
+
+greendir = $(datadir)/ease/themes/Green
+green_DATA = themes/Green/Theme.json
+
+reddir = $(datadir)/ease/themes/Red
+red_DATA = themes/Red/Theme.json
+
+whitedir = $(datadir)/ease/themes/White
+white_DATA = themes/White/Theme.json
 
 EXTRA_DIST = \
     $(ui_DATA) \
     $(svg_DATA) \
     $(desktop_in_files) \
-    $(json_DATA)
+    $(json_DATA) \
+    $(black_DATA) \
+    $(blue_DATA) \
+    $(goddard_DATA) \
+    $(goddardmedia_DATA) \
+    $(green_DATA) \
+    $(red_DATA) \
+    $(white_DATA)
+
diff --git a/src/ease-theme.vala b/src/ease-theme.vala
index 72a1ea9..e679435 100644
--- a/src/ease-theme.vala
+++ b/src/ease-theme.vala
@@ -180,25 +180,13 @@ public class Ease.Theme : GLib.Object
 	private static Theme defaults_store;
 
 	/**
-	 * Creates an empty Theme.
+	 * Loads a themes from a directory.
 	 *
-	 * @param path The path to the theme's archive.
+	 * @param path The path to the theme's directory.
 	 */
-	public Theme(string archive_path)
+	public Theme(string dir_path)
 	{
-		// extract the theme
-		try
-		{
-			path = Temp.extract(archive_path);
-		}
-		catch (GLib.Error e)
-		{
-			error_dialog(_("Error Loading Theme"),
-			             (_("Error loading theme: %s") + "\n\n" + e.message).
-			             printf(path));
-			return;
-		}
-		
+		path = dir_path;
 		load_from_json(Path.build_filename(path, JSON_PATH));
 	}
 	



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