Simplify string_sub() 'end' parameter; 0 can now be used to signify strlen(str) to improve performance (as string_sub() does internal strlen() anyway, this can avoid multiple calls to strlen()). Also improve performance when using string_sub() with either start or end being negative, by avoiding multiple strlen() calls.
Fix #7.
Always set priority of clicked widget, even if the widget object handles the event itself.