diff options
author | Heiko Tietze <tietze.heiko@gmail.com> | 2020-10-26 10:12:42 +0100 |
---|---|---|
committer | Heiko Tietze <heiko.tietze@documentfoundation.org> | 2020-10-26 11:49:21 +0100 |
commit | 1629244a83092dc726276380115481283644986d (patch) | |
tree | f676b79d69da5cd4c1e2ca83d6258f8541e88e79 /cui | |
parent | a9266c39cc71c6f23bfcad4ff6d33ccac53b5e52 (diff) |
Fixes to TipOfTheDay
Callback removed
Change-Id: I09eb95004151cf2ca068a0c23c02267d89b0ba20
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104800
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/tipofthedaydlg.cxx | 11 | ||||
-rw-r--r-- | cui/source/inc/tipofthedaydlg.hxx | 2 |
2 files changed, 3 insertions, 10 deletions
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); |