diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-04-16 16:43:39 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-04-16 16:43:39 +0100 |
commit | 36245c84bacd30135ba20ad459d9450300c78b00 (patch) | |
tree | 022a8345b27e17a88b6dc87f6c6275c8df5e5d57 /cui | |
parent | f73d26889692599aadaba28db406f430b9af7d8c (diff) |
Resolves: fdo#48723 add a (hidden) CancelButton so ESC closes about dialog
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/about.cxx | 4 | ||||
-rw-r--r-- | cui/source/dialogs/about.hrc | 1 | ||||
-rw-r--r-- | cui/source/dialogs/about.src | 7 | ||||
-rw-r--r-- | cui/source/inc/about.hxx | 1 |
4 files changed, 13 insertions, 0 deletions
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index 0703f65566f2..dd39869da648 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -77,6 +77,7 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) : aCreditsButton ( this, ResId( ABOUT_BTN_CREDITS, *rId.GetResMgr() ) ), aWebsiteButton ( this, ResId( ABOUT_BTN_WEBSITE, *rId.GetResMgr() ) ), aLicenseButton ( this, ResId( ABOUT_BTN_LICENSE, *rId.GetResMgr() ) ), + aCancelButton ( this, ResId( ABOUT_BTN_CANCEL, *rId.GetResMgr() ) ), aVersionTextStr(ResId(ABOUT_STR_VERSION, *rId.GetResMgr())), m_aVendorTextStr(ResId(ABOUT_STR_VENDOR, *rId.GetResMgr())), m_aCopyrightTextStr(ResId(ABOUT_STR_COPYRIGHT, *rId.GetResMgr())), @@ -110,6 +111,9 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) : aWebsiteButton.SetClickHdl( LINK( this, AboutDialog, HandleClick ) ); aLicenseButton.SetClickHdl( LINK( this, AboutDialog, HandleClick ) ); + aCancelButton.SetClickHdl( LINK( this, AboutDialog, CancelHdl ) ); + aCancelButton.Hide(); + FreeResource(); // explicit Help-Id diff --git a/cui/source/dialogs/about.hrc b/cui/source/dialogs/about.hrc index 2841155ee925..e2c8a64f36c0 100644 --- a/cui/source/dialogs/about.hrc +++ b/cui/source/dialogs/about.hrc @@ -45,3 +45,4 @@ #define ABOUT_BTN_LICENSE 16 #define ABOUT_VERSION_TEXT 17 #define ABOUT_STR_DESCRIPTION 18 +#define ABOUT_BTN_CANCEL 19 diff --git a/cui/source/dialogs/about.src b/cui/source/dialogs/about.src index a96250323213..1e384968bdf0 100644 --- a/cui/source/dialogs/about.src +++ b/cui/source/dialogs/about.src @@ -122,6 +122,13 @@ ModalDialog RID_DEFAULTABOUT Text [ en-US ] = "libreoffice.org"; DefButton = TRUE ; }; + CancelButton ABOUT_BTN_CANCEL + { + DefButton = TRUE ; + Pos = MAP_APPFONT ( 174 , 6 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + Text [ en-US ] = "~Close"; + }; FixedImage ABOUT_IMAGE_LOGO { }; diff --git a/cui/source/inc/about.hxx b/cui/source/inc/about.hxx index c94dea1a5f89..2a81c3757722 100644 --- a/cui/source/inc/about.hxx +++ b/cui/source/inc/about.hxx @@ -56,6 +56,7 @@ private: PushButton aCreditsButton; PushButton aWebsiteButton; PushButton aLicenseButton; + CancelButton aCancelButton; String aVersionData; String aVersionTextStr; |