diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-11-29 09:19:25 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-11-29 10:35:14 +0000 |
commit | 5d846ebeb55b1e295fb53f473f0fb2b88712e001 (patch) | |
tree | 46b0125e6e24c9c584f5d5a069528361d6708964 /vcl | |
parent | 625f1cd72e834910342790195f19c3930988c34e (diff) |
Install a Cancel callback, don't rely on vcl searching for a parent to close
If there is no cancel callback for a Cancel button, it's monstrous to dig
around the hierarchy looking for a parent to call EndDialog/Close on. Really
messes up attempts to refactor dialogs.
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/control/button.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index ac88195eca9c..25e8de594664 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -1772,6 +1772,7 @@ OKButton::OKButton( Window* pParent, const ResId& rResId ) : void OKButton::Click() { + SAL_WARN_IF(!GetClickHdl(), "vcl", "No handler installed for OKButton"); // Ist kein Link gesetzt, dann schliesse Parent if ( !GetClickHdl() ) { @@ -1838,6 +1839,7 @@ CancelButton::CancelButton( Window* pParent, const ResId& rResId ) : void CancelButton::Click() { + SAL_WARN_IF(!GetClickHdl(), "vcl", "No handler installed for CancelButton"); // Ist kein Link gesetzt, dann schliesse Parent if ( !GetClickHdl() ) { @@ -1904,6 +1906,7 @@ HelpButton::HelpButton( Window* pParent, const ResId& rResId ) : void HelpButton::Click() { + SAL_WARN_IF(!GetClickHdl(), "vcl", "No handler installed for HelpButton"); // Ist kein Link gesetzt, loese Hilfe aus if ( !GetClickHdl() ) { |