Ok - I don't know if You like it, but it is a somewhat solution:
create a text file PowerOff.sh (with gedit for example) and write there (if Your default shell is bash - if other You'll probably know what to do):
sudo shutdown -h now
Click it with Your right mouse button and in proerties: allow to execute as program.
It would be comfy to copy this file in some hidden location (i mean not to leave it on desktop).
After that You need to modify a file /etc/sudoers:
sudo gedit /etc/sudoers
at the end of this file add:
user ALL = NOPASSWD: /sbin/shutdown
where user is Your user name f.ex. thonixx if that is how you log in Ubuntu
OK, now create an activator on Your panel, click it with right mouse button, and choose:add to panel -> add activator -> your own activator -> type: program in terminal and choose Your created file PowerOff.sh
Now it should be possible to shutdown Your PC by clicking the activator on Your panel. if You wish You could even give it an icon of Your choice
In that manner You could possibly make other commands. Or even write a simple python wrapper to show a form letting You to choose if You want to reboot, shutdown, logout etc.
I gave You the solution without poping out the shutdown dialog, because You didn't really mention which shutdown button makes this errors. You could make identical solution using the command:
in bash file instead shutdown. In such case You would probably not need to edit /etc/sudoers
PS: for now it looks like a bug in Unity. try to google: org.ayatana.bamf.view
a few links:
using logout dialog from terminal or bash script
how to logout
how to edit permissions
how to write scripts in python