summaryrefslogtreecommitdiff
path: root/sfx2/source/view/sfxbasecontroller.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-09-08 09:30:35 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-09-21 20:10:06 +0200
commitaf90b8089405d6f042207f5639e750f08798ae92 (patch)
tree0af8401f534cbce9a11e64c1819ef84413ddd912 /sfx2/source/view/sfxbasecontroller.cxx
parent416c11d189a18a08c28135b8aa5e0f12cd51dcd6 (diff)
weld infobars
note: "pushed" status listener case dropped. Doesn't seem to be an expectation for it to something in infobars, and there doesn't seem to be a working case anyway. Change-Id: I7869cc05de9918f0dd70e28b0087205db6c9506c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101945 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2/source/view/sfxbasecontroller.cxx')
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx17
1 files changed, 6 insertions, 11 deletions
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index a4706277e869..8f4ba77305db 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -1398,15 +1398,13 @@ void SfxBaseController::ShowInfoBars( )
InfobarType::WARNING);
if (pInfoBar)
{
- VclPtrInstance<PushButton> xBtn(&pViewFrame->GetWindow());
- xBtn->SetText(SfxResId(STR_CHECKOUT));
- xBtn->SetSizePixel(xBtn->GetOptimalSize());
- xBtn->SetClickHdl(LINK(this, SfxBaseController, CheckOutHandler));
- pInfoBar->addButton(xBtn);
+ weld::Button &rBtn = pInfoBar->addButton();
+ rBtn.set_label(SfxResId(STR_CHECKOUT));
+ rBtn.connect_clicked(LINK(this, SfxBaseController, CheckOutHandler));
}
}
-IMPL_LINK_NOARG ( SfxBaseController, CheckOutHandler, Button*, void )
+IMPL_LINK_NOARG ( SfxBaseController, CheckOutHandler, weld::Button&, void )
{
if ( m_pData->m_pViewShell )
m_pData->m_pViewShell->GetObjectShell()->CheckOut( );
@@ -1498,11 +1496,8 @@ void SAL_CALL SfxBaseController::appendInfobar(const OUString& sId, const OUStri
{
if (actionButton.First.isEmpty() || actionButton.Second.isEmpty())
continue;
- VclPtrInstance<PushButton> xBtn(&pViewFrame->GetWindow());
- xBtn->SetText(actionButton.First);
- xBtn->SetSizePixel(xBtn->GetOptimalSize());
- xBtn->SetCommandHandler(actionButton.Second);
- pInfoBar->addButton(xBtn);
+ weld::Button& rBtn = pInfoBar->addButton(&actionButton.Second);
+ rBtn.set_label(actionButton.First);
}
}