diff options
author | Miika Pekkarinen <miipekk@ihme.org> | 2006-08-12 11:00:39 +0000 |
---|---|---|
committer | Miika Pekkarinen <miipekk@ihme.org> | 2006-08-12 11:00:39 +0000 |
commit | 54ec1f5f6db24ab90046b7cbab371c99e239f67e (patch) | |
tree | f028eaf16d8c6d2a5a7502dffaac499128bf1f20 /apps | |
parent | 9d2929b79b22765701e9db240d967877d7f7bab8 (diff) | |
download | rockbox-54ec1f5f6db24ab90046b7cbab371c99e239f67e.tar.gz rockbox-54ec1f5f6db24ab90046b7cbab371c99e239f67e.zip |
Better UI response with playlist operations.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10544 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/lang/english.lang | 14 | ||||
-rw-r--r-- | apps/onplay.c | 2 | ||||
-rw-r--r-- | apps/playlist.c | 23 | ||||
-rw-r--r-- | apps/tagcache.c | 1 | ||||
-rw-r--r-- | apps/tagtree.c | 10 |
5 files changed, 46 insertions, 4 deletions
diff --git a/apps/lang/english.lang b/apps/lang/english.lang index 50cdb20432..88b24ec567 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang | |||
@@ -9534,3 +9534,17 @@ | |||
9534 | *: "Split Filesize" | 9534 | *: "Split Filesize" |
9535 | </voice> | 9535 | </voice> |
9536 | </phrase> | 9536 | </phrase> |
9537 | <phrase> | ||
9538 | id: LANG_LOADING_PERCENT | ||
9539 | desc: splash number of percents loaded | ||
9540 | user: | ||
9541 | <source> | ||
9542 | *: "Loading... %d%% done (%s)" | ||
9543 | </source> | ||
9544 | <dest> | ||
9545 | *: "Loading... %d%% done (%s)" | ||
9546 | </dest> | ||
9547 | <voice> | ||
9548 | *: "" | ||
9549 | </voice> | ||
9550 | </phrase> | ||
diff --git a/apps/onplay.c b/apps/onplay.c index a5fb3fe41f..a81b096e79 100644 --- a/apps/onplay.c +++ b/apps/onplay.c | |||
@@ -172,6 +172,8 @@ static bool add_to_playlist(int position, bool queue) | |||
172 | }; | 172 | }; |
173 | struct text_message message={lines, 2}; | 173 | struct text_message message={lines, 2}; |
174 | 174 | ||
175 | gui_syncsplash(0, true, str(LANG_WAIT)); | ||
176 | |||
175 | if (new_playlist) | 177 | if (new_playlist) |
176 | playlist_create(NULL, NULL); | 178 | playlist_create(NULL, NULL); |
177 | 179 | ||
diff --git a/apps/playlist.c b/apps/playlist.c index 6b35bb6c3f..a51e8f501c 100644 --- a/apps/playlist.c +++ b/apps/playlist.c | |||
@@ -1873,9 +1873,30 @@ int playlist_resume(void) | |||
1873 | char *str1 = NULL; | 1873 | char *str1 = NULL; |
1874 | char *str2 = NULL; | 1874 | char *str2 = NULL; |
1875 | char *str3 = NULL; | 1875 | char *str3 = NULL; |
1876 | 1876 | unsigned long last_tick = current_tick; | |
1877 | |||
1877 | for(count=0; count<nread && !exit_loop; count++,p++) | 1878 | for(count=0; count<nread && !exit_loop; count++,p++) |
1878 | { | 1879 | { |
1880 | /* So a splash while we are loading. */ | ||
1881 | if (current_tick - last_tick > HZ/4) | ||
1882 | { | ||
1883 | gui_syncsplash(0, true, str(LANG_LOADING_PERCENT), | ||
1884 | (total_read+count)*100/control_file_size, | ||
1885 | #if CONFIG_KEYPAD == PLAYER_PAD | ||
1886 | str(LANG_STOP_ABORT) | ||
1887 | #else | ||
1888 | str(LANG_OFF_ABORT) | ||
1889 | #endif | ||
1890 | ); | ||
1891 | if (SETTINGS_CANCEL == button_get(false)) | ||
1892 | { | ||
1893 | /* FIXME: | ||
1894 | * Not sure how to implement this, somebody more familiar | ||
1895 | * with the code, please fix this. */ | ||
1896 | } | ||
1897 | last_tick = current_tick; | ||
1898 | } | ||
1899 | |||
1879 | /* Are we on a new line? */ | 1900 | /* Are we on a new line? */ |
1880 | if((*p == '\n') || (*p == '\r')) | 1901 | if((*p == '\n') || (*p == '\r')) |
1881 | { | 1902 | { |
diff --git a/apps/tagcache.c b/apps/tagcache.c index ec713e29a4..4c324c8da3 100644 --- a/apps/tagcache.c +++ b/apps/tagcache.c | |||
@@ -2657,6 +2657,7 @@ bool tagcache_create_changelog(struct tagcache_search *tcs) | |||
2657 | } | 2657 | } |
2658 | 2658 | ||
2659 | write(clfd, "\n", 1); | 2659 | write(clfd, "\n", 1); |
2660 | yield(); | ||
2660 | } | 2661 | } |
2661 | 2662 | ||
2662 | close(clfd); | 2663 | close(clfd); |
diff --git a/apps/tagtree.c b/apps/tagtree.c index 25ac917bda..daa52646fa 100644 --- a/apps/tagtree.c +++ b/apps/tagtree.c | |||
@@ -526,7 +526,7 @@ bool show_search_progress(bool init, int count) | |||
526 | return true; | 526 | return true; |
527 | } | 527 | } |
528 | 528 | ||
529 | if (current_tick - last_tick > HZ/2) | 529 | if (current_tick - last_tick > HZ/4) |
530 | { | 530 | { |
531 | gui_syncsplash(0, true, str(LANG_PLAYLIST_SEARCH_MSG), count, | 531 | gui_syncsplash(0, true, str(LANG_PLAYLIST_SEARCH_MSG), count, |
532 | #if CONFIG_KEYPAD == PLAYER_PAD | 532 | #if CONFIG_KEYPAD == PLAYER_PAD |
@@ -538,6 +538,7 @@ bool show_search_progress(bool init, int count) | |||
538 | if (SETTINGS_CANCEL == button_get(false)) | 538 | if (SETTINGS_CANCEL == button_get(false)) |
539 | return false; | 539 | return false; |
540 | last_tick = current_tick; | 540 | last_tick = current_tick; |
541 | yield(); | ||
541 | } | 542 | } |
542 | 543 | ||
543 | return true; | 544 | return true; |
@@ -993,6 +994,8 @@ bool insert_all_playlist(struct tree_context *c, int position, bool queue) | |||
993 | 994 | ||
994 | if (playlist_insert_track(NULL, buf, position, queue, false) < 0) | 995 | if (playlist_insert_track(NULL, buf, position, queue, false) < 0) |
995 | break; | 996 | break; |
997 | |||
998 | yield(); | ||
996 | } | 999 | } |
997 | playlist_sync(NULL); | 1000 | playlist_sync(NULL); |
998 | tagcache_search_finish(&tcs); | 1001 | tagcache_search_finish(&tcs); |
@@ -1007,6 +1010,9 @@ bool tagtree_insert_selection_playlist(int position, bool queue) | |||
1007 | char buf[MAX_PATH]; | 1010 | char buf[MAX_PATH]; |
1008 | int dirlevel = tc->dirlevel; | 1011 | int dirlevel = tc->dirlevel; |
1009 | 1012 | ||
1013 | /* We need to set the table to allsubentries. */ | ||
1014 | show_search_progress(true, 0); | ||
1015 | |||
1010 | dptr = tagtree_get_entry(tc, tc->selected_item); | 1016 | dptr = tagtree_get_entry(tc, tc->selected_item); |
1011 | 1017 | ||
1012 | /* Insert a single track? */ | 1018 | /* Insert a single track? */ |
@@ -1022,8 +1028,6 @@ bool tagtree_insert_selection_playlist(int position, bool queue) | |||
1022 | return true; | 1028 | return true; |
1023 | } | 1029 | } |
1024 | 1030 | ||
1025 | /* We need to set the table to allsubentries. */ | ||
1026 | show_search_progress(true, 0); | ||
1027 | if (dptr->newtable == navibrowse) | 1031 | if (dptr->newtable == navibrowse) |
1028 | { | 1032 | { |
1029 | tagtree_enter(tc); | 1033 | tagtree_enter(tc); |