site  contact  subhomenews

PupTV modified

May 18, 2009 — BarryK
I have modified puppyluvr's PupTV script. This is version 0.3, announced here:

http://murga-linux.com/puppy/viewtopic.php?t=39445

The problem is that it has Mplayer and Gxine tabs, defaulting to Mplayer, which is not appropriate when Mplayer is not installed. Alpha7 feedback shows that this has confused testers.

I have modified the script to not show the tabs if only one of the media players is installed:

#!/bin/sh

#written by 'puppyluvr' March 2009. Licence GPL v2.
#based on the original jwmConfigMgr developed by 'thoughtjourney' 2005.
#w474 BK: fix for no mplayer.

##--------variables---------->>
BUTTONICON="mini-eye.xpm" #mini.window3d.xpm
SCRIPT_DIR="/usr/local/puptv"
MINI_ICONS_DIR="/usr/local/lib/X11/mini-icons"
echo "SCRIPT_DIR='${SCRIPT_DIR}'" > /tmp/PUPTVCONFIGVARS
echo "MINI_ICONS_DIR='${MINI_ICONS_DIR}'" >> /tmp/PUPTVCONFIGVARS

MPLAYERSTUFF=" <vbox>
<hbox>
<text>
<label>FOX JAPAN</label>
</text>
<button>
<input file>$MINI_ICONS_DIR/${BUTTONICON}</input>
<action>$SCRIPT_DIR/FoxJapan &</action>
</button>
</hbox>
<hbox>
<text>
<label>FOX 11 LA</label>
</text>
<button>
<input file>$MINI_ICONS_DIR/${BUTTONICON}</input>
<action>$SCRIPT_DIR/Fox11 &</action>
</button>
</hbox>
<hbox>
<text>
<label>BBC News</label>
</text>
<button>
<input file>$MINI_ICONS_DIR/${BUTTONICON}</input>
<action>$SCRIPT_DIR/BBC &</action>
</button>
</hbox>
<hbox>
<text>
<label>NASA</label>
</text>
<button>
<input file>$MINI_ICONS_DIR/${BUTTONICON}</input>
<action>$SCRIPT_DIR/NASA &</action>
</button>
</hbox>
<hbox>
<text>
<label>NASA2</label>
</text>
<button>
<input file>$MINI_ICONS_DIR/${BUTTONICON}</input>
<action>$SCRIPT_DIR/NASA2 &</action>
</button>
</hbox>
<hbox>
<text>
<label>SciFiChannel</label>
</text>
<button>
<input file>$MINI_ICONS_DIR/${BUTTONICON}</input>
<action>$SCRIPT_DIR/SciFiChannel &</action>
</button>
</hbox>
<hbox>
<text>
<label>Cartoons</label>
</text>
<button>
<input file>$MINI_ICONS_DIR/${BUTTONICON}</input>
<action>$SCRIPT_DIR/Toons &</action>
</button>
</hbox>
<hbox>
<text>
<label>Baseball</label>
</text>
<button>
<input file>$MINI_ICONS_DIR/${BUTTONICON}</input>
<action>$SCRIPT_DIR/Baseball &</action>
</button>
</hbox>
<hbox>
<text>
<label>Stop Mplayer</label>
</text>
<button>
<input file>$MINI_ICONS_DIR/mini-stop.xpm</input>
<action>killall mplayer &</action>
</button>
</hbox>
<hbox>
<text>
<label>Press F to toggle Fullscreen</label>
</text>
</hbox>
<hbox>
<text>
<label>Press Escape to Exit Player</label>
</text>
</hbox>
</vbox>
"

GXINESTUFF=" <vbox>
<hbox>
<text>
<label>FOX JAPAN</label>
</text>
<button>
<input file>$MINI_ICONS_DIR/${BUTTONICON}</input>
<action>$SCRIPT_DIR/GFoxJapan &</action>
</button>
</hbox>
<hbox>
<text>
<label>FOX 11 LA</label>
</text>
<button>
<input file>$MINI_ICONS_DIR/${BUTTONICON}</input>
<action>$SCRIPT_DIR/GFox11 &</action>
</button>
</hbox>
<hbox>
<text>
<label>BBC News</label>
</text>
<button>
<input file>$MINI_ICONS_DIR/${BUTTONICON}</input>
<action>$SCRIPT_DIR/GBBC &</action>
</button>
</hbox>
<hbox>
<text>
<label>NASA</label>
</text>
<button>
<input file>$MINI_ICONS_DIR/${BUTTONICON}</input>
<action>$SCRIPT_DIR/GNASA &</action>
</button>
</hbox>
<hbox>
<text>
<label>NASA2</label>
</text>
<button>
<input file>$MINI_ICONS_DIR/${BUTTONICON}</input>
<action>$SCRIPT_DIR/GNASA2 &</action>
</button>
</hbox>
<hbox>
<text>
<label>SciFiChannel</label>
</text>
<button>
<input file>$MINI_ICONS_DIR/${BUTTONICON}</input>
<action>$SCRIPT_DIR/GSciFiChannel &</action>
</button>
</hbox>
<hbox>
<text>
<label>Cartoons</label>
</text>
<button>
<input file>$MINI_ICONS_DIR/${BUTTONICON}</input>
<action>$SCRIPT_DIR/GToons &</action>
</button>
</hbox>
<hbox>
<text>
<label>Baseball</label>
</text>
<button>
<input file>$MINI_ICONS_DIR/${BUTTONICON}</input>
<action>$SCRIPT_DIR/GBaseball &</action>
</button>
</hbox>
<hbox>
<text>
<label>Stop Gxine</label>
</text>
<button>
<input file>$MINI_ICONS_DIR/mini-stop.xpm</input>
<action>killall gxine &</action>
</button>
</hbox>
<hbox>
<text>
<label>Press F to toggle Fullscreen</label>
</text>
</hbox>
</vbox>
"

NOTEBOOK_START=''
NOTEBOOK_END=''
GXINE="`which gxine`"
MPLAYER="`which mplayer`"
if [ "$GXINE" -a "$MPLAYER" ];then
NOTEBOOK_START='<notebook labels="Mplayer|Gxine">'
NOTEBOOK_END='</notebook>'
BODYSTUFF="${MPLAYERSTUFF}${GXINESTUFF}"
else
if [ "$GXINE" ];then
BODYSTUFF="${GXINESTUFF}"
else
BODYSTUFF="${MPLAYERSTUFF}"
fi
fi

export JWM_Display="
<window title=\"PupTV\" icon-name=\"gtk-yes\" window-position=\"1\">
<vbox>
${NOTEBOOK_START}
${BODYSTUFF}
${NOTEBOOK_END}
<hbox>
<button>
<label>Exit</label>
<input file stock=\"gtk-quit\"></input>
<action>EXIT:ok</action>
</button>
</hbox>
</vbox>
</window>
"
##------------run------------->>
gtkdialog3 --program JWM_Display

##----------cleanup------------>>
unset JWM_Display

#clear
exit 0


This is now PET package 'puptv-0.3-1.pet'.

Comments

content picks
Username: stray
Rupert Murdoch, owner of Newscorp which owns Fox, is the absolute antithesis of freedom, manifested as a so-called human being. http://crooksandliars.com/john-amato/rupert-murdoch-wants-charge-internet-se "23 May 2010, 3:56"00755"67.159.44.184'use this one"stray"hmm, trying to delete the above entry, in order to fix the munged link, it wouldnt take my password. fixed: http://crooksandliars.com/john-amato/rupert-murdoch-wants-charge-internet-se"23 May 2010, 3:59"00755"67.159.44.184'

Tags: woof