It is currently March 28th, 2024, 9:39 pm

Just A Bin not updating after emptying

Get help with creating, editing & fixing problems with skins
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Just A Bin not updating after emptying

Post by jsmorley »

This is a pretty full-featured Recycle skin that I use. Visually not what you need no doubt, but probably has some approaches that might be of use.
Recycle_1.0.rmskin
2.jpg
1.jpg
You do not have the required permissions to view the files attached to this post.
J0wNs
Posts: 32
Joined: June 16th, 2018, 9:27 pm

Re: Just A Bin not updating after emptying

Post by J0wNs »

That's nice! Didn't know you could add sounds
User avatar
brax64
Posts: 172
Joined: July 8th, 2018, 8:05 pm

Re: Just A Bin not updating after emptying

Post by brax64 »

jsmorley wrote:This is a pretty full-featured Recycle skin that I use. Visually not what you need no doubt, but probably has some approaches that might be of use.

Recycle_1.0.rmskin

2.jpg

1.jpg
Hi there,
I'm having an issue with a recycle bin skin I made that does pretty much the same as yours (even tho mine is way more "rudimental" than your ;-) ); in mine skin and in your too, if you add files on the bin they update correctly, if you empty the bin again both update correctly.
If you delete permanently/restore one or more files both skins does not reflect the new situation (in example you have 5 files in the bin and restore/delete permanently 1 file, you should read 4 files and relative size, instead both skins still show 5 files and size).
Don't know if it is a window problem in my pc (window 10 64bit build 1803) or how to fix it. Any help?

this is my code:

Code: Select all


[PassiveStyle]
X=45r
Y=10r
SolidColor=0,0,0,1
StringAlign=Left
FontFace=#ff#
FontSize=#Size1#
FontColor=#color1#
AntiAlias=1

[ActiveStyle]
X=-r
Y=-2r
SolidColor=0,0,0,1
StringAlign=Left
FontFace=#ff#
FontSize=#Size2#
AntiAlias=1
Hidden=1
InlineSetting=GradientColor | 0 | #color1#  ; 0.25 | #color2# ; 1.0 

[IconStyle]
SolidColor=0,0,0,1
W=#iconsize#
ImageTint=#iconcolor#

;-------------------------------------------------------------

[Recycle1]
Measure=RecycleManager
RecycleType=Count
Substitute="0.000":"Empty Bin",".000":" Files"

[Recycle2]
Measure=RecycleManager
RecycleType=Size
Substitute=" ":"","0.000":""

[RecycleAction]
Measure=Calc
Formula=Recycle1
IfAboveAction=[#SV# binicon "#@#New Icons\Bin full.png"][#UM# binicon]
IfAboveValue=0
IfEqualAction=[#SV# binicon "#@#New Icons\Bin empty.png"][#UM# binicon]
IfEqualValue=0

[Bin]
Meter=Image
ImageName=#binicon#
MeterStyle=IconStyle
DynamicVariables=1
MouseOverAction=[#SM# mBinTextActive][#HM# mBinTextPassive][#UMT# mBinTextActive][#RD#]
MouseLeaveAction=[#SM# mBinTextPassive][#HM# mBinTextActive][#UMT# mBinTextPassive][#RD#]
LeftMouseUpAction=#CM#  Recycle1 EmptyBin
RightMouseUpAction=#CM#  Recycle1 OpenBin
ToolTipText= "LeftClick to empty the bin#CRLF#RightClick to open the bin"
X=(6*#dist1#)
Y=(6*#dist2#)

[mBinTextPassive]
Meter=String
MeterStyle=PassiveStyle
MeasureName=Recycle1
MeasureName2=Recycle2
Text="%1 %2"
AutoScale=1
NumOfDecimals=3

[mBinTextActive]
Meter=String
MeterStyle=ActiveStyle
MeasureName=Recycle1
MeasureName2=Recycle2
Text="%1 %2"
AutoScale=1
NumOfDecimals=3
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Just A Bin not updating after emptying

Post by jsmorley »

It is a known issue with the RecycleManager measure that if you don't empty it entirely, it won't reflect the change. This is due to the fact that Windows in effect "sends a signal" when the bin gets something put in it, or when it is emptied, but does not when just one or more items are removed from it. We depend on this "signal" for our operation, as the CPU cost of constantly fully monitoring the contents of the bin are outrageous. We simply can't make you pay the CPU cost to be polling the bin contents once a second.

The Windows API call that we need to use to monitor the bin mirrors the behavior of the user-facing recycle bin in Windows. It makes the assumption that it's important to know when something is put in, and important to know when it is emptied. It's less important when something is removed, as in that case it is still "non-empty", which is all the icon in Windows reflects.
User avatar
brax64
Posts: 172
Joined: July 8th, 2018, 8:05 pm

Re: Just A Bin not updating after emptying

Post by brax64 »

jsmorley wrote:It is a known issue with the RecycleManager measure that if you don't empty it entirely, it won't reflect the change. This is due to the fact that Windows in effect "sends a signal" when the bin gets something put in it, or when it is emptied, but does not when just one or more items are removed from it. We depend on this "signal" for our operation, as the CPU cost of constantly fully monitoring the contents of the bin are outrageous. We simply can't make you pay the CPU cost to be polling the bin contents once a second.

The Windows API call that we need to use to monitor the bin mirrors the behavior of the user-facing recycle bin in Windows. It makes the assumption that it's important to know when something is put in, and important to know when it is emptied. It's less important when something is removed, as in that case it is still "non-empty", which is all the icon in Windows reflects.
understood. thank you for the clear explanation!