sfx2: Drop unused menu for recent files view in start center
For RecentDocsView, the base class member ThumbnailView::mxContextMenu is set but unused. Drop the menu altogether and have a default param in the ThumbnailView ctor for the menu instead to not have to explicitly pass a null one. Change-Id: I46528a662aaf7dc738eb97a7aa81aa32fc04ae79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196384 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
This commit is contained in:
@@ -162,7 +162,8 @@ class SFX2_DLLPUBLIC ThumbnailView : public weld::CustomWidgetController
|
||||
friend class ThumbnailViewItemAcc;
|
||||
|
||||
public:
|
||||
ThumbnailView(std::unique_ptr<weld::ScrolledWindow> xWindow, std::unique_ptr<weld::Menu> xMenu);
|
||||
ThumbnailView(std::unique_ptr<weld::ScrolledWindow> xWindow,
|
||||
std::unique_ptr<weld::Menu> xMenu = {});
|
||||
|
||||
virtual ~ThumbnailView() override;
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace sfx2
|
||||
class RecentDocsView final : public ThumbnailView
|
||||
{
|
||||
public:
|
||||
RecentDocsView(std::unique_ptr<weld::ScrolledWindow> xWindow, std::unique_ptr<weld::Menu> xMenu);
|
||||
RecentDocsView(std::unique_ptr<weld::ScrolledWindow> xWindow);
|
||||
virtual ~RecentDocsView() override;
|
||||
|
||||
void insertItem(const OUString& rURL, const OUString& rTitle, const OUString& rThumbnail,
|
||||
|
||||
@@ -58,8 +58,8 @@ namespace sfx2
|
||||
constexpr tools::Long gnTextHeight = 30;
|
||||
constexpr tools::Long gnItemPadding = 5;
|
||||
|
||||
RecentDocsView::RecentDocsView(std::unique_ptr<weld::ScrolledWindow> xWindow, std::unique_ptr<weld::Menu> xMenu)
|
||||
: ThumbnailView(std::move(xWindow), std::move(xMenu))
|
||||
RecentDocsView::RecentDocsView(std::unique_ptr<weld::ScrolledWindow> xWindow)
|
||||
: ThumbnailView(std::move(xWindow))
|
||||
, mnFileTypes(ApplicationType::TYPE_NONE)
|
||||
, mnLastMouseDownItem(THUMBNAILVIEW_ITEM_NOTFOUND)
|
||||
, maWelcomeLine1(SfxResId(STR_WELCOME_LINE1))
|
||||
|
||||
@@ -172,8 +172,7 @@ BackingWindow::BackingWindow(vcl::Window* i_pParent)
|
||||
, 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))
|
||||
, mxAllRecentThumbnails(new sfx2::RecentDocsView(m_xBuilder->weld_scrolled_window(u"scrollrecent"_ustr, true),
|
||||
m_xBuilder->weld_menu(u"recentmenu"_ustr)))
|
||||
, mxAllRecentThumbnails(new sfx2::RecentDocsView(m_xBuilder->weld_scrolled_window(u"scrollrecent"_ustr, true)))
|
||||
, mxAllRecentThumbnailsWin(new weld::CustomWeld(*m_xBuilder, u"all_recent"_ustr, *mxAllRecentThumbnails))
|
||||
, mxLocalView(new TemplateDefaultView(m_xBuilder->weld_scrolled_window(u"scrolllocal"_ustr, true),
|
||||
m_xBuilder->weld_menu(u"localmenu"_ustr)))
|
||||
|
||||
@@ -70,10 +70,6 @@
|
||||
<property name="can-focus">False</property>
|
||||
<property name="icon-name">framework/res/remote-documents.png</property>
|
||||
</object>
|
||||
<object class="GtkMenu" id="recentmenu">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
</object>
|
||||
<object class="GtkImage" id="templates_all_image">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
|
||||
Reference in New Issue
Block a user