diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-02-19 16:33:35 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-02-22 22:07:38 +0100 |
commit | 6a4c464b49dbfa2801818ead1b50bc9580824d00 (patch) | |
tree | 3d6381b6b13576bc536670992b36784436486e95 /dbaccess/source/ui/app | |
parent | tdf#68889: Fix the weight reported by the system for the problematic font (diff) | |
download | core-6a4c464b49dbfa2801818ead1b50bc9580824d00.tar.gz core-6a4c464b49dbfa2801818ead1b50bc9580824d00.zip |
weld native message dialogs
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 <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'dbaccess/source/ui/app')
-rw-r--r-- | dbaccess/source/ui/app/AppController.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/app/AppControllerDnD.cxx | 20 | ||||
-rw-r--r-- | dbaccess/source/ui/app/AppControllerGen.cxx | 8 |
3 files changed, 15 insertions, 16 deletions
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx index fcc781ae6ef5..d5339f785a0d 100644 --- a/dbaccess/source/ui/app/AppController.cxx +++ b/dbaccess/source/ui/app/AppController.cxx @@ -84,6 +84,7 @@ #include <vcl/svapp.hxx> #include <vcl/menu.hxx> #include <vcl/lstbox.hxx> +#include <vcl/weld.hxx> #include <unotools/closeveto.hxx> #include <unotools/pathoptions.hxx> @@ -522,7 +523,7 @@ sal_Bool SAL_CALL OApplicationController::suspend(sal_Bool bSuspend) ) ) { - switch (ExecuteQuerySaveDocument(getView(),getStrippedDatabaseName())) + switch (ExecuteQuerySaveDocument(getFrameWeld(),getStrippedDatabaseName())) { case RET_YES: Execute(ID_BROWSER_SAVEDOC,Sequence<PropertyValue>()); diff --git a/dbaccess/source/ui/app/AppControllerDnD.cxx b/dbaccess/source/ui/app/AppControllerDnD.cxx index 940ca99e81ee..7012171dd72c 100644 --- a/dbaccess/source/ui/app/AppControllerDnD.cxx +++ b/dbaccess/source/ui/app/AppControllerDnD.cxx @@ -45,7 +45,7 @@ #include <unotools/ucbhelper.hxx> #include <dlgsave.hxx> #include <comphelper/types.hxx> -#include <vcl/layout.hxx> +#include <vcl/weld.hxx> #include <cppuhelper/typeprovider.hxx> #include <cppuhelper/exc_hlp.hxx> #include <connectivity/dbexception.hxx> @@ -178,8 +178,10 @@ void OApplicationController::deleteTables(const std::vector< OUString>& _rList) else { OUString sMessage(DBA_RES(STR_MISSING_TABLES_XDROP)); - ScopedVclPtrInstance< MessageDialog > aError(getView(), sMessage); - aError->Execute(); + std::unique_ptr<weld::MessageDialog> xError(Application::CreateMessageDialog(getFrameWeld(), + VclMessageType::Warning, VclButtonsType::Ok, + sMessage)); + xError->run(); } } } @@ -190,7 +192,6 @@ void OApplicationController::deleteObjects( ElementType _eType, const std::vecto Reference< XHierarchicalNameContainer > xHierarchyName( xNames, UNO_QUERY ); if ( xNames.is() ) { - OString sDialogPosition; short eResult = _bConfirm ? svtools::QUERYDELETE_YES : svtools::QUERYDELETE_ALL; // The list of elements to delete is allowed to contain related elements: A given element may @@ -213,17 +214,12 @@ void OApplicationController::deleteObjects( ElementType _eType, const std::vecto if ( eResult != svtools::QUERYDELETE_ALL ) { - ScopedVclPtrInstance< svtools::QueryDeleteDlg_Impl > aDlg(getView(), *aThisRound); - - if ( !sDialogPosition.isEmpty() ) - aDlg->SetWindowState( sDialogPosition ); + svtools::QueryDeleteDlg_Impl aDlg(getFrameWeld(), *aThisRound); if ( nObjectsLeft > 1 ) - aDlg->EnableAllButton(); - - eResult = aDlg->Execute(); + aDlg.EnableAllButton(); - sDialogPosition = aDlg->GetWindowState( ); + eResult = aDlg.run(); } bool bSuccess = false; diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx index 1e0041d958c0..99a04d7b76e7 100644 --- a/dbaccess/source/ui/app/AppControllerGen.cxx +++ b/dbaccess/source/ui/app/AppControllerGen.cxx @@ -61,7 +61,7 @@ #include <tools/diagnose_ex.h> #include <osl/diagnose.h> #include <unotools/bootstrap.hxx> -#include <vcl/layout.hxx> +#include <vcl/weld.hxx> #include <vcl/mnemonic.hxx> #include <vcl/svapp.hxx> #include <vcl/waitobj.hxx> @@ -518,8 +518,10 @@ void OApplicationController::askToReconnect() bool bClear = true; if ( !m_pSubComponentManager->empty() ) { - ScopedVclPtrInstance< MessageDialog > aQry(getView(), DBA_RES(STR_QUERY_CLOSEDOCUMENTS), VclMessageType::Question, VclButtonsType::YesNo); - switch (aQry->Execute()) + std::unique_ptr<weld::MessageDialog> xQry(Application::CreateMessageDialog(getFrameWeld(), + VclMessageType::Question, VclButtonsType::YesNo, + DBA_RES(STR_QUERY_CLOSEDOCUMENTS))); + switch (xQry->run()) { case RET_YES: closeSubComponents(); |