include/sfx2/sidebar/TabBar.hxx | 1 - sfx2/source/sidebar/SidebarController.cxx | 5 ----- sfx2/source/sidebar/TabBar.cxx | 16 ---------------- sfx2/uiconfig/ui/tabbarcontents.ui | 16 +--------------- 4 files changed, 1 insertion(+), 37 deletions(-)
New commits: commit dcf23ba463d4c7ea33c5d9fb240d63351e995d7d Author: Olivier Hallot <olivier.hal...@libreoffice.org> AuthorDate: Thu Aug 15 10:16:55 2024 -0300 Commit: Olivier Hallot <olivier.hal...@libreoffice.org> CommitDate: Mon Aug 19 16:28:31 2024 +0200 tdf#105131 Remove Restore Defaut from sidebar custom menu Refer to tdf#105131 comment #13 Change-Id: Ia3b33ed4ab971b6f6dd3c751c5f6e3dc6f30f5da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171906 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org> Reviewed-by: Olivier Hallot <olivier.hal...@libreoffice.org> diff --git a/include/sfx2/sidebar/TabBar.hxx b/include/sfx2/sidebar/TabBar.hxx index 7c9b032562ad..06707f1bc339 100644 --- a/include/sfx2/sidebar/TabBar.hxx +++ b/include/sfx2/sidebar/TabBar.hxx @@ -66,7 +66,6 @@ public: void RemoveDeckHighlight (); OUString const & GetDeckIdForIndex (const sal_Int32 nIndex) const; void ToggleHideFlag (const sal_Int32 nIndex); - void RestoreHideFlags(); void UpdateFocusManager (FocusManager& rFocusManager); diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index e9843f703ee8..1bd463a55933 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -1171,10 +1171,6 @@ IMPL_LINK(SidebarController, OnMenuItemSelected, const OUString&, rCurItemId, vo IMPL_LINK(SidebarController, OnSubMenuItemSelected, const OUString&, rCurItemId, void) { - if (rCurItemId == "restoredefault") - mpTabBar->RestoreHideFlags(); - else - { try { std::u16string_view sNumber; @@ -1200,7 +1196,6 @@ IMPL_LINK(SidebarController, OnSubMenuItemSelected, const OUString&, rCurItemId, catch (RuntimeException&) { } - } } diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx index 6f51faadeab1..9ce9778a711b 100644 --- a/sfx2/source/sidebar/TabBar.cxx +++ b/sfx2/source/sidebar/TabBar.cxx @@ -307,22 +307,6 @@ void TabBar::ToggleHideFlag (const sal_Int32 nIndex) UpdateMenus(); } -void TabBar::RestoreHideFlags() -{ - for (auto & item : maItems) - { - if (item->mbIsHidden != item->mbIsHiddenByDefault) - { - item->mbIsHidden = item->mbIsHiddenByDefault; - std::shared_ptr<DeckDescriptor> xDeckDescriptor = mrParentSidebarController.GetResourceManager()->GetDeckDescriptor(item->msDeckId); - if (xDeckDescriptor) - xDeckDescriptor->mbIsEnabled = !item->mbIsHidden; - - } - } - UpdateMenus(); -} - void TabBar::UpdateFocusManager(FocusManager& rFocusManager) { std::vector<weld::Widget*> aButtons; diff --git a/sfx2/uiconfig/ui/tabbarcontents.ui b/sfx2/uiconfig/ui/tabbarcontents.ui index eb35998c18d4..0107e4f7d9f1 100644 --- a/sfx2/uiconfig/ui/tabbarcontents.ui +++ b/sfx2/uiconfig/ui/tabbarcontents.ui @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.38.2 --> +<!-- Generated with glade 3.40.0 --> <interface domain="sfx"> <requires lib="gtk+" version="3.20"/> <object class="GtkImage" id="image6"> @@ -53,20 +53,6 @@ <object class="GtkMenu" id="submenu"> <property name="visible">True</property> <property name="can-focus">False</property> - <child> - <object class="GtkSeparatorMenuItem" id="separator2"> - <property name="visible">True</property> - <property name="can-focus">False</property> - </object> - </child> - <child> - <object class="GtkMenuItem" id="restoredefault"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="label" translatable="yes" context="tabbar|restoredefault">Restore Default</property> - <property name="use-underline">True</property> - </object> - </child> </object> </child> </object>