[Pkg-ROX-devel] Bug#412481: menu-method script

Laurentiu Lazar lazar.laurentiu at gmail.com
Mon Feb 26 11:59:41 CET 2007


Package: rox-filer
Version: 2.5-1

This package does not have a menu-method to generate menus. The
taskbar (pinboard) has a default Apps that links to /usr/share. I've
made a script (for install-menu) that generates a debian menu that
Apps link should point at.

To test this, as a normal user, put this script in ~/.menu-methods and
run update-menus. The menu is generated. Run "rox -d
~/.config/rox.sourceforge.net/menu" to see it.

--- script begin ---
#!/usr/bin/install-menu

!include lang.h
!include menu.h

compat="menu-2"

outputencoding="UTF-8";
outputlanguage="C";

function SafeDir($my_dir) = replace($my_dir, ".", "_");

function OneDir($my_dir) = replace($my_dir, "/", "_");

function Path() = prefix() "/" SafeDir($basesection) "/"
OneDir(SafeDir($title));

function NoEscOrQuote($str) = replace(replace($str, "\\", "_"), "\"", "_");

function Arg($my_path) = " \"" NoEscOrQuote($my_path) "\" ";

function MakeEntry($cmd) =
        shell("mkdir -p" Arg(Path()) ">/dev/null 2>&1")
        shell("test -f " Arg($icon) "&& cp" Arg($icon) Arg(Path()
"/.DirIcon") ">/dev/null 2>&1")
        shell("/bin/echo \"#!/bin/sh\n\"" Arg("exec " $cmd) ">"
Arg(Path() "/AppRun") "2>/dev/null")
        shell("chmod 755" Arg(Path() "/AppRun") ">/dev/null 2>&1")
        ;

supported ;
        x11 = MakeEntry($command);
        text = MakeEntry(term());
endsupported ;

genmenu = ;

userprefix = ".config/rox.sourceforge.net/menu";

--- script end ---




More information about the Pkg-rox-devel mailing list