[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - sfx2/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Jan 15 06:33:11 UTC 2019
sfx2/source/view/viewfrm.cxx | 29 +++++------------------------
1 file changed, 5 insertions(+), 24 deletions(-)
New commits:
commit 9b829d4d40d1adcb2e53a753fba015ef6ed5ac4d
Author: Justin Luth <justin_luth at sil.org>
AuthorDate: Fri Jan 11 13:46:41 2019 +0300
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Tue Jan 15 07:32:47 2019 +0100
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 at sil.org>
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
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();
}
More information about the Libreoffice-commits
mailing list