summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuhammet Kara <muhammet.kara@pardus.org.tr>2017-05-31 19:21:26 +0300
committerKatarina Behrens <Katarina.Behrens@cib.de>2017-06-06 10:37:48 +0200
commit18cf49580846c176f2c93d0072ee9de96b129a26 (patch)
tree8c19f10c5d371313e85d0c17f767a5ae0b14170d
parent13f91bdc0c8cdb5c6107f2c5ebebe4611be8fe81 (diff)
tdf#36019: Disable context menu entry for extension removal properly
When ExtensionSecurity::DisableExtensionRemoval is set in expert configurations, context menu entry of 'remove' for installed extensions should also be disabled along with the "Remove" button on the dialog. Change-Id: I66e4a8aafbaa633ab5626844c8df9e036045cd09 Reviewed-on: https://gerrit.libreoffice.org/38283 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 2e5f00fc8654..ce45a2b6ab79 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -263,7 +263,10 @@ MENU_COMMAND ExtBoxWithBtns_Impl::ShowPopupMenu( const Point & rPos, const long
else if ( GetEntryData( nPos )->m_eState != NOT_AVAILABLE )
aPopup->InsertItem( CMD_ENABLE, DialogHelper::getResourceString( RID_CTX_ITEM_ENABLE ) );
}
- aPopup->InsertItem( CMD_REMOVE, DialogHelper::getResourceString( RID_CTX_ITEM_REMOVE ) );
+ if (!officecfg::Office::ExtensionManager::ExtensionSecurity::DisableExtensionRemoval::get())
+ {
+ aPopup->InsertItem( CMD_REMOVE, DialogHelper::getResourceString( RID_CTX_ITEM_REMOVE ) );
+ }
}
if ( !GetEntryData( nPos )->m_sLicenseText.isEmpty() )