summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTeruaki Kawashima <teru@rockbox.org>2009-11-01 14:25:38 +0000
committerTeruaki Kawashima <teru@rockbox.org>2009-11-01 14:25:38 +0000
commit30faf032ad56fcdc84c0d03af341b6cbd0374340 (patch)
tree2aabd523150406d26d5ec8c6a9d93761875bec31
parent603b0aa5eb7181ada80904819fe83567991fb84b (diff)
Show insert_last_shuffled item and queue_last_shuffled item when playlist file is selected.
break long lines. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23464 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/onplay.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/apps/onplay.c b/apps/onplay.c
index 7ad22d5d70..88961a459e 100644
--- a/apps/onplay.c
+++ b/apps/onplay.c
@@ -173,11 +173,12 @@ static bool add_to_playlist(int position, bool queue)
playlist_create(NULL, NULL);
/* always set seed before inserting shuffled */
- if (position == PLAYLIST_INSERT_SHUFFLED || position == PLAYLIST_INSERT_LAST_SHUFFLED)
+ if (position == PLAYLIST_INSERT_SHUFFLED ||
+ position == PLAYLIST_INSERT_LAST_SHUFFLED)
{
srand(current_tick);
- if (position == PLAYLIST_INSERT_LAST_SHUFFLED)
- playlist_set_last_shuffled_start();
+ if (position == PLAYLIST_INSERT_LAST_SHUFFLED)
+ playlist_set_last_shuffled_start();
}
#ifdef HAVE_TAGCACHE
@@ -439,7 +440,6 @@ static int treeplaylist_callback(int action,
}
else if (this_item == &i_shuf_pl_item)
{
-
if (audio_status() & AUDIO_STATUS_PLAY)
{
return action;
@@ -453,14 +453,18 @@ static int treeplaylist_callback(int action,
}
return ACTION_EXIT_MENUITEM;
}
- else if (this_item == &i_last_shuf_pl_item || this_item == &q_last_shuf_pl_item)
+ else if (this_item == &i_last_shuf_pl_item ||
+ this_item == &q_last_shuf_pl_item)
{
- if ((playlist_amount() > 0) && (audio_status() & AUDIO_STATUS_PLAY) && (selected_file_attr & ATTR_DIRECTORY))
- {
- return action;
- }
- else
- return ACTION_EXIT_MENUITEM;
+ if ((playlist_amount() > 0) &&
+ (audio_status() & AUDIO_STATUS_PLAY) &&
+ ((selected_file_attr & ATTR_DIRECTORY) ||
+ ((selected_file_attr & FILE_ATTR_MASK) == FILE_ATTR_M3U)))
+ {
+ return action;
+ }
+ else
+ return ACTION_EXIT_MENUITEM;
}
break;
}