if zenity --question --title="MHz Setting Info" --text="This setting can set the allowed range apps can use on your Pandora.\n\nToo high CPU settings can render your Pandora unstable and crash it. This can lead to data loss!\n\nBe absolutely sure you know what you are doing here.\n\nThe standard maximum setting is 800MHz, the standard minimum setting 125MHz." --ok-label="Yes, I know what I'm doing!" --cancel-label="I'm scared!"; then
if newmax=$(zenity --scale --text "Set the maximum allowed MHz" --min-value=500 --max-value=1300 --value=$max --step 1); then
if newmin=$(zenity --scale --text "Set the minimum allowed MHz" --min-value=20 --max-value=500 --value=$min --step 1); then
sed -i "s/.*max:.*/max:$newmax/g" /etc/pandora/conf/cpu.conf
sed -i "s/.*min:.*/min:$newmin/g" /etc/pandora/conf/cpu.conf
if zenity --question --title="MHz Setting Info" --text="This setting can set the allowed range apps can use on your Pandora.\n\nToo high CPU settings can render your Pandora unstable and crash it. This can lead to data loss!\n\nBe absolutely sure you know what you are doing here.\n\nThe standard maximum setting is 800MHz, the standard minimum setting 125MHz." --ok-label="Yes, I know what I'm doing!" --cancel-label="I'm scared!"; then
if newmax=$(zenity --scale --text "Set the maximum allowed MHz" --min-value=500 --max-value=1300 --value=$max --step 1); then
if newmin=$(zenity --scale --text "Set the minimum allowed MHz" --min-value=20 --max-value=500 --value=$min --step 1); then
sed -i "s/.*max:.*/max:$newmax/g" /etc/pandora/conf/cpu.conf
sed -i "s/.*min:.*/min:$newmin/g" /etc/pandora/conf/cpu.conf