From dde54af22cfbb6ab7ae44d457642026b6900d435 Mon Sep 17 00:00:00 2001 From: Sam Stenvall Date: Wed, 28 Jan 2015 15:54:20 +0200 Subject: [PATCH 1/2] [gui] remove any set context buttons for the "go to parent" item (fixes #15732) --- xbmc/windows/GUIMediaWindow.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xbmc/windows/GUIMediaWindow.cpp b/xbmc/windows/GUIMediaWindow.cpp index c8ccc85dfc3eb..28f6f21c507f3 100644 --- a/xbmc/windows/GUIMediaWindow.cpp +++ b/xbmc/windows/GUIMediaWindow.cpp @@ -1523,8 +1523,12 @@ void CGUIMediaWindow::GetContextButtons(int itemNumber, CContextButtons &buttons { CFileItemPtr item = (itemNumber >= 0 && itemNumber < m_vecItems->Size()) ? m_vecItems->Get(itemNumber) : CFileItemPtr(); - if (!item) + // ensure that the "go to parent" item doesn't have any context menu items + if (!item || item->IsParentFolder()) + { + buttons.clear(); return; + } // user added buttons std::string label; From 96b9982b50eea1450244e6696870c56a0f0b91de Mon Sep 17 00:00:00 2001 From: Sam Stenvall Date: Thu, 29 Jan 2015 12:56:03 +0200 Subject: [PATCH 2/2] [pvr] don't allow the "go to parent" item to be deleted from the recordings window. The Delete action can't be triggered by the context menu anymore but is still triggerable using the delete key --- xbmc/pvr/windows/GUIWindowPVRRecordings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xbmc/pvr/windows/GUIWindowPVRRecordings.cpp b/xbmc/pvr/windows/GUIWindowPVRRecordings.cpp index 7ebafc1a7a17c..8cf5ec5e8c16f 100644 --- a/xbmc/pvr/windows/GUIWindowPVRRecordings.cpp +++ b/xbmc/pvr/windows/GUIWindowPVRRecordings.cpp @@ -328,7 +328,7 @@ bool CGUIWindowPVRRecordings::ActionDeleteRecording(CFileItem *item) { bool bReturn = false; - if (!item->IsPVRRecording() && !item->m_bIsFolder) + if (!item->IsPVRRecording() && !item->m_bIsFolder || item->IsParentFolder()) return bReturn; /* show a confirmation dialog */