#! /bin/bash
export delete_box="
<window title=\"Pschedule\" allow-grow=\"false\">
 <vbox>
  <frame $(gettext 'Delete')>
   <pixmap icon_size=\"6\"><input file stock=\"gtk-clear\"></input></pixmap>
   <text use-markup=\"true\"><label>\"<b>$(gettext 'Delete selected task?')</b>\"</label></text>
  </frame>
  <hbox>
   <button no></button>
   <button yes></button>
  </hbox>
 </vbox>
</window>"
I=$IFS; IFS=""
for STATEMENTS in  $(gtkdialog3 -p delete_box --center); do
	eval $STATEMENTS
done
IFS=$I
if [ "$EXIT" = "Yes" ]; then
	NUM=`echo $TREE | cut -d ":" -f 1`
	sed -i -e "${NUM},${NUM}d" /var/spool/cron/crontabs/$USER
	killall -q crond; crond #restart cron
fi
