File: menu-method

package info (click to toggle)
kdebase 2%3A980312-8
  • links: PTS
  • area: contrib
  • in suites: hamm
  • size: 16,500 kB
  • ctags: 11,017
  • sloc: cpp: 77,278; ansic: 14,050; makefile: 2,643; sh: 2,151; perl: 844
file content (32 lines) | stat: -rw-r--r-- 905 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/sbin/install-menu
compat="menu-1"

!include menu.h

function default($var,$com)= \
        "# KDE Config File\n" \
        "[KDE Desktop Entry]\n" \
        "Type=Application\n" \
        "Exec=" $command "\n" \
        "Name=" title() "\n" \
        $var  \
        "Comment=" ifelse($longtitle,$longtitle,$title) "\n" \
        ifnempty(icon(),"Icon=/usr/X11R6/include/X11/pixmaps/" icon() "\n")

supported
  x11=  ifelsefile($kdelnk,catfile($kdelnk),default("",$command))
  text= ifelsefile($kdelnk,catfile($kdelnk),default("Terminal=1\n",$command))
  kde= ifelsefile($kdelnk,catfile($kdelnk),default("",$command))
endsupported

genmenu=parent($section) "/" $title ".kdelnk"
startmenu=""
endmenu=""
#submenutitle=""
rootsection=""
rootprefix="/var/spool/kdeapplnk"
userprefix="/Personal/Debian"
prerun="test -n \""prefix()"\" && rm -rf " prefix() "/* "
#treewalk="c()"
treewalk="M"
preoutput=""