tdf#97425 - JVM start parameters should be editable.
Bug Resolved. Change-Id: I8bd5ee684a03f8e24f0b74d63ea98923945b0870 Reviewed-on: https://gerrit.libreoffice.org/21912 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
This commit is contained in:
@@ -808,14 +808,17 @@ SvxJavaParameterDlg::SvxJavaParameterDlg( vcl::Window* pParent ) :
|
||||
m_pAssignedList->SetDropDownLineCount(6);
|
||||
m_pAssignedList->set_width_request(m_pAssignedList->approximate_char_width() * 54);
|
||||
get( m_pRemoveBtn, "removebtn");
|
||||
get( m_pEditBtn, "editbtn");
|
||||
|
||||
m_pParameterEdit->SetModifyHdl( LINK( this, SvxJavaParameterDlg, ModifyHdl_Impl ) );
|
||||
m_pAssignBtn->SetClickHdl( LINK( this, SvxJavaParameterDlg, AssignHdl_Impl ) );
|
||||
m_pRemoveBtn->SetClickHdl( LINK( this, SvxJavaParameterDlg, RemoveHdl_Impl ) );
|
||||
m_pEditBtn->SetClickHdl( LINK( this, SvxJavaParameterDlg, EditHdl_Impl ) );
|
||||
m_pAssignedList->SetSelectHdl( LINK( this, SvxJavaParameterDlg, SelectHdl_Impl ) );
|
||||
m_pAssignedList->SetDoubleClickHdl( LINK( this, SvxJavaParameterDlg, DblClickHdl_Impl ) );
|
||||
|
||||
ModifyHdl_Impl( *m_pParameterEdit );
|
||||
EnableEditButton();
|
||||
EnableRemoveButton();
|
||||
}
|
||||
|
||||
@@ -830,6 +833,7 @@ void SvxJavaParameterDlg::dispose()
|
||||
m_pAssignBtn.clear();
|
||||
m_pAssignedList.clear();
|
||||
m_pRemoveBtn.clear();
|
||||
m_pEditBtn.clear();
|
||||
ModalDialog::dispose();
|
||||
}
|
||||
|
||||
@@ -853,14 +857,30 @@ IMPL_LINK_NOARG_TYPED(SvxJavaParameterDlg, AssignHdl_Impl, Button*, void)
|
||||
m_pAssignedList->SelectEntryPos( nPos );
|
||||
m_pParameterEdit->SetText( OUString() );
|
||||
ModifyHdl_Impl( *m_pParameterEdit );
|
||||
EnableEditButton();
|
||||
EnableRemoveButton();
|
||||
}
|
||||
}
|
||||
|
||||
IMPL_LINK_NOARG_TYPED(SvxJavaParameterDlg, EditHdl_Impl, Button*, void)
|
||||
{
|
||||
sal_Int32 nPos = m_pAssignedList->GetSelectEntryPos();
|
||||
|
||||
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
|
||||
{
|
||||
OUString eVal = m_pAssignedList->GetSelectEntry();
|
||||
m_pAssignedList->RemoveEntry( nPos );
|
||||
m_pParameterEdit->SetText( eVal );
|
||||
}
|
||||
DisableRemoveButton();
|
||||
DisableEditButton();
|
||||
EnableAssignButton();
|
||||
}
|
||||
|
||||
|
||||
IMPL_LINK_NOARG_TYPED(SvxJavaParameterDlg, SelectHdl_Impl, ListBox&, void)
|
||||
{
|
||||
EnableEditButton();
|
||||
EnableRemoveButton();
|
||||
}
|
||||
|
||||
@@ -893,7 +913,6 @@ IMPL_LINK_NOARG_TYPED(SvxJavaParameterDlg, RemoveHdl_Impl, Button*, void)
|
||||
}
|
||||
|
||||
|
||||
|
||||
short SvxJavaParameterDlg::Execute()
|
||||
{
|
||||
m_pParameterEdit->GrabFocus();
|
||||
|
||||
@@ -127,18 +127,40 @@ private:
|
||||
VclPtr<ListBox> m_pAssignedList;
|
||||
VclPtr<PushButton> m_pRemoveBtn;
|
||||
|
||||
VclPtr<PushButton> m_pEditBtn;
|
||||
|
||||
DECL_LINK_TYPED(ModifyHdl_Impl, Edit&, void);
|
||||
DECL_LINK_TYPED(AssignHdl_Impl, Button*, void);
|
||||
DECL_LINK_TYPED(SelectHdl_Impl, ListBox&, void);
|
||||
DECL_LINK_TYPED(DblClickHdl_Impl, ListBox&, void);
|
||||
DECL_LINK_TYPED(RemoveHdl_Impl, Button*, void);
|
||||
|
||||
DECL_LINK_TYPED(EditHdl_Impl, Button*, void);
|
||||
|
||||
inline void EnableRemoveButton()
|
||||
{ m_pRemoveBtn->Enable(
|
||||
m_pAssignedList->GetSelectEntryPos()
|
||||
!= LISTBOX_ENTRY_NOTFOUND ); }
|
||||
|
||||
|
||||
inline void EnableEditButton()
|
||||
{ m_pEditBtn->Enable(
|
||||
m_pAssignedList->GetSelectEntryPos()
|
||||
!= LISTBOX_ENTRY_NOTFOUND ); }
|
||||
|
||||
inline void EnableAssignButton()
|
||||
{ m_pAssignBtn->Enable(
|
||||
true ); }
|
||||
|
||||
inline void DisableRemoveButton()
|
||||
{ m_pRemoveBtn->Disable(
|
||||
true ); }
|
||||
|
||||
inline void DisableEditButton()
|
||||
{ m_pEditBtn->Disable(
|
||||
true ); }
|
||||
|
||||
|
||||
public:
|
||||
explicit SvxJavaParameterDlg( vcl::Window* pParent );
|
||||
virtual ~SvxJavaParameterDlg();
|
||||
@@ -172,6 +194,7 @@ private:
|
||||
{ m_pRemoveBtn->Enable(
|
||||
m_pPathList->GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND ); }
|
||||
|
||||
|
||||
public:
|
||||
explicit SvxJavaClassPathDlg( vcl::Window* pParent );
|
||||
virtual ~SvxJavaClassPathDlg();
|
||||
|
||||
@@ -190,6 +190,20 @@
|
||||
<property name="top_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="editbtn">
|
||||
<property name="label" translatable="yes">_Edit</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
|
||||
Reference in New Issue
Block a user