Thanks LazyPupLazY Puppy wrote:Use the Rox XML Commands to add/remove Icons from the PuppyPin!rufwoof wrote:Good point. I'm revising the code to take that into account. Inheriting the drive icons from the immediately prior desktop. Working OK so far except when a USB is removed its leaving the drive icon on the desktop, but vanishes if desktops are switched.ebisu wrote:Sooner or later this will make a mess of your drive icons
Examples:
<PinboardAdd>
<Path>/usr/local/RoxApp_Builder/Application_Starter/Mischpult</Path>
<X>554</X>
<Y>128</Y>
<Label>Mischpult</Label>
<Args></Args>
<Locked>true</Locked>
<Shortcut></Shortcut>
</PinboardAdd>
<PinboardRemove>
<Path>/root/my-roxapps/Advanced-SFS-PLUS-Suite</Path>
<Label>SFS P.L.U.S. Suite</Label>
</PinboardRemove>
It will never ever touch the Drive Icons.
In the German Forum you'll find the Original VarioMen(ü) made by SFR and der-schutzhund, that is using the PinboardAdd/PinboardRemove technique. No need to create/have multiple PuppyPin Files and to copy them all the way, to change Desktops/Icon Setup..
Meine Kenntnisse der deutschen Sprache ist nicht gut.
This is another variant I've just been trying. Storing just the icons and wallpaper from each desktop in P1, P2 ...etc files and loading those in along with the drives as a desktop is switched to (storing the prior (current) desktops icons/wallpaper before switching).
cd /root/Choices/ROX-Filer # cd to where ROX Pinboards are stored
prior=`cat current` # current desktop is stored in /root/Choices/ROX-Filer/current
echo $1 >current # Set 'current' to the new desktop number
# Preserve current desktops icons/wallpaper
# strip out any stored drive icons, </pinboard> and blank lines
cat PuppyPin | grep "pup_event/drive" >tmp$$drives
cat PuppyPin | egrep -v "pup_event/drive" | egrep -v "<?xml" | egrep -v "<pinboard>" | egrep -v "</pinboard>" | sed '/^$/d' >P$prior
cat PuppyPin | egrep -v "<backdrop" | egrep -v "<icon" | egrep -v "</pinboard>" | sed '/^$/d' >tmp$$
cat P$1 >>tmp$$
cat tmp$$drives >>tmp$$
echo "</pinboard>" >>tmp$$ # Add on closing </pinboard> to XML file
mv -f tmp$$ PuppyPin
rm tmp$$drives
rox -p /root/Choices/ROX-Filer/PuppyPin # Set rox to use the new desktop
So far that seems to be a lot better at handling drives being hot plugged/unplugged.
Using SOAP (Rox's interpretor) is I guess a cleaner way of doing that and I'll have to did deeper into what you highlighted.
Thanks again.