Minor code restructuring of toolbarcontroller widget

Moved toolbar event listener handling into its own functions.

Change-Id: I8a2d9d636183bf48119d768ffe364fd1b8eecf9a
Merge "Minor code restructuring of toolbarcontroller widget"