diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-05-21 12:14:39 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-05-21 21:39:50 +0200 |
commit | 2632adfbc2a664ab99de7e24d6fcd6841a10b6f1 (patch) | |
tree | 1e703ffbb0e4a77d3b372f74303edd0824d6f4e0 /sfx2/source/dialog/checkin.cxx | |
parent | c3a4937604fc296f3f6bf4dee48f224f255b9ffc (diff) |
weld SfxCheckinDialog
Change-Id: Iaa7954baf734229683acb81819daa332b02a7733
Reviewed-on: https://gerrit.libreoffice.org/54624
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2/source/dialog/checkin.cxx')
-rw-r--r-- | sfx2/source/dialog/checkin.cxx | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/sfx2/source/dialog/checkin.cxx b/sfx2/source/dialog/checkin.cxx index 60cd7e145cff..b4834eca5535 100644 --- a/sfx2/source/dialog/checkin.cxx +++ b/sfx2/source/dialog/checkin.cxx @@ -9,42 +9,32 @@ #include <sfx2/checkin.hxx> -SfxCheckinDialog::SfxCheckinDialog( vcl::Window* pParent ) : - ModalDialog( pParent, "CheckinDialog", "sfx/ui/checkin.ui" ) +SfxCheckinDialog::SfxCheckinDialog(weld::Window* pParent) + : GenericDialogController( pParent, "sfx/ui/checkin.ui", "CheckinDialog") + , m_xCommentED(m_xBuilder->weld_text_view("VersionComment")) + , m_xMajorCB(m_xBuilder->weld_check_button("MajorVersion")) + , m_xOKBtn(m_xBuilder->weld_button("ok")) { - get( m_pCommentED, "VersionComment" ); - get( m_pMajorCB, "MajorVersion" ); - - get( m_pOKBtn, "ok" ); - m_pOKBtn->SetClickHdl( LINK( this, SfxCheckinDialog, OKHdl ) ); + m_xOKBtn->connect_clicked(LINK(this, SfxCheckinDialog, OKHdl)); } SfxCheckinDialog::~SfxCheckinDialog() { - disposeOnce(); -} - -void SfxCheckinDialog::dispose() -{ - m_pCommentED.clear(); - m_pMajorCB.clear(); - m_pOKBtn.clear(); - ModalDialog::dispose(); } OUString SfxCheckinDialog::GetComment( ) { - return m_pCommentED->GetText( ); + return m_xCommentED->get_text(); } bool SfxCheckinDialog::IsMajor( ) { - return m_pMajorCB->IsChecked( ); + return m_xMajorCB->get_active(); } -IMPL_LINK_NOARG( SfxCheckinDialog, OKHdl, Button*, void ) +IMPL_LINK_NOARG(SfxCheckinDialog, OKHdl, weld::Button&, void ) { - EndDialog( RET_OK ); + m_xDialog->response(RET_OK); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |