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) #first zenity gui window (paste youtube link)
gui() 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 if [[ $? == 0 ]];then
echo "valid URL" if [[ ${VIDURL} == *"https://www.youtube.com"* ]];then
if [[ $? == 0 ]] ; then
gui2 gui2
else else
exit 0; ${SET_GUI_BIN} --error --text "Invalid URL"
fi fi
else else
echo "This is not a valid URL, please double check it." exit 0;
${SET_GUI_BIN} --error --text "This is not a valid URL, please double check it."
if [[ $? == 0 ]] ; then
gui
else
exit 0;
fi
fi fi