patch to create menu for metisse (The 3D WM)
based on fvwm generation routine

but there is still problem with unnecesary submenu, we can't use
--strip because thic will not work if there is no
~/.config/menu/applications.menu

only solution I see is to ommit this file, I've sent patch in 
"Enlightenment 0.16.7.1 menu generation problem" thread...


P.S. next I'll send new metisse spec, with vfmg support


-- 
 ____  Sparky{PI] -- Przemyslaw _  ___  _  _  ..Mail,MSN  LANG...Pl..Ca..Es..En
/____) ___  ___  _ _ || Iskra  |  | _ \| |  | : GG...3228100  WWW..NotYetAvible
\____\| -_)'___| ||^'||//\\// <   |  _/| |  | : JID......sparky<at>jabberes.org
(____/||   (_-_|_||  ||\\ ||   |_ |_|  |_| _| :..sparky<at>sparky.homelinux.org
--- vfmg.spec.orig      2004-12-07 22:56:24.617762168 +0100
+++ vfmg.spec   2004-12-07 22:58:34.016090632 +0100
@@ -12,6 +12,7 @@
 # Source0-md5: 0175143d8bd08a2a82bde106d191d418
 Patch0:                %{name}-current.patch
 Patch1:                %{name}-icons-svg.patch
+Patch2:                %{name}-metisse.patch
 URL:           http://vfmg.sourceforge.net/
 BuildRequires: rpm-perlprov
 Requires:      applnk >= 1.9.0
@@ -51,6 +52,7 @@
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %install
 rm -rf $RPM_BUILD_ROOT
diff -Nura vfmg-0.9.18.orig/vfmg vfmg-0.9.18/vfmg
--- vfmg-0.9.18.orig/vfmg       2004-12-07 22:20:51.329071000 +0100
+++ vfmg-0.9.18/vfmg    2004-12-07 22:41:14.452128376 +0100
@@ -41,7 +41,7 @@
        );
 
 if($o_help) {
-       print "Usage:   $0 [options] {aewm, afterstep, blackbox, enlightenment, 
fbpanel, fluxbox, fvwm, fvwm2, icewm, openbox, olvwm, qvwm, wmaker, wmaker-old, 
xfce4, xpde}
+       print "Usage:   $0 [options] {aewm, afterstep, blackbox, enlightenment, 
fbpanel, fluxbox, fvwm, fvwm2, icewm, metisse, openbox, olvwm, qvwm, wmaker, 
wmaker-old, xfce4, xpde}
        -h, --help      - print this help
        -t, --tags      - echo omitted tags to stderr
        -e, --end       - echo omitted XDG file ending to stderr
@@ -60,11 +60,11 @@
        exit;
 }
 
-die "Missing argument {aewm, afterstep, blackbox, enlightenment, fbpanel, 
fluxbox, fvwm, fvwm2, icewm, openbox, olvwm, qvwm, wmaker, wmaker-old, xfce4, 
xpde}\n"
+die "Missing argument {aewm, afterstep, blackbox, enlightenment, fbpanel, 
fluxbox, fvwm, fvwm2, icewm, metisse, openbox, olvwm, qvwm, wmaker, wmaker-old, 
xfce4, xpde}\n"
        unless exists $ARGV[0];
 $o_output=$ARGV[0];
 die "Unrecognized argument: $o_output\n"
-       unless 
$o_output=~/^(aewm|afterstep|blackbox|enlightenment|fbpanel|fluxbox|fvwm|fvwm2|icewm|openbox|olvwm|qvwm|wmaker|wmaker-old|xfce4|xpde)$/;
+       unless 
$o_output=~/^(aewm|afterstep|blackbox|enlightenment|fbpanel|fluxbox|fvwm|fvwm2|icewm|metisse|openbox|olvwm|qvwm|wmaker|wmaker-old|xfce4|xpde)$/;
 
 $o_full=1 if $o_icons and $o_output=~/^(enlightenment)$/;
        
@@ -839,6 +839,41 @@
        print "\n";
 }
 
+sub metisse {
+       my $no=$_[0];
+       my $file=$_[1];
+       $file=~s|^\.||;
+       my $basename=$_[2];
+       foreach my $entry(keys %{$menu[$no]}) {
+               if($menu[$no]{$entry}[0]>=0) {
+                       $name=substr($entry,1);
+                       $name=~s|/||g;
+                       my $menutitle=$name;
+                       $name=~s/\s+/_/g;
+                     metisse($menu[$no]{$entry}[0],"$file.$name","$menutitle");
+               }
+       }
+       if (!$file) {
+               return;
+       }
+       print "DestroyMenu $file\n";
+       print "AddToMenu $file \"$basename\" Title\n";
+       foreach my $entry(sort keys %{$menu[$no]}) {
+               if($menu[$no]{$entry}[0]<0) {
+                       $name=$entry;
+                       $name=~s/\"/\\\"/g;
+                       print "+ \"$name\"\tExec exec $menu[$no]{$entry}[2]\n";
+               } else {
+                       $name=substr($entry,1);
+                       $name=~s|/||g;
+                       my $menutitle=$name;
+                       $name=~s/\s+/_/g;
+                       print "+ \"$menutitle\"\tPopup\t$file.$name\n";
+               }
+       }
+       print "\n";
+}
+
 sub olvwm {
        my $no=$_[0];
        foreach my $entry(sort keys %{$menu[$no]}) {
@@ -1062,6 +1097,12 @@
        fvwm2($o_strip);
        exit;
 }
+
+if($o_output eq "metisse") {
+       metisse($o_strip,"", "metisse");
+       exit;
+}
+               
 if($o_output eq "olvwm") {
        olvwm($o_strip);
        exit;
diff -Nura vfmg-0.9.18.orig/vfmg.html vfmg-0.9.18/vfmg.html
--- vfmg-0.9.18.orig/vfmg.html  2004-12-07 22:20:51.325071000 +0100
+++ vfmg-0.9.18/vfmg.html       2004-12-07 22:24:29.116962552 +0100
@@ -4,7 +4,7 @@
        <title>VFolders Menu Generator home page</title>
        <meta name="author" content="gotar">
        <meta name="description" content="VFolders Menu Generator home page">
-       <meta name="keywords" content="vfmg, menu, window manager, vfolders, 
aewm, afterstep, blackbox, enlightenment, fluxbox, fvwm, fvwm2, icewm, olvwm, 
qvwm, wmaker, xfce4, xpde, fbpanel, openbox">
+       <meta name="keywords" content="vfmg, menu, window manager, vfolders, 
aewm, afterstep, blackbox, enlightenment, fluxbox, fvwm, fvwm2, icewm, metisse, 
olvwm, qvwm, wmaker, xfce4, xpde, fbpanel, openbox">
        <meta http-equiv="Content-Type" CONTENT="text/html; charset=iso-8859-1">
 </head>
 <body bgcolor=lightblue>
@@ -41,6 +41,7 @@
 <a TARGET="_blank" href="http://www.fvwm.org/";>fvwm</a>,
 <a TARGET="_blank" href="http://www.fvwm.org/";>fvwm2</a>,
 <a TARGET="_blank" href="http://www.icewm.org/";>icewm</a>,
+<a TARGET="_blank" href="http://insitu.lri.fr/~chapuis/metisse/";>metisse</a>,
 <a TARGET="_blank" 
href="http://www.phys.columbia.edu/~flame/olvwm.html";>olvwm</a>,
 <a TARGET="_blank" href="http://www.icculus.org/openbox/";>openbox</a>,
 <a TARGET="_blank" href="http://www.qvwm.org/";>qvwm</a>,
diff -Nura vfmg-0.9.18.orig/vfmg-zsh vfmg-0.9.18/vfmg-zsh
--- vfmg-0.9.18.orig/vfmg-zsh   2004-08-01 08:11:55.000000000 +0200
+++ vfmg-0.9.18/vfmg-zsh        2004-12-07 22:25:55.922766064 +0100
@@ -1,7 +1,7 @@
 #compdef vfmg
 
 _arguments \
-       ':Output:(aewm afterstep blackbox enlightenment fbpanel fluxbox fvwm2 
icewm openbox olvwm qvwm wmaker wmaker-old xfce4 xpde)' \
+       ':Output:(aewm afterstep blackbox enlightenment fbpanel fluxbox fvwm2 
icewm metisse openbox olvwm qvwm wmaker wmaker-old xfce4 xpde)' \
        '(-h --help)'{-h,--help}'[print help]' \
        '(-t --tags)'{-t,--tags}'[echo omitted tags to stderr]' \
        '(-e --end)'{-e,--end}'[echo omitted XDG file ending to stderr]' \
_______________________________________________
pld-devel-en mailing list
[EMAIL PROTECTED]
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en

Reply via email to