I have now re-implemented the mechanism, a complete redesign. I have mentioned this in the Forum:
The package database format now extends the 'category' field to have an optional sub-category, like this:
homebank-4.3-w5|homebank|4.3-w5||Business;finance|604K||homebank-4.3-w5.pet|+gtk+|HomeBank finance management|puppy|wary5||
There are generic icons in /usr/local/lib/X11/mini-icons for all 'category' and 'subcategory' names, and they now display in the PPM.
In Woof, the support/find_cat tool, called from '0setup', now generates category;subcategory, the latter being optional, if it can be determined.
Other scripts have been updated to handle the change in category field.
Woof commits, latest first:
Comments:Posted on 14 Aug 2012, 10:14 by technosaurus
That sounds great, I had already implemented subcategories in jwm, so if the default icons could be named <subcategory>.xpm/png, or even symlinks to a standard icon, I will update jwm_menu_create and jwm_install_menu_create to match up. (using the shortened package_name.png and falling back to the subcategory would simplify a lot... again using symlinks as necessary)
Posted on 14 Aug 2012, 21:34 by BarryK
Re sub-category icons
They are all named mini-<subcategory>.xpm
I appended the "mini-" to clarify that these are mini-icons and to avoid naming conflicts with any other icons.
For example, Document;edit has an icon /usr/local/lib/X11/mini-icons/mini-edit.xpm
Posted on 14 Aug 2012, 21:43 by BarryK
petspec handles subcategories
For those who create PET packages, when you use the 'dir2pet' utility, it calls 'petspec' which displays a GUI window into which you can enter the package-database fields.
I have enhanced the 'category' field and now a sub-category may be optionally selected.
I also added a 'help' button for the category field, that explains about sub-categories and a few other useful things.
Here is the Woof commit, but note that this enhanced petspec is no good on it's own. It works with the latest Woof only, so you need to wait for the next build of Puppy.
Posted on 15 Aug 2012, 2:11 by technosaurus
FWIW, the dot_desktop files that come with the majority of packages are already in the subcategories. We actually have to group them together (/etc/xdg/menus/hierarchy) These categories are outlined here:
http://standards.freedesktop.org/menu-spec/latest/apa.html I was just trying to say that if the icons were named InstantMessaging.xpm (the exact category name with image extension) instead of mini-im.xpm, then the whole process could be automated using the dot_desktop files and save hours of labor and be more reliable for new packages and less prone to packaging mistakes... just my 3 cents.
Posted on 16 Aug 2012, 23:01 by dogle
Nice work, but ...
.... does anyone really, honestly find icons actually helpful?
(Disclosure: dedicated iconoclast here; hate 'em ... introduced just to sell a certain well-known OS to the illiterati ... with signal success ... bringing down great trouble upon the world, bah, humbug).
Thank you so much for letting them be optional.
Posted on 20 Aug 2012, 23:44 by L18L
Trim the fat was missing for _NLS pets.
Easy tested fix:
In downloadspkgs.sh after
[ "`echo -n "$ONEFILE" | rev | cut -c 1-3 | rev`" = "pet" ] && FLAGPET='yes' #101016
case $ONEFILE in
and "trim the fat" will work for _NLS pets.