the button not reserved order
need return true, so the dialog will close
need return true
Reverted changes done by the pull request
Fixed 2 bugs

- fixed a bug where custom buttons were showing up in reversed order;
- fixed a bug where, since the previous release, you'd have to
explicitly return TRUE from a callback function attached to a custom
button, in order for the dialog box to close;
- thanks to Stondubleyt for spotting both of the above!