[Libreoffice-commits] core.git: desktop/Library_deployment.mk desktop/source include/svtools svtools/source svtools/uiconfig

irem iremsendur1 at gmail.com
Thu Jun 23 06:44:46 UTC 2016


 desktop/Library_deployment.mk                             |    2 +
 desktop/source/deployment/manager/dp_extensionmanager.cxx |    6 ++++
 include/svtools/restartdialog.hxx                         |    5 +++-
 svtools/source/dialogs/restartdialog.cxx                  |    3 ++
 svtools/uiconfig/ui/restartdialog.ui                      |   17 +++++++++++++-
 5 files changed, 31 insertions(+), 2 deletions(-)

New commits:
commit 2c1056d679187a702bad3a2ba5dcb6b068e1aa5e
Author: irem <iremsendur1 at gmail.com>
Date:   Mon May 23 09:43:44 2016 +0100

    tdf#46279 Show restart message after extension installation
    
    Change-Id: I91feab63b77055b8f73d0fb481a76586b249160c
    Reviewed-on: https://gerrit.libreoffice.org/24595
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: jan iversen <jani at documentfoundation.org>

diff --git a/desktop/Library_deployment.mk b/desktop/Library_deployment.mk
index ac32ceb..269b98e 100644
--- a/desktop/Library_deployment.mk
+++ b/desktop/Library_deployment.mk
@@ -29,9 +29,11 @@ $(eval $(call gb_Library_use_libraries,deployment,\
     deploymentmisc \
     sal \
     svl \
+    svt \
     tl \
     ucbhelper \
     utl \
+    vcl \
     xmlscript \
     i18nlangtag \
 	$(gb_UWINAPI) \
diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx
index e09ba86..c3e4807 100644
--- a/desktop/source/deployment/manager/dp_extensionmanager.cxx
+++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx
@@ -40,9 +40,12 @@
 #include <com/sun/star/uno/XComponentContext.hpp>
 #include <com/sun/star/io/XInputStream.hpp>
 #include <com/sun/star/util/XModifyBroadcaster.hpp>
+#include <comphelper/processfactory.hxx>
 #include <comphelper/sequence.hxx>
 #include <xmlscript/xml_helper.hxx>
 #include <osl/diagnose.h>
+#include <svtools/restartdialog.hxx>
+#include <vcl/svapp.hxx>
 #include "dp_interact.h"
 #include "dp_resource.h"
 #include "dp_ucb.h"
@@ -1493,6 +1496,9 @@ void ExtensionManager::fireModified()
             [this] (uno::Reference<util::XModifyListener> const& xListener)
                 { return xListener->modified(lang::EventObject(static_cast<OWeakObject *>(this))); });
     }
+
+    SolarMutexGuard aGuard;
+    ::svtools::executeRestartDialog(comphelper::getProcessComponentContext(), nullptr, svtools::RESTART_REASON_EXTENSION_INSTALL);
 }
 
 } // namespace dp_manager
diff --git a/include/svtools/restartdialog.hxx b/include/svtools/restartdialog.hxx
index e04f5f6..2d0ccd8 100644
--- a/include/svtools/restartdialog.hxx
+++ b/include/svtools/restartdialog.hxx
@@ -47,9 +47,12 @@ enum RestartReason {
     RESTART_REASON_ASSIGNING_FOLDERS,
         // "For the assigned folders and archives to take effect,
         // %PRODUCTNAME must be restarted."
-    RESTART_REASON_EXP_FEATURES
+    RESTART_REASON_EXP_FEATURES,
         // "For the modified experimental features to take effect,
         // %PRODUCTNAME must be restarted."
+    RESTART_REASON_EXTENSION_INSTALL
+        // "For the extension to work properly,
+        // %PRODUCTNAME must be restarted."
 };
 
 // Must be called with the solar mutex locked:
diff --git a/svtools/source/dialogs/restartdialog.cxx b/svtools/source/dialogs/restartdialog.cxx
index bc6c3f7..2c15283 100644
--- a/svtools/source/dialogs/restartdialog.cxx
+++ b/svtools/source/dialogs/restartdialog.cxx
@@ -58,6 +58,9 @@ public:
         case svtools::RESTART_REASON_EXP_FEATURES:
             get(reason_,"reason_exp_features");
             break;
+        case svtools::RESTART_REASON_EXTENSION_INSTALL:
+            get(reason_, "reason_extension_install");
+            break;
         default:
             assert(false); // this cannot happen
         }
diff --git a/svtools/uiconfig/ui/restartdialog.ui b/svtools/uiconfig/ui/restartdialog.ui
index cf378ac..c9765e7 100644
--- a/svtools/uiconfig/ui/restartdialog.ui
+++ b/svtools/uiconfig/ui/restartdialog.ui
@@ -196,6 +196,21 @@
               </packing>
             </child>
             <child>
+              <object class="GtkLabel" id="reason_extension_install">
+                <property name="can_focus">False</property>
+                <property name="no_show_all">True</property>
+                <property name="label" translatable="yes">For the extension to work properly, %PRODUCTNAME must be restarted.</property>
+                <property name="wrap">True</property>
+                <property name="max_width_chars">50</property>
+                <property name="xalign">0</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">9</property>
+              </packing>
+            </child>
+            <child>
               <object class="GtkLabel" id="label">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
@@ -206,7 +221,7 @@
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">True</property>
-                <property name="position">9</property>
+                <property name="position">10</property>
               </packing>
             </child>
           </object>


More information about the Libreoffice-commits mailing list