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

Muhammet Kara muhammet.kara at pardus.org.tr
Tue Oct 11 13:53:24 UTC 2016


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

New commits:
commit b193f283457c290e2cd75df0f3f6a185b66a516d
Author: Muhammet Kara <muhammet.kara at pardus.org.tr>
Date:   Sat Oct 8 01:09:10 2016 +0300

    tdf#102004 Do not open options for extensions without options
    
    Also fix similar issue for "Disable/Enable" and "Remove" buttons
    
    Change-Id: I383e64a9c6133ff2ebc991747c5c47c033a91174
    Reviewed-on: https://gerrit.libreoffice.org/29600
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>

diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 553f1f5..c753015 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -225,8 +225,11 @@ void ExtBoxWithBtns_Impl::RecalcAll()
     }
     else
     {
+        m_pOptionsBtn->Disable();
         m_pOptionsBtn->Hide();
+        m_pEnableBtn->Disable();
         m_pEnableBtn->Hide();
+        m_pRemoveBtn->Disable();
         m_pRemoveBtn->Hide();
     }
 
@@ -280,7 +283,10 @@ void ExtBoxWithBtns_Impl::SetButtonStatus(const TEntry_Impl& rEntry)
 
     if ( ( !rEntry->m_bUser || ( rEntry->m_eState == NOT_AVAILABLE ) || rEntry->m_bMissingDeps )
          && !rEntry->m_bMissingLic )
+    {
+        m_pEnableBtn->Disable();
         m_pEnableBtn->Hide();
+    }
     else
     {
         m_pEnableBtn->Enable( !rEntry->m_bLocked );
@@ -290,12 +296,15 @@ void ExtBoxWithBtns_Impl::SetButtonStatus(const TEntry_Impl& rEntry)
 
     if ( rEntry->m_bHasOptions && bShowOptionBtn )
     {
-        m_pOptionsBtn->Enable( rEntry->m_bHasOptions );
+        m_pOptionsBtn->Enable();
         m_pOptionsBtn->Show();
         rEntry->m_bHasButtons = true;
     }
     else
+    {
+        m_pOptionsBtn->Disable();
         m_pOptionsBtn->Hide();
+    }
 
     if ( rEntry->m_bUser || rEntry->m_bShared )
     {
@@ -304,7 +313,10 @@ void ExtBoxWithBtns_Impl::SetButtonStatus(const TEntry_Impl& rEntry)
         rEntry->m_bHasButtons = true;
     }
     else
+    {
+        m_pRemoveBtn->Disable();
         m_pRemoveBtn->Hide();
+    }
 }
 
 


More information about the Libreoffice-commits mailing list