diff options
| author | Jonathan Gordon <rockbox@jdgordon.info> | 2007-02-06 09:01:32 +0000 |
|---|---|---|
| committer | Jonathan Gordon <rockbox@jdgordon.info> | 2007-02-06 09:01:32 +0000 |
| commit | d18a68d93bb97f2be178419a637b0cb74ae76872 (patch) | |
| tree | 6d575ba1d7558b2b0f5bcfa89ee45921c32260fe | |
| parent | d71b44cbd22722515031c72cbe95f3d3a4031a6f (diff) | |
| download | rockbox-d18a68d93bb97f2be178419a637b0cb74ae76872.zip rockbox-d18a68d93bb97f2be178419a637b0cb74ae76872.tar.gz rockbox-d18a68d93bb97f2be178419a637b0cb74ae76872.tar.bz2 rockbox-d18a68d93bb97f2be178419a637b0cb74ae76872.tar.xz | |
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
| -rw-r--r-- | apps/onplay.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/apps/onplay.c b/apps/onplay.c index c2e0576..14fbdb8 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) |