generializing show toolbar callback