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>
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 1a852e0..510e723 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1218,32 +1218,13 @@
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();
}