Hi,
I use fvwm-menu-directory for a couple different directories (one for
playing music, the other for setting backgrounds.) Recently I organized
my backgrounds in to alphabetical subdirectories which is when I began
to have problems.
I have two functions that use fvwm-menu-directory, as follows:
#####
# FvwmXmmsMenuDirectory
###########
DestroyFunc FuncFvwmMenuDirectory
AddToFunc FuncFvwmMenuDirectory
+ I PipeRead '/home/mdeluco/root/bin/fvwm-menu-directory -d "$0" \
--links --command-file="Exec exec xmms \\"%f\\"" \
--command-title="Exec exec xmms \\"%d\\""'
#####
# FvwmBackgroundSet
###########
DestroyFunc FvwmBackgroundSet
AddToFunc FvwmBackgroundSet
+ I PipeRead '/home/mdeluco/root/bin/fvwm-menu-directory -d "$0" --links \
--fvwm-function="FvwmBackgroundSet" \
--command-file="Exec exec Esetroot -s \\"%f\\""'
It took me a while to figure out that fvwm-menu-directory only uses
"FuncFvwmMenuDirectory" as the fvwm function for all generated
submenus. I had a look at the command's output in the shell then dug
through the perl script to figure this out.
So what I did was add another command line option to
fvwm-menu-directory. You can actually see it in the above functions
"--fvwm-function". It defaults to FuncFvwmMenuDirectory unless $reuse
is set.
Here are the changes I made:
At the top of the script at the end of the variable declaratoins, I added
my $fvwmFunction = "";
At the end of the GetOptions, I added
"fvwm-function=s" => \$fvwmFunction,
And here is where the old MissingSubmenuFunction was printed out,
# set the 'missing submenu function'
#print qq(+ MissingSubmenuFunction FuncFvwmMenuDirectory\n)
unless $reuse;
if ($fvwmFunction ne "") {
print qq(+ MissingSubMenuFunction $fvwmFunction\n);
} else {
print qq(+ MissingSubMenuFunction FuncFvwmmenuDirectory\n)
unless $reuse;
}
It didn't look to me as though there was any other way around this. The
change seemed easy enough anyhow :) I suppose I could have setup a
shell script, but I like this better ;)
What does everyone think, and did I miss anything?
Thanks!
-- Matt.
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [EMAIL PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]