Le Fri, 18 Jul 2014 16:05:31 +0200,
Dominique Michel <[email protected]> a écrit :

> Hi,
> 
> That's an old one that have bothered me from years, and I finally get
> a simple test case. With the following function:
> 
> DestroyFunc FuncFvwmMenuMovieDirectory
> AddToFunc FuncFvwmMenuMovieDirectory
> + I PipeRead 'case \"$0\" in \
> "/home/alian/Vídeos"*) myexec="mplayer";; \
> esac; \ 
> fvwm-menu-directory --icon-title
> "${mytitle:-22x22/categories/directory.png}"  \ --icon-file
> "${mypng:-22x22/categories/Audio-Video.png}" \
> --func="FuncFvwmMenuMovieDirectory" \ --exec-file "^${myexec}" --dir
> \"$0\" --exec-title="ls \"$0\""'
> 
> It generate:
> DestroyMenu recreate "/home/alian/Vídeos"
> AddToMenu "/home/alian/Vídeos"
> + DynamicPopDownAction DestroyMenu "/home/alian/Vídeos"
> + MissingSubmenuFunction FuncFvwmMenuMovieDirectory
> + "%22x22/categories/directory.png%/home/alian/Vídeos" Exec cd
> "/home/alian/Vídeos"; ls /home/alian/Vídeos
> + "" Nop
> + "Musique" Popup "/home/alian/Vídeos/Musique" item +100 c
> 
> This is called by:
> DestroyMenu /Music/LoadMovie
> AddToMenu /Music/LoadMovie
> + MissingSubmenuFunction FuncFvwmMenuMovieDirectory
> + '%22x22/categories/video_movies_view.png%$[gt.Browse Medias]'
>   Popup /home/alian/Vídeos 
> 
> Popup /Music/LoadMovie
> 
> The menu pop up, the 4 subdirs are here:  
> 
> # ls -R /home/alian/Vídeos/Musique
> /home/alian/Vídeos/Musique:
> Français  Madonna  Paco de Lucia  Santana
> 
> /home/alian/Vídeos/Musique/Français:
> Plume Latraverse _ Belle et Bum.avi
> 
> /home/alian/Vídeos/Musique/Madonna:
> 05 _ Madonna _ Re_Invention Tour _ June 16 2004 _ American Life.avi
> Madonna _ American Life _Version 1 _ withdrawn__HQ no logo_.vob
> Madonna._.American.Life.vob
> Madonna._._American.Life_.MV._Uncensured_.vob
> 
> /home/alian/Vídeos/Musique/Paco de Lucia:
> Paco De Lucia _ Concierto De Aranjuez _Spanish Kvcd_ By Waydansar.mpg
> Video _ Paco de Lucia _ Rumba.mpg
> 
> /home/alian/Vídeos/Musique/Santana:
> Carlos Santana _ Live In Mexico
> _Concerto Video Sacred Fire.mpg
> Carlos Santana _ Soul Sacrifice _Live in Woodstock_.mpg  
> Jeff Beck_ Carlos Santana_ Steve Lukather et Jan Hammer _ Karuizawa
> Live.mpg
> 
> 
> With it, I can play all the files in 3 of the subdirs, but
> for /home/alian/Vídeos/Musique/Paco de Lucia, I get no submenu and
> cannot navigate and load the files.

Ouch, typo. It was:
If I change the first function into

DestroyFunc FuncFvwmMenuMovieDirectory
AddToFunc FuncFvwmMenuMovieDirectory
+ I PipeRead 'case \"$0\" in \
        "/home/alian/Vídeos"*) myexec="mplayer";; \
        esac; \
        fvwm-menu-directory \
        --func="FuncFvwmMenuMovieDirectory" \
        --exec-file "^${myexec}" --dir \"$0\"'DestroyFunc

Also, it is the exec-title option that seam to confuse fvwm in that
case, but with more complex file hierarchies, the use of icons into
these menu add to the trouble. This is why I removed both the icons and
the exec-title in that test.

> 
> Cheers,
> Dominique
> 

Reply via email to