Issue #624 - Truncate the titlebar button's text when it overflows

The original issue is: if the titlebar button's text is too long, the text will span beyond the screen. Here is the screenshot:
![image](https://f.cloud.github.com/assets/1450914/81448/c7a5b3f2-632c-11e2-9d63-12cd4f4379e3.png)
And here is the screenshot of the fix:
![image](https://f.cloud.github.com/assets/1450914/81449/e3f19bb6-632c-11e2-8ab1-6f1ae547815b.png)