sfx2/source/dialog/backingwindow.cxx | 48 -------------------------- sfx2/source/dialog/backingwindow.hxx | 2 - sfx2/uiconfig/ui/startcenter.ui | 63 ----------------------------------- 3 files changed, 113 deletions(-)
New commits: commit b199ef6c51c584c3cc3dee0e8e82cb1f35a1a017 Author: Balazs Varga <balazs.va...@collabora.com> AuthorDate: Fri Aug 22 14:54:23 2025 +0200 Commit: Balazs Varga <balazs.va...@collabora.com> CommitDate: Wed Aug 27 16:32:38 2025 +0200 Remove external links from start center cherry-pick from: ad8d4ad6a60d596f865f158ad53dee617a0a1b48 Change-Id: I9bd08a1eaf8c67904d2a1af4a8153e8ff6846699 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190068 Tested-by: Balazs Varga <balazs.va...@collabora.com> Reviewed-by: Balazs Varga <balazs.va...@collabora.com> diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index fb8f62dcff6d..2fb3e3f6ebe5 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -151,8 +151,6 @@ BackingWindow::BackingWindow(vcl::Window* i_pParent) , mxBrandImage(new BrandImage) , mxBrandImageWeld(new weld::CustomWeld(*m_xBuilder, u"daBrand"_ustr, *mxBrandImage)) , mxHelpButton(m_xBuilder->weld_button(u"help"_ustr)) - , mxExtensionsButton(m_xBuilder->weld_button(u"extensions"_ustr)) - , mxDonateButton(m_xBuilder->weld_button(u"donate"_ustr)) , mxAllButtonsBox(m_xBuilder->weld_container(u"all_buttons_box"_ustr)) , mxButtonsBox(m_xBuilder->weld_container(u"buttons_box"_ustr)) , mxSmallButtonsBox(m_xBuilder->weld_container(u"small_buttons_box"_ustr)) @@ -176,21 +174,6 @@ BackingWindow::BackingWindow(vcl::Window* i_pParent) mxHelpButton->set_label(mxAltHelpLabel->get_label()); mxHelpButton->connect_clicked(LINK(this, BackingWindow, ClickHelpHdl)); - // tdf#161796 replace the extension button with a donate button - if (officecfg::Office::Common::Misc::ShowDonation::get()) - { - mxExtensionsButton->hide(); - mxDonateButton->show(); - mxDonateButton->set_from_icon_name(BMP_DONATE); - OUString sDonate(SfxResId(STR_DONATE_BUTTON)); - if (sDonate.getLength() > 8) - { - mxDonateButton->set_tooltip_text(sDonate); - sDonate = OUString::Concat(sDonate.subView(0, 7)) + "..."; - } - mxDonateButton->set_label(sDonate); - } - mxDropTarget = mxAllRecentThumbnails->GetDropTarget(); try @@ -251,8 +234,6 @@ void BackingWindow::dispose() mxBrandImageWeld.reset(); mxBrandImage.reset(); mxHelpButton.reset(); - mxDonateButton.reset(); - mxExtensionsButton.reset(); mxAllButtonsBox.reset(); mxButtonsBox.reset(); mxSmallButtonsBox.reset(); @@ -306,9 +287,6 @@ void BackingWindow::initControls() checkInstalledModules(); - mxExtensionsButton->connect_clicked(LINK(this, BackingWindow, ExtLinkClickHdl)); - mxDonateButton->connect_clicked(LINK(this, BackingWindow, ExtLinkClickHdl)); - mxOpenButton->connect_clicked(LINK(this, BackingWindow, ClickHdl)); // Hide OpenRemote button on startpage if the OpenRemote uno command is not available @@ -543,32 +521,6 @@ void BackingWindow::setOwningFrame( const css::uno::Reference< css::frame::XFram xFramesSupplier->setActiveFrame(mxFrame); } -IMPL_STATIC_LINK_NOARG(BackingWindow, ExtLinkClickHdl, weld::Button&, void) -{ - try - { - OUString sURL; - if (officecfg::Office::Common::Misc::ShowDonation::get()) - sURL = officecfg::Office::Common::Menus::DonationURL::get() + - "?BCP47=" + LanguageTag(utl::ConfigManager::getUILocale()).getBcp47() + - "&LOlang=" + LanguageTag(utl::ConfigManager::getUILocale()).getLanguage(); - else - sURL = officecfg::Office::Common::Menus::ExtensionsURL::get() + - "?LOvers=" + utl::ConfigManager::getProductVersion() + - "&LOlocale=" + LanguageTag(utl::ConfigManager::getUILocale()).getBcp47(); - - Reference<css::system::XSystemShellExecute> const - xSystemShellExecute( - css::system::SystemShellExecute::create( - ::comphelper::getProcessComponentContext())); - xSystemShellExecute->execute(sURL, OUString(), - css::system::SystemShellExecuteFlags::URIS_ONLY); - } - catch (const Exception&) - { - } -} - void BackingWindow::applyFilter() { const int nFilter = mxFilter->get_active(); diff --git a/sfx2/source/dialog/backingwindow.hxx b/sfx2/source/dialog/backingwindow.hxx index e8ac74f6a143..34b0e6f62229 100644 --- a/sfx2/source/dialog/backingwindow.hxx +++ b/sfx2/source/dialog/backingwindow.hxx @@ -67,7 +67,6 @@ class BackingWindow : public InterimItemWindow std::unique_ptr<weld::CustomWeld> mxBrandImageWeld; std::unique_ptr<weld::Button> mxHelpButton; - std::unique_ptr<weld::Button> mxExtensionsButton; std::unique_ptr<weld::Button> mxDonateButton; std::unique_ptr<weld::Container> mxAllButtonsBox; @@ -96,7 +95,6 @@ class BackingWindow : public InterimItemWindow DECL_LINK(ClickHdl, weld::Button&, void); DECL_LINK(ClickHelpHdl, weld::Button&, void); DECL_LINK(MenuSelectHdl, const OUString&, void); - DECL_STATIC_LINK(BackingWindow, ExtLinkClickHdl, weld::Button&, void); DECL_LINK(CreateContextMenuHdl, ThumbnailViewItem*, void); DECL_LINK(OpenTemplateHdl, ThumbnailViewItem*, void); DECL_LINK(EditTemplateHdl, ThumbnailViewItem*, void); diff --git a/sfx2/uiconfig/ui/startcenter.ui b/sfx2/uiconfig/ui/startcenter.ui index ea407c1a2df8..9046e6fd81f3 100644 --- a/sfx2/uiconfig/ui/startcenter.ui +++ b/sfx2/uiconfig/ui/startcenter.ui @@ -428,69 +428,6 @@ <property name="position">0</property> </packing> </child> - <child> - <object class="GtkButton" id="extensions"> - <property name="label" translatable="yes" context="startcenter|extensions">E_xtensions</property> - <property name="visible">True</property> - <property name="can-focus">True</property> - <property name="receives-default">True</property> - <property name="relief">none</property> - <property name="use-underline">True</property> - <property name="always-show-image">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - <child> - <object class="GtkButton" id="donate"> - <property name="can-focus">True</property> - <property name="receives-default">True</property> - <property name="no-show-all">True</property> - <property name="relief">none</property> - <property name="use-underline">True</property> - <property name="always-show-image">True</property> - <child> - <object class="GtkBox"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="spacing">2</property> - <child> - <object class="GtkImage" id="donate_image"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="icon-name">res/donate.png</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkLabel"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="label" comments="Translated via STR_DONATE_BUTTON">Donate</property> - <property name="use-underline">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - </object> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">2</property> - </packing> - </child> </object> <packing> <property name="expand">False</property>