diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-02-26 16:53:37 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-02-27 11:22:49 +0100 |
commit | 082e69fefb7439fd4f3d543f0c402039e94c1e9c (patch) | |
tree | 8348cacdc54a15dae722b93fc198995756924fc0 /uui/source/lockcorrupt.cxx | |
parent | f41a08183504a59d6ffc7a00ed7f24e6b19995ab (diff) |
convert various MessBox to weld::MessageDialog
Change-Id: I4d2d0393c753114aeb9bb7e646dfdc810f6caa38
Reviewed-on: https://gerrit.libreoffice.org/50398
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 'uui/source/lockcorrupt.cxx')
-rw-r--r-- | uui/source/lockcorrupt.cxx | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/uui/source/lockcorrupt.cxx b/uui/source/lockcorrupt.cxx index ce6a3545d13e..bba82db1db3f 100644 --- a/uui/source/lockcorrupt.cxx +++ b/uui/source/lockcorrupt.cxx @@ -22,22 +22,16 @@ #include "lockcorrupt.hxx" #include <unotools/resmgr.hxx> #include <vcl/button.hxx> +#include <vcl/svapp.hxx> -LockCorruptQueryBox::LockCorruptQueryBox(vcl::Window* pParent, const std::locale& rResLocale) - : MessBox(pParent, MessBoxStyle::NONE, 0, Translate::get(STR_LOCKCORRUPT_TITLE, rResLocale), OUString()) -{ - SetImage(GetStandardErrorBoxImage()); - - AddButton(Translate::get(STR_LOCKCORRUPT_OPENREADONLY_BTN, rResLocale), RET_OK, - ButtonDialogFlags::Default | ButtonDialogFlags::OK | ButtonDialogFlags::Focus); - - AddButton( StandardButtonType::Cancel, RET_CANCEL, ButtonDialogFlags::Cancel ); - - SetMessText(Translate::get(STR_LOCKCORRUPT_MSG, rResLocale)); -} - -LockCorruptQueryBox::~LockCorruptQueryBox() +LockCorruptQueryBox::LockCorruptQueryBox(weld::Window* pParent, const std::locale& rResLocale) + : m_xQueryBox(Application::CreateMessageDialog(pParent, VclMessageType::Question, + VclButtonsType::NONE, Translate::get(STR_LOCKCORRUPT_MSG, rResLocale))) { + m_xQueryBox->set_title(Translate::get(STR_LOCKCORRUPT_MSG, rResLocale)); + m_xQueryBox->add_button(Translate::get(STR_LOCKCORRUPT_OPENREADONLY_BTN, rResLocale), RET_OK); + m_xQueryBox->add_button(Button::GetStandardText(StandardButtonType::Cancel), RET_CANCEL); + m_xQueryBox->set_default_response(RET_OK); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |