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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Aug 13 18:06:19 UTC 2021


 cui/source/options/optjava.cxx |   11 +++++++++++
 cui/source/options/optjava.hxx |    1 +
 2 files changed, 12 insertions(+)

New commits:
commit 6f986e881c551ae218b95c162de67433901df85f
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Aug 13 15:52:11 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Aug 13 20:05:43 2021 +0200

    let return in java param dialog entry 'add' when possible
    
    Change-Id: Idfa2283dde0596db5c7fe2b56e8db761a5c75fc9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120465
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 85cd52921941..0d1414026364 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -611,6 +611,7 @@ SvxJavaParameterDlg::SvxJavaParameterDlg(weld::Window* pParent)
     m_xAssignedList->set_size_request(m_xAssignedList->get_approximate_digit_width() * 54,
                                       m_xAssignedList->get_height_rows(6));
     m_xParameterEdit->connect_changed( LINK( this, SvxJavaParameterDlg, ModifyHdl_Impl ) );
+    m_xParameterEdit->connect_activate(LINK(this, SvxJavaParameterDlg, ActivateHdl_Impl));
     m_xAssignBtn->connect_clicked( LINK( this, SvxJavaParameterDlg, AssignHdl_Impl ) );
     m_xRemoveBtn->connect_clicked( LINK( this, SvxJavaParameterDlg, RemoveHdl_Impl ) );
     m_xEditBtn->connect_clicked( LINK( this, SvxJavaParameterDlg, EditHdl_Impl ) );
@@ -652,6 +653,16 @@ IMPL_LINK_NOARG(SvxJavaParameterDlg, AssignHdl_Impl, weld::Button&, void)
     EnableRemoveButton();
 }
 
+IMPL_LINK_NOARG(SvxJavaParameterDlg, ActivateHdl_Impl, weld::Entry&, bool)
+{
+    if (m_xAssignBtn->get_sensitive())
+    {
+        AssignHdl_Impl(*m_xAssignBtn);
+        return true;
+    }
+    return false;
+}
+
 IMPL_LINK_NOARG(SvxJavaParameterDlg, EditHdl_Impl, weld::Button&, void)
 {
     EditParameter();
diff --git a/cui/source/options/optjava.hxx b/cui/source/options/optjava.hxx
index 1cb7555d6531..097b7ffb5336 100644
--- a/cui/source/options/optjava.hxx
+++ b/cui/source/options/optjava.hxx
@@ -125,6 +125,7 @@ private:
     std::unique_ptr<weld::Button> m_xEditBtn;
 
     DECL_LINK(ModifyHdl_Impl, weld::Entry&, void);
+    DECL_LINK(ActivateHdl_Impl, weld::Entry&, bool);
     DECL_LINK(AssignHdl_Impl, weld::Button&, void);
     DECL_LINK(SelectHdl_Impl, weld::TreeView&, void);
     DECL_LINK(DblClickHdl_Impl, weld::TreeView&, bool);


More information about the Libreoffice-commits mailing list