diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-03-08 09:49:36 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-03-09 13:47:52 +0100 |
commit | 48bca65f1cf381cba7cb7a4c3916155a1bca0955 (patch) | |
tree | df461652450b3e095e37a3290cbe54ab20cedfae /basctl | |
parent | c468b6910bf77e332647725da70e3cb248a9de0e (diff) |
inherit welded dialogs from a common ancestor
Change-Id: Ifa6c871a134cf89bfba71b1049a115cf7c953c42
Reviewed-on: https://gerrit.libreoffice.org/50936
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/bastypes.cxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/moduldl2.cxx | 3 | ||||
-rw-r--r-- | basctl/source/basicide/moduldlg.hxx | 5 |
3 files changed, 3 insertions, 7 deletions
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index d645a74fc272..e69e37c4aaa6 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -768,7 +768,7 @@ bool QueryPassword( const Reference< script::XLibraryContainer >& xLibContainer, } // execute dialog - nRet = aDlg.run(); + nRet = aDlg.execute(); // verify password if ( nRet == RET_OK ) diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index 9062db209b33..a1a11613ca19 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -369,8 +369,7 @@ IMPL_LINK_NOARG(NewObjectDialog, OkButtonHandler, weld::Button&, void) } NewObjectDialog::NewObjectDialog(weld::Window * pParent, ObjectMode eMode, bool bCheckName) - : m_xBuilder(Application::CreateBuilder(pParent, "modules/BasicIDE/ui/newlibdialog.ui")) - , m_xDialog(m_xBuilder->weld_dialog("NewLibDialog")) + : GenericDialogController(pParent, "modules/BasicIDE/ui/newlibdialog.ui", "NewLibDialog") , m_xEdit(m_xBuilder->weld_entry("entry")) , m_xOKButton(m_xBuilder->weld_button("ok")) , m_bCheckName(bCheckName) diff --git a/basctl/source/basicide/moduldlg.hxx b/basctl/source/basicide/moduldlg.hxx index b1fe48ad0ac4..ac9a4b37b7c7 100644 --- a/basctl/source/basicide/moduldlg.hxx +++ b/basctl/source/basicide/moduldlg.hxx @@ -42,11 +42,9 @@ enum class ObjectMode Dialog = 3, }; -class NewObjectDialog +class NewObjectDialog : public weld::GenericDialogController { private: - std::unique_ptr<weld::Builder> m_xBuilder; - std::unique_ptr<weld::Dialog> m_xDialog; std::unique_ptr<weld::Entry> m_xEdit; std::unique_ptr<weld::Button> m_xOKButton; bool m_bCheckName; @@ -54,7 +52,6 @@ private: DECL_LINK(OkButtonHandler, weld::Button&, void); public: NewObjectDialog(weld::Window* pParent, ObjectMode, bool bCheckName = false); - short run() { return m_xDialog->run(); } OUString GetObjectName() const { return m_xEdit->get_text(); } void SetObjectName(const OUString& rName) { |