cui/source/options/optjava.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cb44cf2f36e4da74ea7dcc3d06f51a85e825a497
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Thu Oct 22 14:01:07 2020 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Thu Oct 22 16:28:27 2020 +0200

    Don't make list of JREs active when parent frame is inactive
    
    When the Java framework's direct mode is used,
    there is no use in allowing the user to change the Java
    options in the "Advanced" options page, so the corresponding
    frame is grayed out, s. commit
    2976590ed9f727c24064c97d80a51e9891253119
    ("Gray out Java options when framework's direct mode is used",
    2020-10-21).
    
    For the native gtk3 implementation, this also means that the
    child widget holding the list of JREs ('m_xJavaList')
    automatically remains grayed out as long as the parent widget
    ('m_xJavaFrame') is.
    However, it turns out that this is not true for the
    plain VCL implementation (used e.g. by the gen or kf5 VCL
    plugins) where the child widget can be
    made sensitive while the parent widget is insensitive.
    
    Therefore, commit 3935a0bd3bcf747aa9bede59b045d23ab598f2d4
    ("Properly (un)tick Java checkbox in Java options in direct
    mode", 2020-10-21) resulted in the widget holding the
    list of JREs becoming active again when the
    'EnableHdl_Impl' handler was called in the non-gtk3 case
    (while the parent widget and the buttons to add JREs, edit
    Java parameters and classpath would remained grayed out).
    
    Make sure the widget holding the list of JREs remains
    grayed out along with the whole frame holding the Java
    options.
    
    Change-Id: Ic46bf317afec9bc566493ec56ab5319a78050da0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104657
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 53c10ce1aa80..29b17c891c6b 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -135,7 +135,7 @@ SvxJavaOptionsPage::~SvxJavaOptionsPage()
 
 IMPL_LINK_NOARG(SvxJavaOptionsPage, EnableHdl_Impl, weld::Button&, void)
 {
-    bool bEnable = m_xJavaEnableCB->get_active();
+    bool bEnable = m_xJavaFrame->get_sensitive() && 
m_xJavaEnableCB->get_active();
     m_xJavaList->set_sensitive(bEnable);
 }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to