diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-03-12 12:19:15 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-03-12 17:46:29 +0100 |
commit | a984387f296e2e9d073da1aad1b09f32ad41c0d2 (patch) | |
tree | 1951ec40d8ee278f039a5f3e658eff9eed5cf833 /cui | |
parent | 7953c8a9c4eb0cfc75f74e26c0f916f779830bc1 (diff) |
weld SpellOptionsDialog
Change-Id: I813b166a8c4658e08b185a43a464b6b370b62c66
Reviewed-on: https://gerrit.libreoffice.org/69099
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/SpellDialog.cxx | 16 | ||||
-rw-r--r-- | cui/source/options/optlingu.cxx | 11 | ||||
-rw-r--r-- | cui/uiconfig/ui/optlingupage.ui | 2 | ||||
-rw-r--r-- | cui/uiconfig/ui/spelloptionsdialog.ui | 9 |
4 files changed, 22 insertions, 16 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index c0af1fc96957..cf074e6614b6 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -491,16 +491,16 @@ IMPL_LINK( SpellDialog, CheckGrammarHdl, Button*, pBox, void ) void SpellDialog::StartSpellOptDlg_Impl() { SfxItemSet aSet( SfxGetpApp()->GetPool(), svl::Items<SID_AUTOSPELL_CHECK,SID_AUTOSPELL_CHECK>{}); - ScopedVclPtr<SfxSingleTabDialog> pDlg( - VclPtr<SfxSingleTabDialog>::Create( - this, aSet, "SpellOptionsDialog", "cui/ui/spelloptionsdialog.ui")); - VclPtr<SfxTabPage> pPage = SvxLinguTabPage::Create( pDlg->get_content_area(), &aSet ); - static_cast<SvxLinguTabPage*>(pPage.get())->HideGroups( GROUP_MODULES ); - pDlg->SetTabPage( pPage ); - if(RET_OK == pDlg->Execute()) + SfxSingleTabDialogController aDlg(GetFrameWeld(), aSet, "cui/ui/spelloptionsdialog.ui", "SpellOptionsDialog"); + + TabPageParent aParent(aDlg.get_content_area(), &aDlg); + VclPtr<SfxTabPage> xPage = SvxLinguTabPage::Create(aParent, &aSet); + static_cast<SvxLinguTabPage*>(xPage.get())->HideGroups( GROUP_MODULES ); + aDlg.SetTabPage(xPage); + if (RET_OK == aDlg.run()) { InitUserDicts(); - const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); + const SfxItemSet* pOutSet = aDlg.GetOutputItemSet(); if(pOutSet) OfaTreeOptionsDialog::ApplyLanguageOptions(*pOutSet); } diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index 241d679b2144..a35c8cd2dd81 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -930,10 +930,6 @@ SvxLinguTabPage::SvxLinguTabPage(TabPageParent pParent, const SfxItemSet& rSet) m_xLinguDicsCLB->set_column_fixed_widths(aWidths); m_xLinguOptionsCLB->set_column_fixed_widths(aWidths); - m_xLinguModulesCLB->set_size_request(-1, m_xLinguModulesCLB->get_height_rows(3)); - m_xLinguDicsCLB->set_size_request(-1, m_xLinguDicsCLB->get_height_rows(5)); - m_xLinguOptionsCLB->set_size_request(-1, m_xLinguOptionsCLB->get_height_rows(5)); - m_xLinguModulesCLB->connect_changed( LINK( this, SvxLinguTabPage, SelectHdl_Impl )); m_xLinguModulesCLB->connect_row_activated(LINK(this, SvxLinguTabPage, BoxDoubleClickHdl_Impl)); m_xLinguModulesCLB->connect_toggled(LINK(this, SvxLinguTabPage, ModulesBoxCheckButtonHdl_Impl)); @@ -1343,6 +1339,13 @@ void SvxLinguTabPage::Reset( const SfxItemSet* rSet ) m_xLinguOptionsCLB->set_id(nEntry, OUString::number(nUserData)); m_xLinguOptionsCLB->thaw(); + + m_xLinguModulesCLB->set_size_request(m_xLinguModulesCLB->get_preferred_size().Width(), + m_xLinguModulesCLB->get_height_rows(3)); + m_xLinguDicsCLB->set_size_request(m_xLinguDicsCLB->get_preferred_size().Width(), + m_xLinguDicsCLB->get_height_rows(5)); + m_xLinguOptionsCLB->set_size_request(m_xLinguOptionsCLB->get_preferred_size().Width(), + m_xLinguOptionsCLB->get_height_rows(5)); } IMPL_LINK(SvxLinguTabPage, BoxDoubleClickHdl_Impl, weld::TreeView&, rBox, void) diff --git a/cui/uiconfig/ui/optlingupage.ui b/cui/uiconfig/ui/optlingupage.ui index a3429fb6dd66..f2331ecb58d9 100644 --- a/cui/uiconfig/ui/optlingupage.ui +++ b/cui/uiconfig/ui/optlingupage.ui @@ -41,6 +41,8 @@ <object class="GtkGrid" id="OptLinguPage"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> <property name="border_width">6</property> <property name="row_spacing">12</property> <child> diff --git a/cui/uiconfig/ui/spelloptionsdialog.ui b/cui/uiconfig/ui/spelloptionsdialog.ui index f8668fdeac39..c715af03bda7 100644 --- a/cui/uiconfig/ui/spelloptionsdialog.ui +++ b/cui/uiconfig/ui/spelloptionsdialog.ui @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.20.0 --> +<!-- Generated with glade 3.22.1 --> <interface domain="cui"> <requires lib="gtk+" version="3.18"/> <object class="GtkDialog" id="SpellOptionsDialog"> @@ -7,7 +7,11 @@ <property name="border_width">6</property> <property name="title" translatable="yes" context="spelloptionsdialog|SpellOptionsDialog">Options</property> <property name="resizable">False</property> + <property name="modal">True</property> <property name="type_hint">dialog</property> + <child> + <placeholder/> + </child> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox1"> <property name="can_focus">False</property> @@ -80,8 +84,5 @@ <action-widget response="-6">cancel</action-widget> <action-widget response="-11">help</action-widget> </action-widgets> - <child> - <placeholder/> - </child> </object> </interface> |