Help configuring Xtray to work in the bar Thread last updated on 2005-07-27 21:37:22

Posted by member 252035 on 2005-07-27 03:49:43

Hi.
I come from Vtray in the theme Designed4 should anyone be familirar with it.
Anyway here is the original code

;---===>===---

*BaseModuleHook !vTrayHook
*BaseModuleHook !TaskbarBoxHook

;---===>===---

VTrayX $BaseWidth-130$
VTrayY 5
VTrayDirection left
VTrayHeight 15
VTrayWidth 27
VTrayBitmap vtray.png
VTrayBitmapTiled
VtrayBorderLeft 4
VtrayBorderRight 4
VTrayIconSpacingX 3
VTrayIconSize 13
VTrayWrapCount 25
VTrayIconScrollStep 1
VTrayIconCleaning
VTrayAutoSize
VTrayOnAdd !TaskbarShrink 15
VTrayOnDel !TaskbarGrow 15


this is all in the bar.rc file.
In the theme.rc there are the calls to the modules and nothing else.
Now i assumed that the above code calls the vtray module with those options to be loaded in the bar module (itself composed of different modules), and changed all of this to suit xTray this way:

xTrayLoadInBox TRUE
xTrayX $BaseWidth-130$
xTrayY 5
xTrayAutoSize
xTrayDirection ".left"
xTrayShowTooltip TRUE
xTrayShowInfoTip TRUE
xTrayCleanUpInterval 1000
xTrayOnAdd !TaskbarShrink 15
xTrayOnRemove !TaskbarGrow 15
xTrayIconSize 13
xTrayBorderLeft 4
xTrayBorderRight 4
xTrayXSpacing 3
xTrayWrapCount 25
xTrayMoveable FALSE
xTrayImage vtray.png
xTrayImageMode "stretch"


Nothing shows.
Totally nothing.
If i set LoadInBox to false, then it shows and works ok.
What can i do?
Are there other files in which i should change anything else then this?

Posted by member 212670 on 2005-07-27 11:55:42 link

Well, you need a line to hook it like vtray had. Something like
*BaseModuleHook !xTrayLSBoxHook
I'm also thinking you'll want to add xtraybordertop/bottom (or all on one line: xTrayBorders left right top bottom), since you're doing autosize, so the icons are centered.

Posted by member 252035 on 2005-07-27 18:54:31 link

Thanks xcal, but i assume that all those "*Hook" calls are interlinked so it would not do it if i only change the one in the bar.rc file.
Can you tell me where should i look for other changes to be made?

Posted by member 212670 on 2005-07-27 19:07:52 link

Eh? If the theme had *BaseModuleHook !vTrayHook it needs to be replaced with *BaseModuleHook !xTrayLSBoxHook. Hooking generally requires 3 things. The module's line command (in this case xTrayLoadInBox), the hook/bang command (in this case *BaseModuleHook !xTrayLSBoxHook) and that the (x)label module be loaded AFTER the module being hooked (in this case, xtray needs to be loaded before xlabel). I'm thinking that last thing could be your problem, if you just appended xtray-ver# on to the end of the module list. It has to come before xlabel. As for where to look... open all the files in a good, tabbed text editor, and just do a search for the right word.

Oh, and keep in mind, once you get the module hooked, that all of its movement/location settings become relative to the inside of the label itself.

Posted by member 252035 on 2005-07-27 19:40:17 link

Ok i think i did the right thing.
Now it is showing more or less the way i want it.
Thank you very much for your help.
One last thing remains i hope you can help me with this also.
Here is my working code:
xTrayLoadInBox TRUE
xTrayX $BaseWidth-90$
xTrayY 5
xTrayAutoSize
xTrayDirection .left
xTrayShowTooltip TRUE
xTrayShowInfoTip TRUE
xTrayCleanUpInterval 1000
xTrayOnAdd !TaskbarShrink 15
xTrayOnRemove !TaskbarGrow 15
xTrayIconSize 13
xTrayBorders 4 4 1 1
xTrayXSpacing 3
xTrayWrapCount 25
xTrayMoveable FALSE
xTrayImage vtray.png
xTrayImageMode tile


With this code i see the background image tiling.
I mean that xtray does not assign one image per icon shown, but does something else and so image borders can be seen.

Here you can see the previous situation with vtray
http://utenti.lycos.it/Erupter/Images/vtray.jpg

and here the actual with xtray
http://utenti.lycos.it/Erupter/Images/xtray.jpg

There are 14 icons and 8 tiles.
Do you know how can i make these numbers equal?
I could not find anything in the xtray manual.



Edit: ok got it!
Used xTrayImageLeftEdge and RightEdge!
Thank you very much for your help!

Posted by member 212670 on 2005-07-27 21:37:22 link

Np, glad you figured it out.