site  contact  subhomenews

(SP1) Fix for drive icon renaming

October 18, 2008 — BarryK
Forum member 'davesurrey' reported that when a desktop drive icon was renamed, say "sda1" to "flash", then a second icon with "sda1" title appeared. Rerwin looked in /sbin/pup_event_frontend_d, which is the daemon that manages the desktop icons, and modified 'ppPATTERN':

add_pinboard_func() { #needs ONEDRVNAME, DRV_CATEGORY, FSTYPE

#ppPATTERN=' label="'"$ONEDRVNAME"'"'
#v411 rerwin: avoid icon getting duplicated if it is renamed...
[ "`grep "$ppPATTERN" /root/Choices/ROX-Filer/PuppyPin`" != "" ] && return #precaution.
echo "<?xml version=\"1.0\"?>
<env:Envelope xmlns:env=\"\">
<env:Body xmlns=\"\">
<Args>${DRV_CATEGORY} ${FSTYPE}</Args>
</env:Envelope>" | rox -R

The only slight modification I made to rerwin's fix was to put "<" on the end of ppPATTERN, so as to distinguish between something like "sda1" and "sda10".


renaming drive icons
Username: davesurrey
This works fine now on my test PC with all 11 partitions. Thanks to you both. Dave

Tags: puppy