[Libreoffice-commits] core.git: cui/source
Caolán McNamara
caolanm at redhat.com
Mon May 23 12:06:38 UTC 2016
cui/source/customize/cfg.cxx | 4 ++--
cui/source/customize/selector.cxx | 15 +++------------
cui/source/inc/selector.hxx | 2 +-
3 files changed, 6 insertions(+), 15 deletions(-)
New commits:
commit 1765ae3f74c65ad52b79d4ee29ac761f16ddd7bf
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon May 23 13:05:56 2016 +0100
Resolves: tdf#99981 make ScriptSelectorDialog modal for its parent
Change-Id: Ia522b36cd1f5d47d08afa74a22cec11de465f567
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 6a41380..7b0178b 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 eba339d..d6a4553 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 98b7991..cb5dd42 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;
More information about the Libreoffice-commits
mailing list