[Libreoffice-commits] core.git: desktop/source

Muhammet Kara muhammet.kara at pardus.org.tr
Tue Jun 6 08:38:11 UTC 2017


 desktop/source/deployment/gui/dp_gui_dialog2.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 18cf49580846c176f2c93d0072ee9de96b129a26
Author: Muhammet Kara <muhammet.kara at pardus.org.tr>
Date:   Wed May 31 19:21:26 2017 +0300

    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 at libreoffice.org>
    Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>

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() )


More information about the Libreoffice-commits mailing list