[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Menu-methods for users Debian menu



Hello Debian GNOME maintainers,

By reverse-engineering nautilus, I have written a menu-method
that produce a vfolder for the user Debian menu. This is not terribly
clean but it does the job.

Please find in attachment:
A menu-methods /etc/menu-methods/gnome-vfolder-user
A vfolder template /etc/gnome-vfs-2.0/vfolders/applications.templates

You also need /etc/menu-methods/xdg-desktop-entry-spec-apps
from the menu-xdg package.

To use it, run update-menus as a user.

This will create a new menu (Debian-user) which a copy of the Debian
menu but including your local customisations.

Some minor tweaking might be needed to make things nicer, but it works
for me.

It is very painful for me to test this, so I would really appreciate if
someone was willing to take care of this menu-method (with my help when
needed).

Cheers,
Bill.
#!/usr/sbin/install-menu
# gnome-vfolder based on:
# Also used as /etc/menu-methods/menu-xdg
# Copyright 2004 - Chris Cheney <ccheney@debian.org>
# Licensed under the GNU General Public License, version 2.

!include menu.h

compat="menu-2"
outputencoding="UTF-8";
outputlanguage="C";

function DirEntry() =
	"    <Name>" translate("",title()) "</Name>\n"
        "    <Desktop>" "debian" replacewith(tolower($section),"/","-") ".directory" "</Desktop>\n";

function desktop() = prefix() "/../../.local/share/applications/menu-xdg/X-Debian" replacewith($basesection,"/","-") "-" tolower(replacewith($title,"/ ","__") ".desktop");

supported;
 x11 = "<Include>" desktop() "</Include>\n";
 text = "<Include>" desktop() "</Include>\n";
endsupported;

startmenu = "  <Folder>\n" DirEntry();
endmenu = "  </Folder>\n";
submenutitle = "";

treewalk = "(M)";

genmenu = "applications.debmenu";
rcfile = "applications.vfolder-info";
examplercfile="applications.template";
mainmenutitle="Debian-user";

rootsection = "";

onlyrunasuser=true;
userprefix = ".gnome2/vfolders";
rootprefix = "/etc/gnome-vfs-2.0/vfolders";

preoutput = "";
postoutput = "";
<?xml version="1.0"?>
<VFolderInfo>
  <Folder>
    <Name>Root</Name>
    <Parent>applications-all-users:///</Parent>
      <!-- Debian -->
include-menu-defs
  </Folder>
</VFolderInfo>

Reply to: