(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...
ppPATTERN="/root/.pup_event/drive_${ONEDRVNAME}<"
[ "`grep "$ppPATTERN" /root/Choices/ROX-Filer/PuppyPin`" != "" ] && return #precaution.
free_coord
echo "<?xml version=\"1.0\"?>
<env:Envelope xmlns:env=\"http://www.w3.org/2001/12/soap-envelope\">
<env:Body xmlns=\"http://rox.sourceforge.net/SOAP/ROX-Filer\">
<PinboardAdd>
<Path>/root/.pup_event/drive_${ONEDRVNAME}</Path>
<X>${COORD_X}</X>
<Y>${COORD_Y}</Y>
<Label>${ONEDRVNAME}</Label>
<Args>${DRV_CATEGORY} ${FSTYPE}</Args>
</PinboardAdd>
</env:Body>
</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".
Comments
renaming drive iconsUsername: davesurrey
This works fine now on my test PC with all 11 partitions. Thanks to you both. Dave
Tags: puppy