Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Icon on the desktop does not update after emptying the bin #9946

Open
Tracked by #1089
yaira2 opened this issue Sep 8, 2022 · 3 comments
Open
Tracked by #1089

Bug: Icon on the desktop does not update after emptying the bin #9946

yaira2 opened this issue Sep 8, 2022 · 3 comments
Labels
bug Something isn't working 👀

Comments

@yaira2
Copy link
Member

yaira2 commented Sep 8, 2022

Steps to reproduce

  • Empty recycle bin
  • See that the icon on the desktop still looks full

Steps to fix

  • Update the icon to be empty
@yaira2 yaira2 added the bug Something isn't working 👀 label Sep 8, 2022
@Josh65-2201 Josh65-2201 changed the title Icon on the desktop does not update after emptying the bin Bug: Icon on the desktop does not update after emptying the bin Sep 8, 2022
@hecksmosis
Copy link
Contributor

Should this not be merged with #9195 ?

@QuaintMako
Copy link
Contributor

QuaintMako commented Jan 3, 2023

A PR (#10113) that was implementing this issue has been made, but removed for limitation issues regarding the current implementation.

A few things to keep in mind for the next person implementing the feature:

  • There are several scenarios where the icon needs to be reevaluated:
    -- When files are deleted into the recycle bin
    -- When files are being restored in the recycle bin
    -- When files are being deleted from the recycle bin
    -- When the recycle bin is entirely restored or empty

  • The icons should be taken from Constants.ImageRes.

  • The indexes for the Constants.ImageRes are namely public const int RecycleBin = 54 and public const int EmptyRecycleBin = 55.

@QuaintMako
Copy link
Contributor

It seems there is an undocumented method from Shell32.dll called SHUpdateRecycleBinIcon that could update the icon of the RecycleBin. Might be useful for that issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 👀
Projects
Status: 🔖 Ready to build
3 participants