Fixed cancel button on main gui

This commit is contained in:
Justin Moore 2015-03-04 20:20:21 -06:00
parent c934ac5516
commit 3da043bfe0

View File

@ -39,32 +39,22 @@ fi
#first zenity gui window (paste youtube link)
gui()
{
VIDURL=$(${SET_GUI_BIN} --title="Zymp3 0.1-6" --height=${URL_BOX_HEIGHT} --width=${URL_BOX_WIDTH} --entry --text "Paste youtube link here: ")
VIDURL=$(${SET_GUI_BIN} --title="Zymp3 0.1-7" --height=${URL_BOX_HEIGHT} --width=${URL_BOX_WIDTH} --entry --text "Paste youtube link here: ")
if [[ ${VIDURL} == *"https://www.youtube.com"* ]];then
echo "valid URL"
if [[ $? == 0 ]] ; then
if [[ $? == 0 ]];then
if [[ ${VIDURL} == *"https://www.youtube.com"* ]];then
gui2
else
exit 0;
${SET_GUI_BIN} --error --text "Invalid URL"
fi
else
echo "This is not a valid URL, please double check it."
${SET_GUI_BIN} --error --text "This is not a valid URL, please double check it."
if [[ $? == 0 ]] ; then
gui
else
exit 0;
fi
exit 0;
fi