#!/bin/sh
# Pdesktopicons v 0.1 Dec 2009

# created by trapster
# Desktop Icon Control
cd /root/Choices/ROX-Filer
touch /root/Choices/ROX-Filer/PuppyPin-blank
`sed -e 's/<icon.*<\/icon>//g' /root/Choices/ROX-Filer/PuppyPin >> /root/Choices/ROX-Filer/PuppyPin-blank`
BG=`cat /root/.config/wallpaper/bg_img`


export deskicons="
<window title=\"Desktop Icon Control\">
<vbox>
<text><label> Choose to Remove or Restore Desktop Icons </label></text>
<hbox>
  <button>
  <label> Remove Icons</label>
        <action>rox --pinboard=PuppyPin-blank</action>
        </button>
   
   <button>
   <label> Restore Icons</label>
        <action>rox --pinboard=/root/Choices/ROX-Filer/PuppyPin</action>
        <action>/usr/local/apps/Wallpaper/set_bg $BG</action>
        <action>rm /root/Choices/ROX-Filer/PuppyPin-blank</action>
    </button>
   
   <button>
   <input file icon=\"gtk-quit\"></input>
        <label> QUIT</label>
        <action type=\"exit\">EXIT_NOW</action>
      </button>
</hbox> 


</vbox>
</window>"
I=$IFS; IFS=""
for STATEMENTS in  $(gtkdialog3 --program=deskicons --center); do
	eval $STATEMENTS
done
IFS=$I
case $EXIT in
	*)			exit;;
esac

