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)
downloadrockbox-30faf032ad56fcdc84c0d03af341b6cbd0374340.tar.gz
rockbox-30faf032ad56fcdc84c0d03af341b6cbd0374340.zip
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)
173 playlist_create(NULL, NULL); 173 playlist_create(NULL, NULL);
174 174
175 /* always set seed before inserting shuffled */ 175 /* always set seed before inserting shuffled */
176 if (position == PLAYLIST_INSERT_SHUFFLED || position == PLAYLIST_INSERT_LAST_SHUFFLED) 176 if (position == PLAYLIST_INSERT_SHUFFLED ||
177 position == PLAYLIST_INSERT_LAST_SHUFFLED)
177 { 178 {
178 srand(current_tick); 179 srand(current_tick);
179 if (position == PLAYLIST_INSERT_LAST_SHUFFLED) 180 if (position == PLAYLIST_INSERT_LAST_SHUFFLED)
180 playlist_set_last_shuffled_start(); 181 playlist_set_last_shuffled_start();
181 } 182 }
182 183
183#ifdef HAVE_TAGCACHE 184#ifdef HAVE_TAGCACHE
@@ -439,7 +440,6 @@ static int treeplaylist_callback(int action,
439 } 440 }
440 else if (this_item == &i_shuf_pl_item) 441 else if (this_item == &i_shuf_pl_item)
441 { 442 {
442
443 if (audio_status() & AUDIO_STATUS_PLAY) 443 if (audio_status() & AUDIO_STATUS_PLAY)
444 { 444 {
445 return action; 445 return action;
@@ -453,14 +453,18 @@ static int treeplaylist_callback(int action,
453 } 453 }
454 return ACTION_EXIT_MENUITEM; 454 return ACTION_EXIT_MENUITEM;
455 } 455 }
456 else if (this_item == &i_last_shuf_pl_item || this_item == &q_last_shuf_pl_item) 456 else if (this_item == &i_last_shuf_pl_item ||
457 this_item == &q_last_shuf_pl_item)
457 { 458 {
458 if ((playlist_amount() > 0) && (audio_status() & AUDIO_STATUS_PLAY) && (selected_file_attr & ATTR_DIRECTORY)) 459 if ((playlist_amount() > 0) &&
459 { 460 (audio_status() & AUDIO_STATUS_PLAY) &&
460 return action; 461 ((selected_file_attr & ATTR_DIRECTORY) ||
461 } 462 ((selected_file_attr & FILE_ATTR_MASK) == FILE_ATTR_M3U)))
462 else 463 {
463 return ACTION_EXIT_MENUITEM; 464 return action;
465 }
466 else
467 return ACTION_EXIT_MENUITEM;
464 } 468 }
465 break; 469 break;
466 } 470 }