From d18a68d93bb97f2be178419a637b0cb74ae76872 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Tue, 6 Feb 2007 09:01:32 +0000 Subject: Fix FS #6624 - remove useless menu items from the context menu in an empty directory git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12211 a1c6a512-1295-4272-9138-f99709370657 --- apps/onplay.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/apps/onplay.c b/apps/onplay.c index c2e0576b42..14fbdb8a17 100644 --- a/apps/onplay.c +++ b/apps/onplay.c @@ -886,9 +886,9 @@ int onplay(char* file, int attr, int from) i++; } - if (context == CONTEXT_WPS || + if (file && (context == CONTEXT_WPS || context == CONTEXT_TREE || - context == CONTEXT_ID3DB) + context == CONTEXT_ID3DB)) { items[i].desc = ID2P(LANG_PLAYLIST); items[i].function = playlist_options; @@ -998,10 +998,12 @@ int onplay(char* file, int attr, int from) items[i].desc = ID2P(LANG_CREATE_DIR); items[i].function = create_dir; i++; - - items[i].desc = ID2P(LANG_PROPERTIES); - items[i].function = properties; - i++; + if (file) + { + items[i].desc = ID2P(LANG_PROPERTIES); + items[i].function = properties; + i++; + } } if (context == CONTEXT_WPS) -- cgit