#!/bin/sh

export WORKDIR=$HOME/.pburn/tmp

#reset gtk-theme
if [ -f /etc/gtk-2.0/gtkrc ]; then
	export GTK2_RC_FILES=':/etc/gtk-2.0/gtkrc' #/etc/gtk-2.0/gtkrc is for < Puppy4
else
	export GTK2_RC_FILES="`grep -m 1 gtkrc $HOME/.gtkrc-2.0 | cut -d'\"' -f2 2> /dev/null`" #get active theme
fi
#---

echo 0 > $WORKDIR/splash #reset progressbar
SPLASH=`cat $WORKDIR/splash_image`
export pburn_splash='
<window title="pBurn" icon-name="media-optical" resizable="false">
<vbox>
 <frame>
  '"$SPLASH
  <text use-markup=\"true\"><label>\"<b><span size='"'x-large'"'>p</span><span size='"'x-large'"' color='"'#B6661F'"'>Burn</span> $VERSION</b>\"</label></text>
  <text use-markup=\"true\"><input file>$WORKDIR/splashtext</input></text>
 </frame>
 <progressbar>
  <label>Sigmund Berglund,   GPL 2007-2015</label>
  <input>"'while [ "$M" != "100" ]; do M=`cat '"$WORKDIR"'/splash`; echo $M; sleep 0.5; done</input>
  <action type="exit">Ready</action>
 </progressbar>
</vbox></window>'
$GTKDIALOG -p pburn_splash --center

