summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-05-23 13:05:56 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-05-23 13:06:15 +0100
commit1765ae3f74c65ad52b79d4ee29ac761f16ddd7bf (patch)
tree36f82d71b9f7d9a1d0eb9ae9e75d179807fdb883 /cui/source
parent47f62540bd2c2f107313bb0c6f141cd4460b6379 (diff)
Resolves: tdf#99981 make ScriptSelectorDialog modal for its parent
Change-Id: Ia522b36cd1f5d47d08afa74a22cec11de465f567
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/customize/cfg.cxx4
-rw-r--r--cui/source/customize/selector.cxx15
-rw-r--r--cui/source/inc/selector.hxx2
3 files changed, 6 insertions, 15 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)
{
diff --git a/cui/source/inc/selector.hxx b/cui/source/inc/selector.hxx
index 98b7991b2384..cb5dd4295fdf 100644
--- a/cui/source/inc/selector.hxx
+++ b/cui/source/inc/selector.hxx
@@ -175,7 +175,7 @@ public:
{ m_pImageProvider = provider; }
};
-class SvxScriptSelectorDialog : public ModelessDialog
+class SvxScriptSelectorDialog : public ModalDialog
{
VclPtr<FixedText> m_pDialogDescription;
VclPtr<SvxConfigGroupListBox> m_pCategories;