# Set the timezone and date/time
-while mainsel=$(zenity --title="Date / Time / Timezone" --width="400" --height="250" --list --column "id" --column "Please select" --hide-column=1 --text="You can set the time and date or select a different timezone.\n" "td" "Change Time and Date" "tz" "Select Timezone" "sync" "Sync time over Internet" --ok-label="Change Setting" --cancel-label="Exit"); do
+while mainsel=$(zenity --title="Date / Time / Timezone" --width="400" --height="250" --list --column "id" --column "Please select" --hide-column=1 --text="You can set the time and date or select a different timezone.\n" "td" "Change Time and Date" "tz" "Select Timezone" "sync" "Sync time over Internet" "autosync" "Sync on network connection" --ok-label="Change Setting" --cancel-label="Exit"); do
case $mainsel in
echo $timezone
rm /etc/localtime && ln -s /usr/share/zoneinfo/$area/$timezone /etc/localtime
+ echo $area/$timezone >> /etc/timezone
;;
"td")
xset s on
fi
;;
+ "autosync")
+ if zenity --question --title="Autosync time" --text="The Pandora can automatically sync the time whenever you connect to a network.\n\nShould it do that?" --ok-label="Yes" --cancel-label="No"; then
+ chmod +x /etc/NetworkManager/dispatcher.d/ntpdate.sh
+ else
+ chmod -x /etc/NetworkManager/dispatcher.d/ntpdate.sh
+ fi
+ ;;
esac
done