diff options
-rw-r--r-- | config_host.mk.in | 1 | ||||
-rw-r--r-- | config_host/config_extension_update.h.in | 6 | ||||
-rw-r--r-- | configure.ac | 22 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_dialog2.cxx | 11 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_dialog2.hxx | 2 | ||||
-rw-r--r-- | scp2/source/ooo/common_brand.scp | 6 |
6 files changed, 45 insertions, 3 deletions
diff --git a/config_host.mk.in b/config_host.mk.in index ffb2debc239b..e0e01e3fd79e 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -156,6 +156,7 @@ export ENABLE_MEDIAWIKI=@ENABLE_MEDIAWIKI@ export ENABLE_MARIADBC=@ENABLE_MARIADBC@ export ENABLE_NPAPI_FROM_BROWSER=@ENABLE_NPAPI_FROM_BROWSER@ export ENABLE_ONLINE_UPDATE=@ENABLE_ONLINE_UPDATE@ +export ENABLE_EXTENSION_UPDATE=@ENABLE_EXTENSION_UPDATE@ export ENABLE_OOENV=@ENABLE_OOENV@ export ENABLE_OPENGL=@ENABLE_OPENGL@ export ENABLE_OPENGL_CANVAS=@ENABLE_OPENGL_CANVAS@ diff --git a/config_host/config_extension_update.h.in b/config_host/config_extension_update.h.in new file mode 100644 index 000000000000..5e12a78f951e --- /dev/null +++ b/config_host/config_extension_update.h.in @@ -0,0 +1,6 @@ +#ifndef CONFIG_EXTENSION_UPDATE +#define CONFIG_EXTENSION_UPDATE + +#define ENABLE_EXTENSION_UPDATE 0 + +#endif diff --git a/configure.ac b/configure.ac index ed3823ebcd64..85bbd222eba7 100644 --- a/configure.ac +++ b/configure.ac @@ -1318,6 +1318,11 @@ AC_ARG_ENABLE(online-update, LibreOffice. By default, it is enabled on Windows and Mac, disabled on Linux.]), ,) +AC_ARG_ENABLE(extension-update, + AS_HELP_STRING([--disable-extension-update], + [Disable possibility to update installed extensions.]), +,) + AC_ARG_ENABLE(release-build, AS_HELP_STRING([--enable-release-build], [Enable release build. @@ -11738,6 +11743,22 @@ fi AC_SUBST(ENABLE_ONLINE_UPDATE) dnl =================================================================== +dnl Test whether to enable extension update +dnl =================================================================== +AC_MSG_CHECKING([whether to enable extension update]) +ENABLE_EXTENSION_UPDATE= +if test "x$enable_extension_update" = "xno"; then + AC_MSG_RESULT([no]) +else + AC_MSG_RESULT([yes]) + ENABLE_EXTENSION_UPDATE="TRUE" + AC_DEFINE(ENABLE_EXTENSION_UPDATE) + SCPDEFS="$SCPDEFS -DENABLE_EXTENSION_UPDATE" +fi +AC_SUBST(ENABLE_EXTENSION_UPDATE) + + +dnl =================================================================== dnl Test whether to create MSI with LIMITUI=1 (silent install) dnl =================================================================== AC_MSG_CHECKING([whether to create MSI with LIMITUI=1 (silent install)]) @@ -12983,6 +13004,7 @@ AC_CONFIG_FILES([config_host.mk AC_CONFIG_HEADERS([config_host/config_buildid.h]) AC_CONFIG_HEADERS([config_host/config_clang.h]) AC_CONFIG_HEADERS([config_host/config_eot.h]) +AC_CONFIG_HEADERS([config_host/config_extension_update.h]) AC_CONFIG_HEADERS([config_host/config_cairo_canvas.h]) AC_CONFIG_HEADERS([config_host/config_cups.h]) AC_CONFIG_HEADERS([config_host/config_features.h]) diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx index 92b802fc4fdc..fb98cdd6bf15 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -364,7 +364,9 @@ MENU_COMMAND ExtBoxWithBtns_Impl::ShowPopupMenu( const Point & rPos, const long PopupMenu aPopup; +#if ENABLE_EXTENSION_UPDATE aPopup.InsertItem( CMD_UPDATE, DialogHelper::getResourceString( RID_CTX_ITEM_CHECK_UPDATE ) ); +#endif if ( ! GetEntryData( nPos )->m_bLocked ) { @@ -700,7 +702,6 @@ ExtMgrDialog::ExtMgrDialog(vcl::Window *pParent, TheExtensionManager *pManager, m_pAddBtn->SetClickHdl( LINK( this, ExtMgrDialog, HandleAddBtn ) ); m_pCloseBtn->SetClickHdl( LINK( this, ExtMgrDialog, HandleCloseBtn ) ); - m_pUpdateBtn->SetClickHdl( LINK( this, ExtMgrDialog, HandleUpdateBtn ) ); m_pGetExtensions->SetClickHdl( LINK( this, ExtMgrDialog, HandleHyperlink ) ); m_pCancelBtn->SetClickHdl( LINK( this, ExtMgrDialog, HandleCancelBtn ) ); @@ -714,7 +715,12 @@ ExtMgrDialog::ExtMgrDialog(vcl::Window *pParent, TheExtensionManager *pManager, m_pProgressBar->Hide(); +#if ENABLE_EXTENSION_UPDATE + m_pUpdateBtn->SetClickHdl( LINK( this, ExtMgrDialog, HandleUpdateBtn ) ); m_pUpdateBtn->Enable(false); +#else + m_pUpdateBtn->Hide(); +#endif m_aIdle.SetPriority(SchedulerPriority::LOWEST); m_aIdle.SetIdleHdl( LINK( this, ExtMgrDialog, TimeOutHdl ) ); @@ -1075,8 +1081,9 @@ IMPL_LINK_NOARG(ExtMgrDialog, HandleExtTypeCbx) IMPL_LINK_NOARG(ExtMgrDialog, HandleUpdateBtn) { +#if ENABLE_EXTENSION_UPDATE m_pManager->checkUpdates( false, true ); - +#endif return 1; } diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.hxx b/desktop/source/deployment/gui/dp_gui_dialog2.hxx index 6e8037f42ab2..97be277d8d2b 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.hxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.hxx @@ -20,6 +20,8 @@ #ifndef INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_GUI_DP_GUI_DIALOG2_HXX #define INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_GUI_DP_GUI_DIALOG2_HXX +#include <config_extension_update.h> + #include <vcl/dialog.hxx> #include <vcl/button.hxx> #include <vcl/fixed.hxx> diff --git a/scp2/source/ooo/common_brand.scp b/scp2/source/ooo/common_brand.scp index e850714cecc6..2e967c7ce8c1 100644 --- a/scp2/source/ooo/common_brand.scp +++ b/scp2/source/ooo/common_brand.scp @@ -947,7 +947,11 @@ ProfileItem gid_Brand_Profileitem_Version_Extensionupdateurl Section = "Version"; Order = 18; Key = "ExtensionUpdateURL"; - Value = "http://updateexte.libreoffice.org/ExtensionUpdateService/check.Update"; + #if defined(ENABLE_EXTENSION_UPDATE) + Value = "http://updateexte.libreoffice.org/ExtensionUpdateService/check.Update"; + #else + Value = ""; + #endif End ProfileItem gid_Brand_Profileitem_Version_ReferenceOOoMajorMinor |