Testing Enigma 4pre2

Message ID 43596B7C.2040908@syphir.sytes.net
State New
Headers

Commit Message

C.Y.M Oct. 21, 2005, 10:28 p.m. UTC
  C.Y.M wrote:
>>I do like the idea you suggest about "scrolltext" instead of using "marquee".
>>One directional might be better on the eyes.  What ever method you do decide on,
>>it would be very helpful to just place strategic comments into the template so a
>>person that wants to modify the code can easily find the code blocks.  Or, if we
>>want to get really crazy, we could fix the template to use a variable which can
>>be configured by UpdateEnigma.sh.  We could have a different variable for
>>different areas of the skin (ie; Menu, Channel Info, Timers, etc..)
>>
>>--SNIP--
>>
>># defines preferred display method in skin ("text" or "scrolltext" or "marquee")
>>MENU_DISPLAY="scrolltext"
>>CHAN_DISPLAY="marquee"
>>TIMER_DISPLAY="scrolltext"
>>
>>--SNIP--
>>
> 
> 
> Here are some more changes required for the substitution method.
> 

Here is a tested and working patch for UpdateEnigma.sh.  This patch in
conjunction with the previous attachment (enigma-4pre2-display.diff) seems to
work fine.  The final stage of this patch is now to decide what areas of the
skin are going to be substituted and made configurable.

Best Regards,
  

Comments

C.Y.M Oct. 21, 2005, 10:42 p.m. UTC | #1
C.Y.M wrote:
> C.Y.M wrote:
> 
>>>I do like the idea you suggest about "scrolltext" instead of using "marquee".
>>>One directional might be better on the eyes.  What ever method you do decide on,
>>>it would be very helpful to just place strategic comments into the template so a
>>>person that wants to modify the code can easily find the code blocks.  Or, if we
>>>want to get really crazy, we could fix the template to use a variable which can
>>>be configured by UpdateEnigma.sh.  We could have a different variable for
>>>different areas of the skin (ie; Menu, Channel Info, Timers, etc..)
>>>
>>>--SNIP--
>>>
>>># defines preferred display method in skin ("text" or "scrolltext" or "marquee")
>>>MENU_DISPLAY="scrolltext"
>>>CHAN_DISPLAY="marquee"
>>>TIMER_DISPLAY="scrolltext"


Hehe.. oops. "scrolltext" is not what I thought it was :)  Of course
"scrolltext" can be replaced with the appropriate identifier.

Best Regards.
  

Patch

--- Enigma/scripts/UpdateEnigma.sh.orig	2005-10-21 14:47:19.000000000 -0700
+++ Enigma/scripts/UpdateEnigma.sh	2005-10-21 15:13:43.000000000 -0700
@@ -4,14 +4,17 @@ 
 SKINPATH="/etc/vdr/plugins/text2skin/Enigma/"
 CONFIGPATH="/etc/vdr/"
 # defines if the patch text2skin_extensions is installed ("true" or "false")
-T2S_EXT="false"
+T2S_EXT="true"
 # defines if the switchonly-patch by LightYear is installed ("true" or "false")
 SW_ONLY="false"
-
+# defines preferred display method in skin ("text" or "scrolltext" or "marquee")
+MENU_DISPLAY="scrolltext"
+CHAN_DISPLAY="marquee"
 
 # don't edit beyond here
 SKIN_TEMPLATE="$SKINPATH/Enigma.skin.template"
-SKIN_TMP="$SKINPATH/Enigma.skin.tmp"
+SKIN_TMP1="$SKINPATH/Enigma.skin.tmp1"
+SKIN_TMP2="$SKINPATH/Enigma.skin.tmp2"
 SKIN="$SKINPATH/Enigma.skin"
 SETUP="$CONFIGPATH/setup.conf"
 
@@ -71,11 +74,17 @@ 
 | sed -e "s/%BLUE_R%/"$b_r"/" \
 | sed -e "s/%BLUE_R_T%/"`expr $b_r + 0`"/" \
 | sed -e "s/%BLUE_R_M1%/"`expr $b_r - 1`"/" \
-> $SKIN_TMP
+> $SKIN_TMP1
+
+# substitute display settings
+cat $SKIN_TMP1 \
+| sed -e "s/%MENU_DISPLAY%/"$MENU_DISPLAY"/g" \
+| sed -e "s/%CHAN_DISPLAY%/"$CHAN_DISPLAY"/g" \
+> $SKIN_TMP2
 
 # we have to avoid ',' in m4 so we replace it with ';'
 if [ "$T2S_EXT" = "true" ] ; then
-	cat $SKIN_TMP \
+	cat $SKIN_TMP2 \
 	| sed -e "s/,/;/g" \
 	| sed -e "s/ifdef(\`ext';;/ifdef(\`ext',,/" \
 	| sed -e "s/ifdef(\`ext';/ifdef(\`ext',/" \
@@ -83,7 +92,7 @@ 
 	| sed -e "s/;/,/g" \
 	> $SKIN 
 else
-	cat $SKIN_TMP \
+	cat $SKIN_TMP2 \
 	| sed -e "s/,/;/g" \
 	| sed -e "s/ifdef(\`ext';;/ifdef(\`ext',,/" \
 	| sed -e "s/ifdef(\`ext';/ifdef(\`ext',/" \
@@ -92,4 +101,5 @@ 
 	> $SKIN 
 fi
 
-rm $SKIN_TMP
+rm $SKIN_TMP1
+rm $SKIN_TMP2