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@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
This commit is contained in:
committed by
Samuel Mehrbrodt
parent
351164ea2c
commit
b193f28345
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user