XDG hierarchy files
Starting at file /etc/xdg/menus/hierarchy, I inserted the "utility" line as shown in this extract from the file:
Document :Sub X-Document #
Document :layout X-Document-layout,Publishing,WordProcessor,WebDevelopment #abiword amaya lyx scribus
Document :catalog X-Document-catalog,Dictionary #
Document :edit X-Document-edit,TextEditor #bluefish e3 geany gedit jed joe leafpad medit
Document :viewer X-Document-viewer,Viewer #epdfview xman xpdf
Document :utility X-Document-utility,X-DocumentUtility #PeasyPDF
I then edited /etc/xdg/menus/puppy-document.menu and inserted the new XML code:
If you look at the complete file, you will see also that I changed the <separator> tags, don't want a separator between the first two sub-categories.
I then created a new file /usr/share/desktop-directories/Puppy-Document-utility.directory -- note the matching name in the above code.
I then created a new thumbnail file, /usr/local/lib/X11/mini-icons/mini-Document-utility.xpm. This is for use in the Puppy Package Manager, which displays a unique icon for each category. Also, when any package is installed (see /usr/local/petget/installpkg.sh), if no icon is found, then the generic icon is used -- for example, if the application is to appear in the "utility" sub-category of the "Document" menu, then 'mini-Document-utility.xpm' is the generic fallback icon.
What all of the above results in, is if you are creating a PET package with a .desktop file, say /usr/share/application/myapp.desktop, then this line in it will cause the application to appear in the Document-utility sub-category:
...that is, Puppy supports an "absolute addressing" mode for the menu, unlike any other distro. This makes it super-easy to specify where you want your app to appear -- say for example you want it in the "scanner" sub-category of the "Graphic" menu, just do this:
...look in /etc/xdg/menus/hierarchy to see all available sub-categories.
A further note when creating a PET. For example, 'PeasyPDF' currently has this 'pet.specs' file (pkg db):
peasypdf-2.3|peasypdf|2.3||Document|40K||peasypdf-2.3.pet||Manipulate PDF documents||||
...which is fine. But, you could add a sub-category:
peasypdf-2.3|peasypdf|2.3||Document;utility|40K||peasypdf-2.3.pet||Manipulate PDF documents||||
...which then allows the PPM to assign a more appropriate thumbnail.
...note, this commit also has recompiled 'welcome1stboot' and 'proxy-setup', which has nothing to do with the XDG menu.
No comments posted yet.