summaryrefslogtreecommitdiffstats
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-03-09 09:16:47 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-03-09 10:26:50 +0000
commitfd468f7c928902600ce612df0141d6ed98b09b9e (patch)
tree29203ed15028cdd4eb73951362c92c2bcf4408f0 /cui
parentupdate code a bit (diff)
downloadcore-fd468f7c928902600ce612df0141d6ed98b09b9e.tar.gz
core-fd468f7c928902600ce612df0141d6ed98b09b9e.zip
add an explicit Cancel handler
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/about.cxx9
-rw-r--r--cui/source/inc/about.hxx3
2 files changed, 11 insertions, 1 deletions
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index e0e04c5fab04..92748c58b4e1 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -163,6 +163,8 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) :
aFeaturesLink.SetBackground();
aFeaturesLink.SetClickHdl( LINK( this, AboutDialog, HandleHyperlink ) );
+ aCancelButton.SetClickHdl( LINK( this, AboutDialog, CancelHdl ) );
+
Color aTextColor( rSettings.GetWindowTextColor() );
aVersionText.SetControlForeground( aTextColor );
aCopyrightText.SetControlForeground( aTextColor );
@@ -288,6 +290,13 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) :
SetHelpId( CMD_SID_ABOUT );
}
+//-----------------------------------------------------------------------
+IMPL_LINK_NOARG(AboutDialog, CancelHdl)
+{
+ Close();
+ return 0;
+}
+
// -----------------------------------------------------------------------
IMPL_LINK( AboutDialog, HandleHyperlink, svt::FixedHyperlink*, pHyperlink )
diff --git a/cui/source/inc/about.hxx b/cui/source/inc/about.hxx
index a20b2a8bec8c..8d31a17741af 100644
--- a/cui/source/inc/about.hxx
+++ b/cui/source/inc/about.hxx
@@ -72,7 +72,8 @@ protected:
public:
AboutDialog( Window* pParent, const ResId& rId);
- DECL_LINK( HandleHyperlink, svt::FixedHyperlink * );
+ DECL_LINK(CancelHdl, void *);
+ DECL_LINK(HandleHyperlink, svt::FixedHyperlink *);
};
#endif // #ifndef _ABOUT_HXX