desktop/source/deployment/gui/dp_gui_dialog2.cxx |    8 +++++---
 desktop/source/deployment/gui/dp_gui_dialog2.hxx |    1 +
 2 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 3db8059cd92545a618e6ec349b090b569c60847d
Author: Caolán McNamara <caol...@redhat.com>
Date:   Wed Oct 18 15:31:57 2017 +0100

    Resolves: tdf#112891 give restart dialog a parent
    
    Change-Id: Iaeb0060f390035bb214b9d1d8d090e7b933c9f77
    Reviewed-on: https://gerrit.libreoffice.org/43509
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx 
b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 59138ad44214..9612957b8908 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -451,6 +451,7 @@ void DialogHelper::PostUserEvent( const Link<void*,void>& 
rLink, void* pCaller )
 ExtMgrDialog::ExtMgrDialog(vcl::Window *pParent, TheExtensionManager 
*pManager, Dialog::InitFlag eFlag)
     : ModelessDialog(pParent, "ExtensionManagerDialog", 
"desktop/ui/extensionmanager.ui", eFlag)
     , DialogHelper(pManager->getContext(), static_cast<Dialog*>(this))
+    , m_xRestartParent(pParent ? pParent : Application::GetDefDialogParent())
     , m_sAddPackages(DpResId(RID_STR_ADD_PACKAGES))
     , m_bHasProgress(false)
     , m_bProgressChanged(false)
@@ -546,6 +547,7 @@ void ExtMgrDialog::dispose()
     m_pProgressText.clear();
     m_pProgressBar.clear();
     m_pCancelBtn.clear();
+    m_xRestartParent.clear();
     ModelessDialog::dispose();
 }
 
@@ -1022,11 +1024,11 @@ bool ExtMgrDialog::EventNotify( NotifyEvent& rNEvt )
         return true;
 }
 
-IMPL_STATIC_LINK_NOARG(ExtMgrDialog, Restart, void*, void)
+IMPL_STATIC_LINK(ExtMgrDialog, Restart, void*, pParent, void)
 {
     SolarMutexGuard aGuard;
     ::svtools::executeRestartDialog(comphelper::getProcessComponentContext(),
-                                    nullptr, 
svtools::RESTART_REASON_EXTENSION_INSTALL);
+                                    static_cast<vcl::Window*>(pParent), 
svtools::RESTART_REASON_EXTENSION_INSTALL);
 }
 
 bool ExtMgrDialog::Close()
@@ -1040,7 +1042,7 @@ bool ExtMgrDialog::Close()
         if (!m_bClosed && m_pManager->isModified())
         {
             m_pManager->clearModified();
-            Application::PostUserEvent(LINK(nullptr, ExtMgrDialog, Restart));
+            Application::PostUserEvent(LINK(nullptr, ExtMgrDialog, Restart), 
m_xRestartParent);
         }
         m_bClosed = true;
     }
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.hxx 
b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
index cf4f423b83f7..2daae7c20e52 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.hxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
@@ -99,6 +99,7 @@ public:
 class ExtMgrDialog : public ModelessDialog,
                      public DialogHelper
 {
+    VclPtr<vcl::Window> m_xRestartParent;
     VclPtr<ExtBoxWithBtns_Impl> m_pExtensionBox;
     VclPtr<PushButton>          m_pOptionsBtn;
     VclPtr<PushButton>          m_pAddBtn;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to