#!/bin/sh
#item   ####description                                      ###on off ###
TMP=/var/log/setup/tmp
if [ ! -d $TMP ]; then
  mkdir -p $TMP
fi
cat /dev/null > $TMP/SeTnewtag
dialog --backtitle "Slackware installer: package selection" --title "SELECTING PACKAGES FROM SERIES XFCE (XFCE DESKTOP)" \
--checklist "Please select the packages you wish to install from this series. \
Use the UP/DOWN keys to scroll through the \
list, and the SPACE key to select the packages you wish to \
install. Recommended packages have already been selected for \
you, but you may unselect them if you wish. \
 \
Press ENTER when you are done." \
20 70 10 \
"Greybird" "Desktop theme suite for Xfce" "on" \
"elementary-xfce" "elementary-xfce icon theme" "on" \
"exo" "libexo extension library" "on" \
"garcon" "menu implementation for Xfce" "on" \
"libxfce4ui" "Xfce widget library" "on" \
"libxfce4util" "basic utility library for Xfce" "on" \
"libxfce4windowing" "basic windowing library for Xfce" "on" \
"mousepad" "simple text editor" "on" \
"thunar" "file manager" "on" \
"thunar-volman" "Thunar Volume Manager Plugin" "on" \
"tumbler" "thumbnail generator" "on" \
"xfce4-appfinder" "Application finder" "on" \
"xfce4-clipman-plugin" "clipman plugin for the Xfce panel" "on" \
"xfce4-dev-tools" "Xfce development tools" "on" \
"xfce4-notifyd" "Xfce Notify Daemon" "on" \
"xfce4-panel" "panel for Xfce" "on" \
"xfce4-panel-profiles" "simple app to manage Xfce panel layouts" "on" \
"xfce4-power-manager" "Power Management Daemon for Xfce" "on" \
"xfce4-pulseaudio-plugin" "PulseAudio plugin for Xfce panel" "on" \
"xfce4-screensaver" "screen saver and locker for Xfce" "on" \
"xfce4-screenshooter" "screenshooter plugin for Xfce" "on" \
"xfce4-session" "Xfce session manager" "on" \
"xfce4-settings" "Xfce settings manager" "on" \
"xfce4-systemload-plugin" "systemload plugin for the Xfce panel" "on" \
"xfce4-taskmanager" "running apps / task manager application" "on" \
"xfce4-terminal" "Xfce's Terminal Emulator" "on" \
"xfce4-weather-plugin" "weather plugin for the Xfce panel" "on" \
"xfce4-whiskermenu-plugin" "alternate application launcher for Xfce" "on" \
"xfce4-xkb-plugin" "xkb plugin for the Xfce panel" "on" \
"xfconf" "Xfce configuration storage system" "on" \
"xfdesktop" "Xfce desktop manager" "on" \
"xfwm4" "Xfce Window Manager" "on" \
2> $TMP/SeTpkgs
# If the user pressed cancel, or something bad happened then we
# mark all packages as skipped and bail out.
if [ $? = 1 -o $? = 255 ]; then
   # Not in Slackware, but a nice addition for Slackware ARM whilst
   # we're processing the package selection:
   dialog \
      --backtitle "Slackware installer: package selection" \
      --infobox "Marking all packages as skipped" 3 35
    rm -f $TMP/SeTpkgs
    # Empty, but not delete this file:
    > $TMP/SeTnewtag
  for PKG in \
Greybird elementary-xfce exo garcon libxfce4ui libxfce4util libxfce4windowing mousepad thunar thunar-volman tumbler xfce4-appfinder xfce4-clipman-plugin xfce4-dev-tools xfce4-notifyd xfce4-panel xfce4-panel-profiles xfce4-power-manager xfce4-pulseaudio-plugin xfce4-screensaver xfce4-screenshooter xfce4-session xfce4-settings xfce4-systemload-plugin xfce4-taskmanager xfce4-terminal xfce4-weather-plugin xfce4-whiskermenu-plugin xfce4-xkb-plugin xfconf xfdesktop xfwm4  \ ; do
    echo "$PKG: SKP" >> $TMP/SeTnewtag
  done
  exit
fi
dialog \
  --backtitle "Slackware installer: package selection" \
  --infobox "Processing package selection" 3 33
cat /dev/null > $TMP/SeTnewtag
for PACKAGE in \
Greybird elementary-xfce exo garcon libxfce4ui libxfce4util libxfce4windowing mousepad thunar thunar-volman tumbler xfce4-appfinder xfce4-clipman-plugin xfce4-dev-tools xfce4-notifyd xfce4-panel xfce4-panel-profiles xfce4-power-manager xfce4-pulseaudio-plugin xfce4-screensaver xfce4-screenshooter xfce4-session xfce4-settings xfce4-systemload-plugin xfce4-taskmanager xfce4-terminal xfce4-weather-plugin xfce4-whiskermenu-plugin xfce4-xkb-plugin xfconf xfdesktop xfwm4  \ ; do
 if grep "\(^\| \)$PACKAGE\( \|$\)" $TMP/SeTpkgs > /dev/null 2>&1 ; then
    echo "$PACKAGE: ADD" >> $TMP/SeTnewtag
  else
    echo "$PACKAGE: SKP" >> $TMP/SeTnewtag
  fi
done
rm -f $TMP/SeTpkgs
