* Do not add documents to the recent list in _UpdatePlaylistItemFile(), but do

so when the items are added to the playlist. This has the added advantage of
  being able to easily reselect sub-folders (an album for example).
* Enabled navigating folders in the recent item list.
* Added Playlist::IsEmpty() method.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38897 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2010-10-08 13:16:49 +00:00
parent 3f7a0ba1b0
commit 7bf8d24715
3 changed files with 29 additions and 18 deletions
+2 -11
View File
@@ -1423,19 +1423,13 @@ MainWin::_CreateMenu()
fFileMenu->AddItem(item);
item->SetTarget(be_app);
#if 0
// Plain "Open File" entry
fFileMenu->AddItem(new BMenuItem("Open File"B_UTF8_ELLIPSIS,
new BMessage(M_FILE_OPEN), 'O'));
#else
// Add recent files to "Open File" entry as sub-menu.
BRecentFilesList recentFiles(10, false, NULL, kAppSig);
item = new BMenuItem(recentFiles.NewFileListMenu(
"Open file"B_UTF8_ELLIPSIS, new BMessage(B_REFS_RECEIVED),
NULL, this, 10, false, NULL, 0, kAppSig), new BMessage(M_FILE_OPEN));
"Open file"B_UTF8_ELLIPSIS, NULL, NULL, this, 10, true, NULL, kAppSig),
new BMessage(M_FILE_OPEN));
item->SetShortcut('O', 0);
fFileMenu->AddItem(item);
#endif
fFileMenu->AddSeparatorItem();
@@ -2397,9 +2391,6 @@ MainWin::_UpdatePlaylistItemFile()
if (node.InitCheck())
return;
// Add to recent documents
be_roster->AddToRecentDocuments(&item->Ref(), kAppSig);
locker.Unlock();
// Set some standard attributes of the currently played file.