summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorRishabh Kumar <kris.kr296@gmail.com>2016-07-30 15:13:02 +0530
committerTomaž Vajngerl <quikee@gmail.com>2016-08-01 09:26:37 +0000
commit55859becb87816aac0170f0f22d5d748fc022612 (patch)
treefb7f21a23ea7e2f0fc4633386346da8fdb73a2f7 /cui
parent4b2cabedaa479913e72d827983f9a60f985f4424 (diff)
[GSoC] Add functionality to disable buttons in SvxMessDialog
Change-Id: Ib25b65a6d1fd760d2a8535c1a97cfbb889d7a824 Reviewed-on: https://gerrit.libreoffice.org/27715 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/dlgname.cxx13
-rw-r--r--cui/source/inc/dlgname.hxx1
2 files changed, 14 insertions, 0 deletions
diff --git a/cui/source/dialogs/dlgname.cxx b/cui/source/dialogs/dlgname.cxx
index 6772f445f3ea..71bd359b150a 100644
--- a/cui/source/dialogs/dlgname.cxx
+++ b/cui/source/dialogs/dlgname.cxx
@@ -202,6 +202,19 @@ IMPL_LINK_NOARG_TYPED(SvxMessDialog, Button2Hdl, Button*, void)
/*************************************************************************/
+void SvxMessDialog::DisableButton( SvxMessDialogButton nBtnId )
+{
+ switch( nBtnId )
+ {
+ case SvxMessDialogButton::N1:
+ pBtn1->Disable();
+ break;
+ case SvxMessDialogButton::N2:
+ pBtn2->Disable();
+ break;
+ }
+}
+
void SvxMessDialog::SetButtonText( SvxMessDialogButton nBtnId, const OUString& rNewTxt )
{
switch ( nBtnId )
diff --git a/cui/source/inc/dlgname.hxx b/cui/source/inc/dlgname.hxx
index ac183a88e7fc..4b28ed5343bd 100644
--- a/cui/source/inc/dlgname.hxx
+++ b/cui/source/inc/dlgname.hxx
@@ -145,6 +145,7 @@ public:
SvxMessDialog( vcl::Window* pWindow, const OUString& rText, const OUString& rDesc, Image* pImg = nullptr );
virtual ~SvxMessDialog();
virtual void dispose() override;
+ void DisableButton( SvxMessDialogButton nBtnId);
void SetButtonText( SvxMessDialogButton nBtnId, const OUString& rNewTxt );
};