diff options
author | Thorsten Behrens <thorsten.behrens@allotropia.de> | 2021-01-23 17:04:42 +0100 |
---|---|---|
committer | Thorsten Behrens <thorsten.behrens@allotropia.de> | 2021-01-23 17:04:42 +0100 |
commit | 0a8737c61abe41740b390661971f27926f1f7ccb (patch) | |
tree | 9390103784180e7e8b89d13aa733f688ae33e173 /sfx2/source | |
parent | cb82b341c0ccb7aea3dbde06e9cd1418f0717409 (diff) |
Also remove donate/involvement info bar code
Follow-up commit to e9e61aa30af25df0e10f726e57fee6d2ba74d2b3 which
already removed the menu entries.
Change-Id: Ieb029d4fe5d0b986270de68a8a35a0d6aeaa4c26
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/appl/appserv.cxx | 27 | ||||
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 99 |
2 files changed, 0 insertions, 126 deletions
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index f15e39282682..9295718c37ab 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -565,33 +565,6 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) sfx2::openUriExternally(sURL, false); break; } - case SID_GETINVOLVED: - { - // Open get involved/join us page based on locales - OUString sURL(officecfg::Office::Common::Menus::GetInvolvedURL::get() + //https://hub.libreoffice.org/joinus/ - "?LOlocale=" + utl::ConfigManager::getUILocale()); - sfx2::openUriExternally(sURL, false); - break; - } - case SID_DONATION: - { - // Open donation page based on language + script (BCP47) with language as fall back. - OUString aLang = LanguageTag(utl::ConfigManager::getUILocale()).getLanguage(); - OUString aBcp47 = LanguageTag(utl::ConfigManager::getUILocale()).getBcp47(); - OUString sURL(officecfg::Office::Common::Menus::DonationURL::get() + //https://hub.libreoffice.org/donation/ - "?BCP47=" + aBcp47 + "&LOlang=" + aLang ); - sfx2::openUriExternally(sURL, false); - break; - } - case SID_WHATSNEW: - { - // Open release notes depending on version and locale - OUString sURL(officecfg::Office::Common::Menus::ReleaseNotesURL::get() + //https://hub.libreoffice.org/ReleaseNotes/ - "?LOvers=" + utl::ConfigManager::getProductVersion() + - "&LOlocale=" + LanguageTag(utl::ConfigManager::getUILocale()).getBcp47() ); - sfx2::openUriExternally(sURL, false); - break; - } case SID_SHOW_LICENSE: { LicenseDialog aDialog(rReq.GetFrameWeld()); diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 5a64599e5894..23e318fa761c 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -1294,34 +1294,6 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) bIsUITest = true; } - //what's new infobar - if (!officecfg::Setup::Product::ooSetupLastVersion::isReadOnly()) //don't show/update when readonly - { - OUString sSetupVersion = utl::ConfigManager::getProductVersion(); - sal_Int32 iCurrent = sSetupVersion.getToken(0,'.').toInt32() * 10 + sSetupVersion.getToken(1,'.').toInt32(); - OUString sLastVersion - = officecfg::Setup::Product::ooSetupLastVersion::get().get_value_or("0.0"); - sal_Int32 iLast = sLastVersion.getToken(0,'.').toInt32() * 10 + sLastVersion.getToken(1,'.').toInt32(); - if ((iCurrent > iLast) && !Application::IsHeadlessModeEnabled() && !bIsUITest) - { - VclPtr<SfxInfoBarWindow> pInfoBar = AppendInfoBar("whatsnew", "", SfxResId(STR_WHATSNEW_TEXT), InfobarType::INFO); - if (pInfoBar) - { - VclPtrInstance<PushButton> xWhatsNewButton(&GetWindow()); - xWhatsNewButton->SetText(SfxResId(STR_WHATSNEW_BUTTON)); - xWhatsNewButton->SetSizePixel(xWhatsNewButton->GetOptimalSize()); - xWhatsNewButton->SetClickHdl(LINK(this, SfxViewFrame, WhatsNewHandler)); - pInfoBar->addButton(xWhatsNewButton); - - //update lastversion - std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create()); - officecfg::Setup::Product::ooSetupLastVersion::set( - sSetupVersion, batch); - batch->commit(); - } - } - } - // show tip-of-the-day dialog const bool bShowTipOfTheDay = officecfg::Office::Common::Misc::ShowTipOfTheDay::get(); if (bShowTipOfTheDay && !Application::IsHeadlessModeEnabled() && !bIsUITest) { @@ -1334,62 +1306,6 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) } } //bShowTipOfTheDay - // inform about the community involvement - const sal_Int64 nLastGetInvolvedShown = officecfg::Setup::Product::LastTimeGetInvolvedShown::get(); - const sal_Int64 nNow = std::chrono::duration_cast<std::chrono::seconds>(t0).count(); - const sal_Int64 nPeriodSec(60 * 60 * 24 * 180); // 180 days in seconds - bool bUpdateLastTimeGetInvolvedShown = false; - - if (nLastGetInvolvedShown == 0) - bUpdateLastTimeGetInvolvedShown = true; - else if (nPeriodSec < nNow && nLastGetInvolvedShown < (nNow + nPeriodSec/2) - nPeriodSec) // 90d alternating with donation - { - 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()) - { - std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create()); - officecfg::Setup::Product::LastTimeGetInvolvedShown::set(nNow, batch); - batch->commit(); - } - - // inform about donations - const sal_Int64 nLastDonateShown = officecfg::Setup::Product::LastTimeDonateShown::get(); - bool bUpdateLastTimeDonateShown = false; - - if (nLastDonateShown == 0) - bUpdateLastTimeDonateShown = true; - else if (nPeriodSec < nNow && nLastDonateShown < nNow - nPeriodSec) // 90d alternating with getinvolved - { - bUpdateLastTimeDonateShown = true; - - VclPtr<SfxInfoBarWindow> pInfoBar = AppendInfoBar("donate", "", SfxResId(STR_DONATE_TEXT), InfobarType::INFO); - - VclPtrInstance<PushButton> xDonateButton(&GetWindow()); - xDonateButton->SetText(SfxResId(STR_DONATE_BUTTON)); - xDonateButton->SetSizePixel(xDonateButton->GetOptimalSize()); - xDonateButton->SetClickHdl(LINK(this, SfxViewFrame, DonationHandler)); - pInfoBar->addButton(xDonateButton); - } - - if (bUpdateLastTimeDonateShown - && !officecfg::Setup::Product::LastTimeDonateShown::isReadOnly()) - { - std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create()); - officecfg::Setup::Product::LastTimeDonateShown::set(nNow, batch); - batch->commit(); - } - // read-only infobar if necessary const SfxViewShell *pVSh; const SfxShell *pFSh; @@ -1534,21 +1450,6 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) } } -IMPL_LINK_NOARG(SfxViewFrame, WhatsNewHandler, Button*, void) -{ - GetDispatcher()->Execute(SID_WHATSNEW); -} - -IMPL_LINK_NOARG(SfxViewFrame, GetInvolvedHandler, Button*, void) -{ - GetDispatcher()->Execute(SID_GETINVOLVED); -} - -IMPL_LINK_NOARG(SfxViewFrame, DonationHandler, Button*, void) -{ - GetDispatcher()->Execute(SID_DONATION); -} - IMPL_LINK(SfxViewFrame, SwitchReadOnlyHandler, Button*, pButton, void) { if (m_xObjSh.is() && IsSignPDF(m_xObjSh)) |