diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-02-23 09:35:08 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-02-26 15:27:09 +0000 |
commit | 942f05996bc287923cdbcae12c64e57adf8ec975 (patch) | |
tree | 7005380763a9ecb93f5f27c28174633b9774abb7 /dbaccess/source/ui/dlg/ConnectionHelper.cxx | |
parent | c410a3dcfeb68ba2247c0d879727afe4ca8ed3da (diff) |
convert remaining ErrorBox to weld::MessageDialog
and
convert remaining QueryBox to weld::MessageDialog
Change-Id: Ifb4c316dee8eabf57c4940c44e29c65a2781aa6c
Diffstat (limited to 'dbaccess/source/ui/dlg/ConnectionHelper.cxx')
-rw-r--r-- | dbaccess/source/ui/dlg/ConnectionHelper.cxx | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx index a933efe269a4..cf41e45b01e3 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx @@ -33,6 +33,7 @@ #include <osl/process.h> #include <osl/diagnose.h> #include <vcl/msgbox.hxx> +#include <vcl/weld.hxx> #include <sfx2/filedlghelper.hxx> #include <dbadmin.hxx> #include <comphelper/types.hxx> @@ -475,8 +476,12 @@ namespace dbaui sQuery = sQuery.replaceFirst("$path$", aTransformer.get(OFileNotation::N_SYSTEM)); m_bUserGrabFocus = false; - ScopedVclPtrInstance< QueryBox > aQuery(GetParent(), MessBoxStyle::YesNo | MessBoxStyle::DefaultYes, sQuery); - sal_Int32 nQueryResult = aQuery->Execute(); + vcl::Window* pWin = GetParent(); + std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, + VclMessageType::Question, VclButtonsType::YesNo, + sQuery)); + xQueryBox->set_default_response(RET_YES); + sal_Int32 nQueryResult = xQueryBox->run(); m_bUserGrabFocus = true; switch (nQueryResult) @@ -492,8 +497,14 @@ namespace dbaui sQuery = sQuery.replaceFirst("$name$", aTransformer.get(OFileNotation::N_SYSTEM)); m_bUserGrabFocus = false; - ScopedVclPtrInstance< QueryBox > aWhatToDo(GetParent(), MessBoxStyle::RetryCancel | MessBoxStyle::DefaultRetry, sQuery); - nQueryResult = aWhatToDo->Execute(); + + std::unique_ptr<weld::MessageDialog> xWhatToDo(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, + VclMessageType::Question, VclButtonsType::NONE, + sQuery)); + xWhatToDo->add_button(Button::GetStandardText(StandardButtonType::Retry), RET_RETRY); + xWhatToDo->add_button(Button::GetStandardText(StandardButtonType::Cancel), RET_CANCEL); + xWhatToDo->set_default_response(RET_RETRY); + nQueryResult = xWhatToDo->run(); m_bUserGrabFocus = true; if (RET_RETRY == nQueryResult) |