[gnome-themes-standard] backgrounds: Don't use hardcoded paths



commit 9bfa51934cbb1d1b15bfa2eac131fd5613c0433e
Author: Florian MÃllner <fmuellner gnome org>
Date:   Wed Nov 30 20:14:50 2011 +0100

    backgrounds: Don't use hardcoded paths

 themes/Adwaita/backgrounds/Makefile.am             |    8 ++++++--
 .../{adwaita-timed.xml => adwaita-timed.xml.in}    |   20 +++++++++-----------
 2 files changed, 15 insertions(+), 13 deletions(-)
---
diff --git a/themes/Adwaita/backgrounds/Makefile.am b/themes/Adwaita/backgrounds/Makefile.am
index 150c523..5085560 100644
--- a/themes/Adwaita/backgrounds/Makefile.am
+++ b/themes/Adwaita/backgrounds/Makefile.am
@@ -15,9 +15,13 @@ adwaita.xml.in: adwaita.xml.in.in Makefile
 	$(AM_V_GEN) $(SED) -e 's^\ datadir\@^$(datadir)^g' < $(srcdir)/adwaita.xml.in.in > adwaita.xml.in.tmp \
 	&& mv adwaita.xml.in.tmp adwaita.xml.in
 
+adwaita-timed.xml: adwaita-timed.xml.in Makefile
+	$(AM_V_GEN) $(SED) -e 's^\ datadir\@^$(datadir)^g' < $(srcdir)/adwaita-timed.xml.in > adwaita-timed.xml.tmp \
+	&& mv adwaita-timed.xml.tmp adwaita-timed.xml
+
 @INTLTOOL_XML_RULE@
 
 noinst_DATA = adwaita.xml.in
-CLEANFILES = adwaita.xml adwaita.xml.in
+CLEANFILES = adwaita.xml adwaita.xml.in adwaita-timed.xml
 
-EXTRA_DIST = $(background_DATA) adwaita.xml.in.in
+EXTRA_DIST = $(background_DATA) adwaita.xml.in.in adwaita-timed.xml.in
diff --git a/themes/Adwaita/backgrounds/adwaita-timed.xml b/themes/Adwaita/backgrounds/adwaita-timed.xml.in
similarity index 64%
rename from themes/Adwaita/backgrounds/adwaita-timed.xml
rename to themes/Adwaita/backgrounds/adwaita-timed.xml.in
index 7c37a76..54b6de3 100644
--- a/themes/Adwaita/backgrounds/adwaita-timed.xml
+++ b/themes/Adwaita/backgrounds/adwaita-timed.xml.in
@@ -1,5 +1,3 @@
-<!-- cosimo will make this work in any prefix -->
-
 <background>
   <starttime>
     <year>2011</year>
@@ -15,39 +13,39 @@
 <!-- We start with sunrise at 7 AM. It will remain up for 1 hour. -->
 <static>
 <duration>3600.0</duration>
-<file>/usr/share/themes/Adwaita/backgrounds/morning.jpg</file>
+<file>@datadir@/themes/Adwaita/backgrounds/morning.jpg</file>
 </static>
 
 <!-- Sunrise starts to transition to day at 8 AM. The transition lasts for 5 hours, ending at 1 PM. -->
 <transition type="overlay">
 <duration>18000.0</duration>
-<from>/usr/share/themes/Adwaita/backgrounds/morning.jpg</from>
-<to>/usr/share/themes/Adwaita/backgrounds/bright-day.jpg</to>
+<from>@datadir@/themes/Adwaita/backgrounds/morning.jpg</from>
+<to>@datadir@/themes/Adwaita/backgrounds/bright-day.jpg</to>
 </transition>
 
 <!-- It's 1 PM, we're showing the day image in full force now, for 5 hours ending at 6 PM. -->
 <static>
 <duration>18000.0</duration>
-<file>/usr/share/themes/Adwaita/backgrounds/bright-day.jpg</file>
+<file>@datadir@/themes/Adwaita/backgrounds/bright-day.jpg</file>
 </static>
 
 <!-- It's 7 PM and it's going to start to get darker. This will transition for 6 hours up until midnight. -->
 <transition type="overlay">
 <duration>21600.0</duration>
-<from>/usr/share/themes/Adwaita/backgrounds/bright-day.jpg</from>
-<to>/usr/share/themes/Adwaita/backgrounds/good-night.jpg</to>
+<from>@datadir@/themes/Adwaita/backgrounds/bright-day.jpg</from>
+<to>@datadir@/themes/Adwaita/backgrounds/good-night.jpg</to>
 </transition>
 
 <!-- It's midnight. It'll stay dark for 5 hours up until 5 AM. -->
 <static>
 <duration>18000.0</duration>
-<file>/usr/share/themes/Adwaita/backgrounds/good-night.jpg</file>
+<file>@datadir@/themes/Adwaita/backgrounds/good-night.jpg</file>
 </static>
 
 <!-- It's 5 AM. We'll start transitioning to sunrise for 2 hours up until 7 AM. -->
 <transition type="overlay">
 <duration>7200.0</duration>
-<from>/usr/share/themes/Adwaita/backgrounds/good-night.jpg</from>
-<to>/usr/share/themes/Adwaita/backgrounds/morning.jpg</to>
+<from>@datadir@/themes/Adwaita/backgrounds/good-night.jpg</from>
+<to>@datadir@/themes/Adwaita/backgrounds/morning.jpg</to>
 </transition>
 </background>



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