Skip to content

Commit

Permalink
Merge pull request #2807 from Fice/filemanager_context_cleanup
Browse files Browse the repository at this point in the history
[Context Menu] Filemanager context menu cleanup
  • Loading branch information
MartijnKaijser committed Aug 5, 2013
2 parents 2c106a8 + 0522717 commit 2d26d85
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions xbmc/windows/GUIWindowFileManager.cpp
Expand Up @@ -987,7 +987,10 @@ void CGUIWindowFileManager::OnPopupMenu(int list, int item, bool bContextDriven
CContextButtons choices;
if (item >= 0)
{
choices.Add(1, 188); // SelectAll
//The ".." item is not selectable. Take that into account when figuring out if all items are selected
int notSelectable = CSettings::Get().GetBool("filelists.showparentdiritems") ? 1 : 0;
if (NumSelected(list) < m_vecItems[list]->Size() - notSelectable)
choices.Add(1, 188); // SelectAll
if (!pItem->IsParentFolder())
choices.Add(2, XFILE::CFavouritesDirectory::IsFavourite(pItem.get(), GetID()) ? 14077 : 14076); // Add/Remove Favourite
if (vecCores.size() > 1)
Expand All @@ -1005,7 +1008,6 @@ void CGUIWindowFileManager::OnPopupMenu(int list, int item, bool bContextDriven
choices.Add(8, 20309); // New Folder
if (item >= 0 && pItem->m_bIsFolder && !pItem->IsParentFolder())
choices.Add(9, 13393); // Calculate Size
choices.Add(10, 5); // Settings
choices.Add(11, 20128); // Go To Root
choices.Add(12, 523); // switch media
if (CJobManager::GetInstance().IsProcessing("filemanager"))
Expand Down Expand Up @@ -1072,11 +1074,6 @@ void CGUIWindowFileManager::OnPopupMenu(int list, int item, bool bContextDriven
if (progress)
progress->Close();
}
if (btnid == 10)
{
g_windowManager.ActivateWindow(WINDOW_SETTINGS_MENU);
return;
}
if (btnid == 11)
{
Update(list,"");
Expand Down

0 comments on commit 2d26d85

Please sign in to comment.