diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-05-16 21:19:52 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-05-17 09:04:57 +0100 |
commit | 3c8b38521aa584704cfa153c51fb15ca601daf9f (patch) | |
tree | c9c042ff6d899bbfbd2b72aa8cf7420a2a03e743 /uui/source/masterpassworddlg.cxx | |
parent | 98143564ddffd6deb19a11f84e07efd97ae68048 (diff) |
weld MasterPasswordCreateDialog and MasterPasswordDialog
Change-Id: I4c235546590046b06a1fea9b62d91cf2da664227
Diffstat (limited to 'uui/source/masterpassworddlg.cxx')
-rw-r--r-- | uui/source/masterpassworddlg.cxx | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/uui/source/masterpassworddlg.cxx b/uui/source/masterpassworddlg.cxx index 65146101ced7..5e62a85b879c 100644 --- a/uui/source/masterpassworddlg.cxx +++ b/uui/source/masterpassworddlg.cxx @@ -25,45 +25,35 @@ // MasterPasswordDialog--------------------------------------------------- - -IMPL_LINK_NOARG(MasterPasswordDialog, OKHdl_Impl, Button*, void) +IMPL_LINK_NOARG(MasterPasswordDialog, OKHdl_Impl, weld::Button&, void) { - EndDialog( RET_OK ); + m_xDialog->response(RET_OK); } - MasterPasswordDialog::MasterPasswordDialog ( - vcl::Window* pParent, + weld::Window* pParent, css::task::PasswordRequestMode nDialogMode, const std::locale& rLocale ) - : ModalDialog(pParent, "MasterPasswordDialog", "uui/ui/masterpassworddlg.ui") + : GenericDialogController(pParent, "uui/ui/masterpassworddlg.ui", "MasterPasswordDialog") , rResLocale(rLocale) + , m_xEDMasterPassword(m_xBuilder->weld_entry("password")) + , m_xOKBtn(m_xBuilder->weld_button("ok")) { - get(m_pEDMasterPassword, "password"); - get(m_pOKBtn, "ok"); if( nDialogMode == css::task::PasswordRequestMode_PASSWORD_REENTER ) { OUString aErrorMsg(Translate::get(STR_ERROR_MASTERPASSWORD_WRONG, rResLocale)); - std::unique_ptr<weld::MessageDialog> xErrorBox(Application::CreateMessageDialog(pParent ? pParent->GetFrameWeld() : nullptr, + std::unique_ptr<weld::MessageDialog> xErrorBox(Application::CreateMessageDialog(pParent, VclMessageType::Warning, VclButtonsType::Ok, aErrorMsg)); xErrorBox->run(); } - m_pOKBtn->SetClickHdl( LINK( this, MasterPasswordDialog, OKHdl_Impl ) ); + m_xOKBtn->connect_clicked( LINK( this, MasterPasswordDialog, OKHdl_Impl ) ); }; MasterPasswordDialog::~MasterPasswordDialog() { - disposeOnce(); -} - -void MasterPasswordDialog::dispose() -{ - m_pEDMasterPassword.clear(); - m_pOKBtn.clear(); - ModalDialog::dispose(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |