diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-05-23 13:05:56 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-05-23 13:06:15 +0100 |
commit | 1765ae3f74c65ad52b79d4ee29ac761f16ddd7bf (patch) | |
tree | 36f82d71b9f7d9a1d0eb9ae9e75d179807fdb883 /cui/source/customize | |
parent | 47f62540bd2c2f107313bb0c6f141cd4460b6379 (diff) |
Resolves: tdf#99981 make ScriptSelectorDialog modal for its parent
Change-Id: Ia522b36cd1f5d47d08afa74a22cec11de465f567
Diffstat (limited to 'cui/source/customize')
-rw-r--r-- | cui/source/customize/cfg.cxx | 4 | ||||
-rw-r--r-- | cui/source/customize/selector.cxx | 15 |
2 files changed, 5 insertions, 14 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 6a4138075b1a..7b0178b8dc55 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -2810,7 +2810,7 @@ IMPL_LINK_NOARG_TYPED( SvxMenuConfigPage, AddCommandsHdl, Button *, void ) m_pSelectorDlg->SetImageProvider( GetSaveInData() ); - m_pSelectorDlg->Show(); + m_pSelectorDlg->Execute(); } SaveInData* SvxMenuConfigPage::CreateSaveInData( @@ -4690,7 +4690,7 @@ IMPL_LINK_NOARG_TYPED( SvxToolbarConfigPage, AddCommandsHdl, Button *, void ) m_pSelectorDlg->SetImageProvider( GetSaveInData() ); - m_pSelectorDlg->Show(); + m_pSelectorDlg->Execute(); } IMPL_LINK_NOARG_TYPED( SvxToolbarConfigPage, AddFunctionHdl, SvxScriptSelectorDialog&, void ) diff --git a/cui/source/customize/selector.cxx b/cui/source/customize/selector.cxx index eba339db7cdd..d6a455308b2a 100644 --- a/cui/source/customize/selector.cxx +++ b/cui/source/customize/selector.cxx @@ -904,7 +904,7 @@ void SvxConfigGroupListBox::RequestingChildren( SvTreeListEntry *pEntry ) SvxScriptSelectorDialog::SvxScriptSelectorDialog( vcl::Window* pParent, bool bShowSlots, const Reference< frame::XFrame >& xFrame) - : ModelessDialog(pParent, "MacroSelectorDialog", "cui/ui/macroselectordialog.ui") + : ModalDialog(pParent, "MacroSelectorDialog", "cui/ui/macroselectordialog.ui") , m_bShowSlots(bShowSlots) { get<FixedText>("libraryft")->Show(!m_bShowSlots); @@ -964,7 +964,7 @@ void SvxScriptSelectorDialog::dispose() m_pOKButton.clear(); m_pCancelButton.clear(); m_pDescriptionText.clear(); - ModelessDialog::dispose(); + ModalDialog::dispose(); } IMPL_LINK_TYPED( SvxScriptSelectorDialog, SelectHdl, SvTreeListBox*, pCtrl, void ) @@ -1012,16 +1012,7 @@ IMPL_LINK_TYPED( SvxScriptSelectorDialog, ClickHdl, Button *, pButton, void ) { if (pButton == m_pCancelButton) { - // If we are displaying Slot API commands then the dialog is being - // run from Tools/Configure and we should not close it, just hide it - if ( !m_bShowSlots ) - { - EndDialog(); - } - else - { - Hide(); - } + EndDialog(); } else if (pButton == m_pOKButton) { |