Page 1 of 3

Drive Icons All Bunched Up In The Corner

Posted: Tue 30 Apr 2013, 22:12
by Ghost Dog
Hi,

I'd like to know why on one of my computers (the one I remastered on) the drives are neatly iconified in a line, but on other computers (with different resolutions) the drives all show up in the corner on top of each other.

And is there a fix?

Thanx.

Posted: Tue 30 Apr 2013, 22:21
by R-S-H
Hi Ghost Dog.

I don't know, what's the cause of this.

But puppy has the event manager which contains a tab called Desktop Icons. It has a check box down below in the gui, "Tick box to erase then redraw and realign existing icons". Activate this option, confirm with ok and restart X. The drive icons should be Ok then.

did you try evenmanager in terminal

Posted: Tue 30 Apr 2013, 23:01
by nilsonmorales
eventmanager in terminal aling icons sections i dont remember when come at home i will see ok
cya

Posted: Wed 01 May 2013, 03:46
by Ghost Dog
I started eventmanager in a terminal, checked "Tick box to erase then redraw and realign existing icons", saved, and restarted X. But the drive icons are still all bunched together like that. :cry:

Posted: Wed 01 May 2013, 04:20
by rjbrewer
On my netbook, 1024x600 res., the drive icons would
overlap and were too low on screen.

Went to "etc/event manager."
Scrolled to bottom.
ICON-PLACE-EDGE GAP=64.
Changed 64 to 80.

Solved both problems.

Posted: Wed 01 May 2013, 15:31
by Karl Godt
You can also try to adjust the pin_grid_step value in the rox filer pinboard options [ fine | medium | coarse ] .

[ pinboard_grid_step" $HOME/.config/rox.sourceforge.net/ROX-Filer/Options ]

When I first played with /sbin/pup_event_frontend_d , such stacking on one place appeared many times .
Even yesterday .
Cause was that i made a script to transform lots of strings like VALUE="`command`" to VALUE=`command` and at one place a * was translated as \* , causing the pup_event_frontend_d to grep wrong ( no ) values .

Posted: Wed 01 May 2013, 16:23
by nic007
Try to drag and drop the icons as close as possible to the positions you want and then use the allignment tools as mentioned in the above posts. Usually works for me. Better still - Adjust the grid step to fine before drag and dropping

Posted: Wed 01 May 2013, 18:34
by Ghost Dog
So nobody knows why it does this, and nobody know any way to fix it other than "drag the icons where you want them"?

Posted: Wed 01 May 2013, 20:28
by Karl Godt
pup_event_frontend_d has nifty but heavy code to grep the already placed icons in the PuppyPin file .
The problem is, that rox aligns the icons nearest possible to the grid step , which is 2=fine, 16=medium and 32=coarse ,
NOT by the values given to him by pup_event_frontend_d .
These different values show up in the Choices/ROX-Filer/PuppyPin file,
while pup_event_fronted_d still thinks, that the current place is not occupied .

I don't actually know how to sync these correctly or easily .
Have played with the code, but could not supersede shinobar's code .
BTW : 4.3 and 4.3.1 are different !

Posted: Thu 02 May 2013, 00:54
by Ghost Dog
Maybe it's a timing issue, maybe PuppyPin is being overwritten?

In any case, I think it's the biggest thing making remasters look silly right now - all those drive icons sitting in a big pile on top of each other.

pup_event_frontend_d free_coord

Posted: Thu 02 May 2013, 12:07
by Karl Godt
I was thinking about it and I came to an idea, that works as first test :

Code: Select all

free_coord_simple(){
 DRIVE_NAME="$1"
 [ "$OLD_DRV_NAME" ] && LAST_PLACE=`grep -m1 -w "\\.pup_event/drive_${OLD_DRV_NAME}" /root/Choices/ROX-Filer/PuppyPin`
 [ "$LAST_PLACE" ] && { COORD_X=`echo "$LAST_PLACE" | cut -f2 -d'"'`; COORD_Y=`echo "$LAST_PLACE" | cut -f4 -d'"'`; }
 echo "'$OLD_DRV_NAME' $DRIVE_NAME
'$LAST_PLACE'
$COORD_X $COORD_Y"
 case $ICON_PLACE_ORIENTATION in #see /etc/eventmanager
  bottom)
   [ "$COORD_Y" ] || COORD_Y=`expr $SCRN_Y - $ICON_PLACE_EDGE_GAP` #default 64, see /etc/eventmanager
   COORD_Y=`expr \( $COORD_Y + $PIN_GRID_STEP2 \) / $PIN_GRID_STEP '*' $PIN_GRID_STEP`
   [ "$COORD_X" ] && COORD_X=$((COORD_X + ICON_PLACE_SPACING)) || COORD_X=$ICON_PLACE_START_GAP #default 32, see /etc/eventmanager
   [ "$COORD_X" -gt $MAX_X ] && { COORD_Y=$((COORD_Y - ICON_PLACE_SPACING)) ; COORD_X=$ICON_PLACE_START_GAP ; }
   echo COORD_X=$COORD_X COORD_Y=$COORD_Y #DEBUG
  ;;
  top)
   [ "$COORD_Y" ] || COORD_Y=$ICON_PLACE_EDGE_GAP
   COORD_Y=`expr \( $COORD_Y + $PIN_GRID_STEP2 \) / $PIN_GRID_STEP '*' $PIN_GRID_STEP`
   [ "$COORD_X" ] && COORD_X=$((COORD_X + ICON_PLACE_SPACING)) || COORD_X=$ICON_PLACE_START_GAP #default 32, see /etc/eventmanager
   [ "$COORD_X" -gt $MAX_X ] && { COORD_Y=$((COORD_Y + ICON_PLACE_SPACING)) ; COORD_X=$ICON_PLACE_START_GAP ; }
   echo COORD_X=$COORD_X COORD_Y=$COORD_Y #DEBUG
  ;;
  left)
   [ "$COORD_X" ] || COORD_X=$ICON_PLACE_EDGE_GAP #default 64, see /etc/eventmanager
   [ "$COORD_Y" ] && COORD_Y=$((COORD_Y + ICON_PLACE_SPACING)) || COORD_Y=$ICON_PLACE_START_GAP #default 32, see /etc/eventmanager
   COORD_Y=$((((COORD_Y+PIN_GRID_STEP2)/PIN_GRID_STEP)*PIN_GRID_STEP))
   [ "$COORD_Y" -gt $MAX_Y ] && { COORD_X=$((COORD_X + ICON_PLACE_SPACING)) ; COORD_Y=$ICON_PLACE_START_GAP ; }
   echo COORD_X=$COORD_X COORD_Y=$COORD_Y #DEBUG
  ;;
  right)
   [ "$COORD_X" ] || COORD_X=`expr $SCRN_X - $ICON_PLACE_EDGE_GAP` #default 64, see /etc/eventmanager
   [ "$COORD_Y" ] && COORD_Y=$((COORD_Y + ICON_PLACE_SPACING)) || COORD_Y=$ICON_PLACE_START_GAP #default 32, see /etc/eventmanager
   COORD_Y=`expr \( $COORD_Y + $PIN_GRID_STEP2 \) / $PIN_GRID_STEP '*' $PIN_GRID_STEP`
   [ "$COORD_Y" -gt $MAX_Y ] && { COORD_X=$((COORD_X - ICON_PLACE_SPACING)) ; COORD_Y=$ICON_PLACE_START_GAP ; }
   echo COORD_X=$COORD_X COORD_Y=$COORD_Y #DEBUG
  ;;
   esac
OLD_DRV_NAME="$DRIVE_NAME"
}
It shouldn't be a timing problem cos I run on 2coresX2,6GHz for the time that ROX writes to PuppyPin and grep into it presents usable values .

OLD CODE THAT WOULD BE REPLACED :

Code: Select all

free_coord_normal(){
 #find a free place on desktop. v410 avoid exact overlapping icons...
 #091208 finetune placement, also any side of screen...
 #read the coords grid, code from shinobar...
 COORDSGRID=`grep -o -e ' x="[0-9]*" y="[0-9]*" ' /root/Choices/ROX-Filer/PuppyPin | sed 's/[0-9]"/"/g'`
 case $ICON_PLACE_ORIENTATION in #see /etc/eventmanager
  bottom)
   COORD_Y=`expr $SCRN_Y - $ICON_PLACE_EDGE_GAP` #default 64, see /etc/eventmanager
   COORD_Y=`expr \( $COORD_Y + $PIN_GRID_STEP2 \) / $PIN_GRID_STEP '*' $PIN_GRID_STEP`
   COORD_X=$ICON_PLACE_START_GAP #default 32, see /etc/eventmanager
   xPATTERN=" x=\"${COORD_X}\" y=\"${COORD_Y}\" "
   xyCNT=0 #precaution.
   while [ 1 ];do
    xgPATTERN=`echo -n "$xPATTERN" |  sed 's/[0-9]"/"/g'`
    [ "`echo "$COORDSGRID" | grep "$xgPATTERN"`" = "" ] && break
    COORD_X=`expr $COORD_X + $ICON_PLACE_SPACING`
    if [ $COORD_X -gt $MAX_X ];then #start next line up.
     xyCNT=`expr $xyCNT + 1`
     [ $xyCNT -gt 1 ] && break
     COORD_Y=`expr $COORD_Y - $ICON_PLACE_SPACING`
     COORD_X=$ICON_PLACE_START_GAP
    fi
    xPATTERN=" x=\"${COORD_X}\" y=\"${COORD_Y}\" "
   done
  ;;
  top|left|right)
[ ... ]
  ;;
esac
}

Posted: Fri 03 May 2013, 09:59
by Ghost Dog
Well, that sounds really promising. There's usually no icons where the drives show up anyway, and if this fixes Puppy's problem that would be really good.

I'll test it soon.

Posted: Fri 03 May 2013, 10:31
by Karl Godt
And don't forget to adjust the call to the free_coord function in the
add_pinboard_func function
as

Code: Select all

 [ "`grep "$ppPATTERN" /root/Choices/ROX-Filer/PuppyPin`" != "" ] && return #precaution.
 #free_coord
 free_coord_simple ${ONEDRVNAME}
 echo "<?xml version=\"1.0\"?>

Posted: Mon 06 May 2013, 08:47
by Ghost Dog
Hey Karl, I don't seem to have a free_coord_normal section in my /sbin/pup_event_frontend_d.

I'm on Slacko 3.3.

Sorry I can't confirm if this works. Anybody else?

Posted: Wed 08 May 2013, 17:33
by npierce
Hi Ghost Dog,

After booting your remaster on the computer where the icons get bunched up, what is the output of these commands?:

Code: Select all

grep drive /initrd/pup_ro2/root/Choices/ROX-Filer/PuppyPin
grep -E "IDSTRING|PUPPYSFS" /etc/DISTRO_SPECS

Posted: Thu 09 May 2013, 17:47
by Smithy
+1 on a fix for this, It really lets Puppy down when you stick a stick in another computer and the icons are all bunched up!

Posted: Thu 09 May 2013, 19:05
by Jasper
Hi,

I use desksetup-.0.4.pet from 01micko so that when I have
my icons as I want I cam easily save them and restore them
if necessary (which I have personally only needed after a
Puppy version number upgrade).

However, I haven't experienced the bunching problem, but
perhaps someone with the problem might try it.

My regards

Posted: Fri 10 May 2013, 22:06
by Ghost Dog
Hi npierce,

It doesn't seem to just be on remasters, but also on standard Puppies, maybe just certain resolutions?

Karl Godt replied to the PM I sent him, saying:
"of course there is no free_coord_normal" ..

there are two or three free_coord functions and ash seems to pick the latest one south if something calls free_coord .

I would suggest to rename the free_coord 's to uniqe names like
free_coord_orig ,
free_coord_2 and
free_coord_normal

and put in my free_coord function with whatever uniqe name underneath the closing bracket of the latest free_coord function and call it with the name given .
I haven't gotten around to exploring this. But it really sounded like he had fixed the problem for a minute there...

Come on, you guys!

Posted: Wed 15 May 2013, 09:01
by Ghost Dog
Come on, you guys! This has the potential to benefit all Puppies!

If Karl is right (Karl, where did you go?), then the problem of drive icons all bunching together on top of each other (and making Puppy look bad) might be fixed.

Don't let this die, just because I'm not smart enough to understand the implementation. I never said I was smart, so you can't expect much from me. I just pointed out a problem that I would like to see fixed, and will help if I can.

Others have joined this thread adding their support for such a solution.

Karl, can you make a working version of /sbin/pup_event_frontend_d for us to play with? I would very much appreciate it, and I know some of the others here would, too.

Posted: Wed 15 May 2013, 10:07
by Karl Godt
This is from wary-5.5 .

free command output is different from older Lupu Puppies.
path to /tmp/pup_event_icon_change_flag has changed.

EDIT > Fixed missing PIN_GRID_STEP, PIN_GRID_STEP2, MAX_X, MAX_Y