Draw browser on background while calculating

This commit is contained in:
Yorhel 2009-04-18 15:35:37 +02:00
parent 42ca499730
commit 33cd126197
2 changed files with 2 additions and 1 deletions

1
TODO
View file

@ -7,7 +7,6 @@ Small list of planned features/changes, suggestions are always welcome.
- Improve browser interface - Improve browser interface
* Option to display number of files * Option to display number of files
* Mutt-like status bar? * Mutt-like status bar?
* Browser always on background, even on startup
- Add custom key bindings - Add custom key bindings
* Using a config file (/etc/ncdurc, ~/.ncdurc) * Using a config file (/etc/ncdurc, ~/.ncdurc)

View file

@ -372,6 +372,7 @@ int calc_draw() {
struct timeval tv; struct timeval tv;
if(failed) { if(failed) {
browse_draw();
calc_draw_error(curpath, errmsg); calc_draw_error(curpath, errmsg);
return 0; return 0;
} }
@ -380,6 +381,7 @@ int calc_draw() {
gettimeofday(&tv, (void *)NULL); gettimeofday(&tv, (void *)NULL);
tv.tv_usec = (1000*(tv.tv_sec % 1000) + (tv.tv_usec / 1000)) / calc_delay; tv.tv_usec = (1000*(tv.tv_sec % 1000) + (tv.tv_usec / 1000)) / calc_delay;
if(lastupdate != tv.tv_usec) { if(lastupdate != tv.tv_usec) {
browse_draw();
calc_draw_progress(); calc_draw_progress();
lastupdate = tv.tv_usec; lastupdate = tv.tv_usec;
return 0; return 0;