You are not logged in.
Pages: 1
Hello,
Is zenity 3.4 broken? I use audio-convert 0.3.1 from community and an image resize script. I use both of them as Nautilus scripts. Both of these are not working with zenity 3.4. When I downgrade to zenity 3.2, both scripts work again. Anyone else have trouble? I wish I could say better where things fail, but I can't. I guess it is not interpreting an argument from the script...
Offline
The zenity calls in the image resize script all work fine for me. Perhaps it's due to Nautilus and not Zenity?
Offline
I considered that, but if I run them from the command line, they don't work there either with zenity 3.4. With 3.2. they work fine.
Offline
Not working in what way?
What do you get if you just run those zenity commands on there own?
Another thing you can do is put
set -o xtrace
at the start of your script, which should tell you where the failure is.
If you set PS4 to '$LINENO : ' it will tell you each line no that gets executed.
Last edited by skanky (2012-04-30 09:52:35)
"...one cannot be angry when one looks at a penguin." - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle
Offline
I had a small problem with Zenity upgrade : It was displaying white text on a white background. It was due to the theme I was using...
Offline
It seems to not be able to detect whether or not cancel was pressed. I select a size or type and press OK. With zenity 3.4, I have to comment out the cancel check to make the scripts run.
The resize script is exiting from this code:
#if $? != 0, user click on cancel button, so exit
if [ "$?" != 0 ] ; then
exit
fi
The output of:
[bryan@HPUSDT ~]$ ~/.gnome2/nautilus-scripts/ResizeImages picture.jpg
+ '[' 1 -eq 0 ']'
+ title='Choose which sizes to scale to'
++ zenity --title 'Choose which sizes to scale to' --list '--separator= ' --column=size 160x120 320x240 640x480 800x600 800x600 1024x768
+ imgsize=320x240
+ '[' 139 '!=' 0 ']'
+ exit
The audio convert script is exiting from this code:
formatout=`zenity --title "$title" --list --column="Format" $depformat --text "$choix"`
###### Choix -> Sortie boucle ######
if [ $? != 0 ]; then
exit 1
fi
[ $? -ne 0 ] && exit 2 # Annulation
The output of:
[bryan@HPUSDT ~]$ ~/.gnome2/nautilus-scripts/audio-convert2 music.m4a
+ version=0.3.1
+ title='audio convert 0.3.1'
+ pleasesel='please select at least one file.'
+ noselec='audio convert 0.3.1 converts audio files. please select at least one file.'
+ choix='extension of output file:'
+ warning=warning
+ proceed='already exists. overwrite?'
+ recur='audio convert 0.3.1 can'\''t convert a directory. please select at least one file.'
+ conversion='converting file:'
+ ask_artist='enter the artist name:'
+ ask_album='enter the album name:'
+ ask_song='enter the song name:'
+ ask_track='enter the track number:'
+ ask_quality='select the desired quality:'
+ ask_compression='select the desired compression level:'
+ confirmation='do you want to convert'
+ decoding='decoding file:'
+ ask_fields='manually enter file metatags'
+ ask_confirmation_question='get prompted a confirmation question before convertin'\'' each file'
+ no_codec='you don'\''t have the right codec to decode the selected file. missin'\'' codec:'
+ not_supported='format not supported'
+ completed='conversion completed. goodbye!'
+ ask_to_pass='pass the metatags on to the new files'
+ options='choose from the followin'\'' options:'
+ options_conflict='options one and two conflict. please unselect one of them'
+ case $LANG in
+ '[' 1 -eq 0 ']'
+ is_mp3 music.m4a
+ file -b music.m4a
+ grep MP3
+ echo music.m4a
+ grep -i '\.mp3$'
+ is_ogg music.m4a
+ file -b music.m4a
+ grep Vorbis
+ echo music.m4a
+ grep -i '\.ogg$'
+ is_mpc music.m4a
+ file -b music.m4a
+ grep Musepack
+ echo music.m4a
+ grep -i '\.mpc$'
+ is_flac music.m4a
+ file -b music.m4a
+ grep FLAC
+ echo music.m4a
+ grep -i '\.flac$'
+ is_mac music.m4a
+ file -b music.m4a
+ grep data
+ is_aac music.m4a
+ file -b music.m4a
+ grep AAC
ISO Media, MPEG v4 system, iTunes AAC-LC
+ depformat=
+ which lame
/usr/bin/lame
+ is_mp3 music.m4a
+ file -b music.m4a
+ grep MP3
+ echo music.m4a
+ grep -i '\.mp3$'
+ depformat=mp3
+ which oggenc
/usr/bin/oggenc
+ is_ogg music.m4a
+ file -b music.m4a
+ grep Vorbis
+ echo music.m4a
+ grep -i '\.ogg$'
+ depformat='mp3 ogg'
+ which mppenc
+ which mppdec
+ is_mpc music.m4a
+ file -b music.m4a
+ grep Musepack
+ echo music.m4a
+ grep -i '\.mpc$'
+ which flac
/usr/bin/flac
+ is_flac music.m4a
+ file -b music.m4a
+ grep FLAC
+ echo music.m4a
+ grep -i '\.flac$'
+ depformat='mp3 ogg flac'
+ which mac
+ is_mac music.m4a
+ file -b music.m4a
+ grep data
+ which faac
/usr/bin/faac
+ is_aac music.m4a
+ grep AAC
+ file -b music.m4a
ISO Media, MPEG v4 system, iTunes AAC-LC
+ which faad
/usr/bin/faad
+ which mplayer
/usr/bin/mplayer
+ is_wav music.m4a
+ file -b music.m4a
+ grep WAVE
+ echo music.m4a
+ grep -i '\.wav$'
+ depformat='mp3 ogg flac wav'
+ '[' '!' '' ']'
++ zenity --title 'audio convert 0.3.1' --list --column=Format mp3 ogg flac wav --text 'extension of output file:'
+ formatout=mp3
+ '[' 139 '!=' 0 ']'
+ exit 1
Or let me phrase it another way. With the audio script, at the first dialog, I press cancel. With zenity 3.4 I get:
+ '[' 139 '!=' 0 ']'
with zenity 3.2 I get:
+ '[' 1 '!=' 0 ']'
Cancel should output the same value regarless of the zenity version (at least I would think so)
With zenity 3.4 "OK", $? returns 139
With zenity 3.2 "OK", $? returns 0
Offline
Hey bnb2235,
The cancel button in a script where I use Zenity works ok here with version 3.4. In my case I know that it's returning a "1" because my script checks for a "1" to exit.
if [ $? = 1 ]; then
exit
fi
Ready yourselves, ready yourselves
Let us shine the light of Jesus in the darkest night
Ready yourselves, ready yourselves
May the powers of darkness tremble as our praises rise .... Casting Crowns-Until The Whole World Hears.
Offline
I guess I have a very fascinating problem then, don't I? On two different computers nonetheless. I even tried getting zenity 3.4 package from a differnet repo. Same results.
Offline
Okay, it looks to me like it might be a zenity bug in lists.
When I try this:
zenity --title 'audio convert 0.3.1' --list --column=Format mp3 ogg flac wav --text 'extension of output file:'
I get a segmentation fault and $? = 139
If I remove the list items - mp3, ogg, etc. then I don't get the segmentation fault. I also get one when I try this from the examples section of the manual:
zenity --list --checklist --column "Buy" --column "Item" TRUE Apples TRUE Oranges FALSE Pears FALSE Toothpaste
"...one cannot be angry when one looks at a penguin." - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle
Offline
Thank you skanky,
I thought I had a unique system here...
Offline
If the user clicks on OK then the selected result is returned (though it still seg faults), so the workaround (aside from downgrading) looks to me to check for a returned value, rather than $?.
I couldn't see a bug report on the zenity tracker that matched this, so I'd report it there.
"...one cannot be angry when one looks at a penguin." - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle
Offline
Thank you skanky,
I thought I had a unique system here...
Yes there is a bug - the exit code returned is 139 for cancel or ok grrrrrrrrrrrrrrrr - downgrading to 3.2.0-1 does solve the issue !!
Offline
Sorry, I know this thread is old, but I too am using audio-convert (love it), and the newest Zenity doesn't work. But I upgraded to 3.2.0-1 so it's ok.
Actually, i think audio-convert is like 7 years old? Maybe I should search a new program/script..
P4 530J, Arch Linux
Offline
Pages: 1