lxqt / libqtxdg

Qt implementation of freedesktop.org xdg specs
https://lxqt.github.io
GNU Lesser General Public License v2.1
72 stars 35 forks source link

Invalidate GTK icon cache as soon as icons are installed #284

Closed tsujan closed 2 years ago

tsujan commented 2 years ago

Monitoring the GTK cache itself wasn't enough for showing real icons of newly installed apps (in Main Menu). Contrary to my expectations, the reason was that the cache was invalidated too late.

Here, the folder is monitored instead, and the cache is invalidated as soon as something happens inside the folder. It will be validated again when it's updated.

Closes https://github.com/lxqt/libqtxdg/issues/226

Dami-star commented 2 years ago

I have verified that the multiple installs of the application so far are fine

tsujan commented 2 years ago

@Dami-star Thank you very much for the tests!

The core idea of this patch is yours. Here I just went in the opposite direction of what I did before.

I also installed (and uninstalled) ~15 apps after applying the patch, and their icons were shown correctly, both in Main Menu and in pcmanfm-qt. Considering your results alongside mine, I think this is the solution we searched for :)

Dami-star commented 2 years ago

@Dami-star Thank you very much for the tests!

The core idea of this patch is yours. Here I just went in the opposite direction of what I did before.

I also installed (and uninstalled) ~15 apps after applying the patch, and their icons were shown correctly, both in Main Menu and in pcmanfm-qt. Considering your results alongside mine, I think this is the solution we searched for :)

Great + 1, I also agree with this solution, I have tested and verified it under different architectures, and no problems have been found so far.

tsujan commented 2 years ago

Any objection to merging this?