site  contact  subhomenews

PPM: application icons, take-2

August 14, 2012 — BarryK
A little while ago I implemented a mechanism for having application icons in the Puppy Package Manager:
http://bkhome.org/archive/blog2/201205/ppm-application-icons.html

I have now re-implemented the mechanism, a complete redesign. I have mentioned this in the Forum:
http://murga-linux.com/puppy/viewtopic.php?p=646355#646355


The package database format now extends the 'category' field to have an optional sub-category, like this:

pkgname|nameonly|version|pkgrelease|category[;subcategory]|size|path|fullfilename|dependencies|description|compileddistro|compiledrelease|repo|

Example:
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:
http://bkhome.org/fossil/woof2.cgi/info/5d6118ef94
http://bkhome.org/fossil/woof2.cgi/info/fba51bbf16
http://bkhome.org/fossil/woof2.cgi/info/e2620791bb
http://bkhome.org/fossil/woof2.cgi/info/0eca8ff7a2

Comments

jwmppm


Re sub-category icons
Username: BarryK
"technosaurus, 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

petspec handles subcategories
Username: BarryK
"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. http://bkhome.org/fossil/woof2.cgi/info/cd600f92a8

existing categories
Username: 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.

Nice work, but ...
Username: dogle
" .... 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.

PPM trim-the-fat
Username: 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 insert just case $ONEFILE in *_NLS*) FLAGPET="";; esac and "trim the fat" will work for _NLS pets.


Tags: woof