diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-10-06 17:57:35 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-10-06 20:55:30 +0200 |
commit | 692c4f4d2c5995660baf747f2d15929896f6e992 (patch) | |
tree | 9ca59a05b3c3816efb6075db10ef7d9393c02825 /sw/source/ui/dochdl | |
parent | 1dc6a3aeec6d0f67990c2e18c31f094fc3edeba7 (diff) |
weld SwSelGlossaryDlg
Change-Id: I8d8b4a3b7ed461275eb4af86f3fd7709bab30586
Reviewed-on: https://gerrit.libreoffice.org/61476
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/ui/dochdl')
-rw-r--r-- | sw/source/ui/dochdl/selglos.cxx | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/sw/source/ui/dochdl/selglos.cxx b/sw/source/ui/dochdl/selglos.cxx index 3646e18b7c3c..21f22690bbc2 100644 --- a/sw/source/ui/dochdl/selglos.cxx +++ b/sw/source/ui/dochdl/selglos.cxx @@ -18,36 +18,25 @@ */ #include <swtypes.hxx> - #include <selglos.hxx> -#include <vcl/layout.hxx> - -SwSelGlossaryDlg::SwSelGlossaryDlg(vcl::Window * pParent, const OUString &rShortName) - : ModalDialog(pParent, "InsertAutoTextDialog", - "modules/swriter/ui/insertautotextdialog.ui") +SwSelGlossaryDlg::SwSelGlossaryDlg(weld::Window * pParent, const OUString &rShortName) + : GenericDialogController(pParent, "modules/swriter/ui/insertautotextdialog.ui", "InsertAutoTextDialog") + , m_xFrame(m_xBuilder->weld_frame("frame")) + , m_xGlosBox(m_xBuilder->weld_tree_view("treeview")) { - VclFrame *pFrame(get<VclFrame>("frame")); - pFrame->set_label(pFrame->get_label() + rShortName); - get(m_pGlosBox, "treeview"); - m_pGlosBox->set_height_request(m_pGlosBox->GetTextHeight() * 10); - m_pGlosBox->SetDoubleClickHdl(LINK(this, SwSelGlossaryDlg, DoubleClickHdl)); + m_xFrame->set_label(m_xFrame->get_label() + rShortName); + m_xGlosBox->set_size_request(-1, m_xGlosBox->get_height_rows(10)); + m_xGlosBox->connect_row_activated(LINK(this, SwSelGlossaryDlg, DoubleClickHdl)); } SwSelGlossaryDlg::~SwSelGlossaryDlg() { - disposeOnce(); -} - -void SwSelGlossaryDlg::dispose() -{ - m_pGlosBox.clear(); - ModalDialog::dispose(); } -IMPL_LINK_NOARG(SwSelGlossaryDlg, DoubleClickHdl, ListBox&, void) +IMPL_LINK_NOARG(SwSelGlossaryDlg, DoubleClickHdl, weld::TreeView&, void) { - EndDialog(RET_OK); + m_xDialog->response(RET_OK); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |