cui/source/dialogs/tipofthedaydlg.cxx | 11 +++-------- cui/source/inc/tipofthedaydlg.hxx | 2 -- 2 files changed, 3 insertions(+), 10 deletions(-)
New commits: commit 1629244a83092dc726276380115481283644986d Author: Heiko Tietze <tietze.he...@gmail.com> AuthorDate: Mon Oct 26 10:12:42 2020 +0100 Commit: Heiko Tietze <heiko.tie...@documentfoundation.org> CommitDate: Mon Oct 26 11:49:21 2020 +0100 Fixes to TipOfTheDay Callback removed Change-Id: I09eb95004151cf2ca068a0c23c02267d89b0ba20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104800 Tested-by: Mike Kaganski <mike.kagan...@collabora.com> Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/cui/source/dialogs/tipofthedaydlg.cxx b/cui/source/dialogs/tipofthedaydlg.cxx index b88369890529..ac6a4b9e6138 100644 --- a/cui/source/dialogs/tipofthedaydlg.cxx +++ b/cui/source/dialogs/tipofthedaydlg.cxx @@ -60,8 +60,6 @@ TipOfTheDayDialog::TipOfTheDayDialog(weld::Window* pParent) if (m_nDay > officecfg::Office::Common::Misc::LastTipOfTheDayShown::get()) m_nCurrentTip++; - m_aPreview.init(&m_aGraphic, LINK(this, TipOfTheDayDialog, ImplModifyHdl)); - UpdateTip(); } @@ -176,12 +174,9 @@ void TipOfTheDayDialog::UpdateTip() // use default image if none is available with the number if (aImageName.isEmpty() || !file_exists(aURL + aImageName)) aImageName = "tipoftheday.png"; - GraphicFilter::LoadGraphic(aURL + aImageName, OUString(), m_aGraphic); -} - -IMPL_LINK_NOARG(TipOfTheDayDialog, ImplModifyHdl, LinkParamNone*, void) -{ - m_aPreview.SetPreview(m_aGraphic); + Graphic aGraphic; + GraphicFilter::LoadGraphic(aURL + aImageName, OUString(), aGraphic); + m_aPreview.SetPreview(aGraphic); } IMPL_LINK(TipOfTheDayDialog, OnLinkClick, weld::LinkButton&, rButton, bool) diff --git a/cui/source/inc/tipofthedaydlg.hxx b/cui/source/inc/tipofthedaydlg.hxx index a63ac3cc44e5..44ea0134fe01 100644 --- a/cui/source/inc/tipofthedaydlg.hxx +++ b/cui/source/inc/tipofthedaydlg.hxx @@ -32,13 +32,11 @@ private: std::unique_ptr<weld::LinkButton> m_pLink; std::unique_ptr<weld::CustomWeld> m_pPreview; - Graphic m_aGraphic; sal_Int32 m_nCurrentTip; sal_Int32 m_nDay; void UpdateTip(); DECL_LINK(OnNextClick, weld::Button&, void); DECL_LINK(OnLinkClick, weld::LinkButton&, bool); - DECL_LINK(ImplModifyHdl, LinkParamNone*, void); public: TipOfTheDayDialog(weld::Window* pWindow); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits