Improve the code of the actions in the header of the system tray applet
This patch fixes an issue where action remain disabled after changing its visibility off/on by filtering actions and creating buttons for visible actions only. It also slightly improves the code.