diff options
author | Justin Luth <justin_luth@sil.org> | 2019-01-11 13:46:41 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-01-15 07:32:47 +0100 |
commit | 9b829d4d40d1adcb2e53a753fba015ef6ed5ac4d (patch) | |
tree | 732cc31d9cc273db6beea01c77dbf9245038da76 | |
parent | b2fa854e81d329c9ed49bd10944cea1a430ecf7e (diff) |
tdf#120271 thanks ESC: disable getInvolved for stable 6.1 build
https://lists.freedesktop.org/archives/libreoffice/2019-January/081715.html
with the revelant part being:
AI: + propose remove it from 6.3 and 6.1-stable (Justin)
AI: => disable for 6.1 for now
Because it is possible for both getInvolved and donate to pop
up simultaneously (by setting lasttime to 1 for example), it
is best to reset it to 0, so that if re-activated again at some point
(like switching to 6.2) then the 90 day timer will again be
started fresh instead of being triggered immediately.
Change-Id: I4e6bc3c23f569302e8c132a3bf1474735199532a
Reviewed-on: https://gerrit.libreoffice.org/66158
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 1a852e0f1f2a..510e7238a417 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -1218,32 +1218,13 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) rBind.Invalidate( SID_RELOAD ); rBind.Invalidate( SID_EDITDOC ); - // inform about the community involvement - const sal_Int64 nLastShown = officecfg::Setup::Product::LastTimeGetInvolvedShown::get(); - const sal_Int64 nNow = std::chrono::duration_cast<std::chrono::seconds>(std::chrono::system_clock::now().time_since_epoch()).count(); - const sal_Int64 nPeriodSec(60 * 60 * 24 * 30); // 30 days in seconds - bool bUpdateLastTimeGetInvolvedShown = false; - - if (nLastShown == 0) - bUpdateLastTimeGetInvolvedShown = true; - else if (nPeriodSec < nNow && nLastShown < nNow - nPeriodSec) - { - bUpdateLastTimeGetInvolvedShown = true; - - VclPtr<SfxInfoBarWindow> pInfoBar = AppendInfoBar("getinvolved", SfxResId(STR_GET_INVOLVED_TEXT), InfoBarType::Info); - - VclPtrInstance<PushButton> xGetInvolvedButton(&GetWindow()); - xGetInvolvedButton->SetText(SfxResId(STR_GET_INVOLVED_BUTTON)); - xGetInvolvedButton->SetSizePixel(xGetInvolvedButton->GetOptimalSize()); - xGetInvolvedButton->SetClickHdl(LINK(this, SfxViewFrame, GetInvolvedHandler)); - pInfoBar->addButton(xGetInvolvedButton); - } - - if (bUpdateLastTimeGetInvolvedShown - && !officecfg::Setup::Product::LastTimeGetInvolvedShown::isReadOnly()) + // Inform about the community involvement (disabled for 6.1 stable as per ESC decision). + // Reset the timers so that both "get involved" and "donate" don't pop up simultaneously + // when the feature is re-activated by 6.2. + if (!officecfg::Setup::Product::LastTimeGetInvolvedShown::isReadOnly()) { std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create()); - officecfg::Setup::Product::LastTimeGetInvolvedShown::set(nNow, batch); + officecfg::Setup::Product::LastTimeGetInvolvedShown::set(0, batch); batch->commit(); } |