diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-08-13 15:52:11 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-08-13 20:05:43 +0200 |
commit | 6f986e881c551ae218b95c162de67433901df85f (patch) | |
tree | 23fe1ac1b35956e25583f7e6f66a5b435b6c0447 /cui | |
parent | e7fe47fdea4ab7d226e752b11e21b178060ac870 (diff) |
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@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/options/optjava.cxx | 11 | ||||
-rw-r--r-- | cui/source/options/optjava.hxx | 1 |
2 files changed, 12 insertions, 0 deletions
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); |