Added support for showing/hiding global buttons.
merged new global buttons support