Adding debian version 3.5.0-4.
[debian/openbox.git] / debian / openbox.menu-method
1 #!/usr/bin/install-menu
2
3 !include menu.h
4
5 compat="menu-1"
6
7 outputencoding="UTF-8"
8 genmenu="debian-menu.xml"
9 rootprefix="/var/lib/openbox/"
10 userprefix=".config/openbox/"
11 treewalk="(M)"
12
13 function xml_escape($s) = replace(replace(replace(replace(replace($s, \
14                                 "&",  "&"), \
15                                 ">",  ">"), \
16                                 "<",  "&lt;"), \
17                                 "'",  "&apos;"), \
18                                 "\"", "&quot;")
19
20 supported
21     x11=     nstring(level(), "  ") "<item label='" xml_escape(title()) "'" ifnempty(icon(), " icon='" xml_escape(icon()) "'") ">\n" \
22              nstring(level(), "  ") "  <action name='Execute'><execute>" xml_escape($command) "</execute></action>\n" \
23              nstring(level(), "  ") "</item>\n"
24     text=    nstring(level(), "  ") "<item label='" xml_escape(title()) "'" ifnempty(icon(), " icon='" xml_escape(icon()) "'") ">\n" \
25              nstring(level(), "  ") "  <action name='Execute'><execute>" xml_escape(term()) "</execute></action>\n" \
26              nstring(level(), "  ") "</item>\n"
27     wm=      nstring(level(), "  ") "<item label='" xml_escape(title()) "'" ifnempty(icon(), " icon='" xml_escape(icon()) "'") ">\n" \
28              nstring(level(), "  ") "  <action name='Restart'><execute>" xml_escape($command) "</execute></action>\n" \
29              nstring(level(), "  ") "</item>\n"
30 endsupported
31
32 startmenu=   nstring(level(), "  ")  "<menu id='" xml_escape($section) "' label='" xml_escape(title()) "'>\n"
33 endmenu=     nstring(level(), "  ")  "</menu>\n"
34
35 preoutput=   "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!-- Automatically generated file. Do not edit (see /usr/share/doc/menu/html) -->\n\n<openbox_menu xmlns=\"http://openbox.org/\"\n        xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n        xsi:schemaLocation=\"http://openbox.org/\n                file:///usr/share/openbox/menu.xsd\">\n\n"
36 postoutput=  "\n</openbox_menu>\n"