FVWM: Multiple arguments to MissingSubmenuFunction

From: Tavis Ormandy <taviso_at_sdf.lonestar.org>
Date: Sat, 10 Jan 2004 11:22:05 +0000

Is there anyway to pass more than just the path to MissingSubmenuFunction?

I have a menu like this:

DestroyMenu MenuMultimedia
AddToMenu MenuMultimedia
+ MissingSubmenuFunction FuncFvwmMenuDirectory
(...)
+ "" Nop
+ %hardware_video_camera_display.png%"Browse Videos" Popup
$[fvwm_video_path]
+ %music_notes_view.png%"Browse Music" Popup $[fvwm_audio_path]
+ %graphics_presentation_person.png%"Browse Images" Popup
$[fvwm_image_path]

It would be cool if i could pass some other arguments to
MissingSubmenuFunction to specify an icon/--exec-file to use depending on
menu selected, but there doesnt seem to be an easy way to do this..This is
what I've done right now, but I'm sure there is a better way:

DestroyFunc FuncFvwmMenuDirectory
AddToFunc FuncFvwmMenuDirectory
+ I PipeRead 'myexec=gvim mypng=file_text_view.png; \
    case $0 in \
        $[fvwm_rom_path]*) myexec=$[fvwm_rom_exec]
mypng=games_puzzles_dice.png;; \
        $[fvwm_video_path]*) myexec=$[fvwm_video_exec] mypng=film.png;; \
        $[fvwm_audio_path]*) myexec=$[fvwm_audio_exec] mypng=audio.png;; \
        $[fvwm_image_path]*) myexec=$[fvwm_image_exec]
mypng=graphics_presentation_person.png;; \
    esac; \
    fvwm-menu-directory --icon-title folder_view.png --icon-file ${mypng}
--icon-dir folder_paper_closed.png \
    --dir $0 --xterm exec --exec-file ${myexec}'

I'm using 2.5.8, my fvwm2rc is here
http://dev.gentoo.org/~taviso/fvwm2rc.html

-- 
-------------------------------------
taviso_at_sdf.lonestar.org | finger me for my gpg key.
-------------------------------------------------------
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Sat Jan 10 2004 - 05:25:00 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:56 BST