问题
Nautilus in Ubuntu has dynamic icon, which means it changes during runtime then changes back. It changes in the Unity bar etc. for example when copying a file we see a progress icon.
I was wondering how is this done? I would like to make my applications icon dynamic too, for example during a process I would like to replace my icon with another icon ( i created that has a mini image of a can in the top left corner).
https://code.launchpad.net/~3v1n0/ubuntu/oneiric/nautilus/unity-launcher-support/+merge/70685
i found this here:
https://www.mail-archive.com/search?l=desktop-bugs@lists.ubuntu.com&q=subject:%22[Bug+821598]+Re%3A+Show+progress+bar+in+nautilus+icon+on+launcher+when+the+user+copy+file%22
If anyone can share with my the API function calls, I'm trying to convert this to ctypes.
The dynamic icon is demonstrated in this youtube video: http://www.youtube.com/watch?v=kpXlKM-9mIA
回答1:
No, nautilus is not changing icon. Instead, it tells to launcher "hey, please set progress to X% and label to xyz". You can find some documentation here. As far as I know unity launcher does not respect dynamic change of icon via ewmh ( _NET_WM_ICON & friends ) and all working solutions are very hackish: edit .desktop file and send some signals to notify it's changed (looks like you already seen related answer)
来源:https://stackoverflow.com/questions/27112040/dynamic-icon-ubuntu-nautilus