From 6a4c464b49dbfa2801818ead1b50bc9580824d00 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 19 Feb 2018 16:33:35 +0000 Subject: weld native message dialogs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit just the straight-forward MessageDialog cases first a) remove border_width from message dialog .ui so as to take the default border width b) retain 12 as default message dialog border for vcl widget case c) remove layour_style from message dialog button boxes so as to take the default mode (a no-op for vcl widget case) d) use gtk response ids (vcl builder will converts to vcl ones) Change-Id: I7de281093a1b64f92f71ca11e7cbba42bb658154 Reviewed-on: https://gerrit.libreoffice.org/50143 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- avmedia/source/viewer/mediawindow.cxx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'avmedia/source/viewer/mediawindow.cxx') diff --git a/avmedia/source/viewer/mediawindow.cxx b/avmedia/source/viewer/mediawindow.cxx index df416bb96db7..4d8ad4edec5c 100644 --- a/avmedia/source/viewer/mediawindow.cxx +++ b/avmedia/source/viewer/mediawindow.cxx @@ -23,7 +23,8 @@ #include #include #include -#include +#include +#include #include #include #include @@ -295,16 +296,13 @@ bool MediaWindow::executeMediaURLDialog(const vcl::Window* pParent, OUString& rU return !rURL.isEmpty(); } - -void MediaWindow::executeFormatErrorBox( vcl::Window* pParent ) +void MediaWindow::executeFormatErrorBox(weld::Widget* pParent) { - ScopedVclPtrInstance< MessageDialog > aErrBox( pParent, AvmResId( AVMEDIA_STR_ERR_URL ) ); - - aErrBox->Execute(); - aErrBox.disposeAndClear(); + std::unique_ptr xBox(Application::CreateMessageDialog(pParent, + VclMessageType::Warning, VclButtonsType::Ok, AvmResId(AVMEDIA_STR_ERR_URL))); + xBox->run(); } - bool MediaWindow::isMediaURL( const OUString& rURL, const OUString& rReferer, bool bDeep, Size* pPreferredSizePixel ) { const INetURLObject aURL( rURL ); -- cgit