Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

Unnamed
Sunday, August 5th, 2007 at 9:59:35am UTC 

  1. Index: apps/onplay.c
  2. ===================================================================
  3. --- apps/onplay.c       (revision 14178)
  4. +++ apps/onplay.c       (working copy)
  5. @@ -487,8 +487,13 @@
  6.          }
  7.          else
  8.          {   /* remove a file */
  9. +#ifdef HAVE_LCD_BITMAP
  10.              FOR_NB_SCREENS(i)
  11. -                screens[i].puts_scroll(0,2,entry->d_name);
  12. +            {
  13. +                show_busy_slider(&screens[i], 2, 3*screens[i].char_height,
  14. +                                 LCD_WIDTH-4, screens[i].char_height);
  15. +            }
  16. +#endif
  17.              result = remove(dirname);
  18.          }
  19.  #ifdef HAVE_LCD_BITMAP
  20. @@ -669,7 +674,9 @@
  21.      ssize_t size, bytesread, byteswritten;
  22.      char *buffer;
  23.      bool result = false;
  24. -
  25. +#ifdef HAVE_LCD_BITMAP
  26. +    int i;
  27. +#endif
  28.      if (copy) {
  29.          /* See if we can get the plugin buffer for the file copy buffer */
  30.          buffer = (char *) plugin_get_buffer(&buffersize);
  31. @@ -708,9 +715,15 @@
  32.                          result = false;
  33.                          break;
  34.                      }
  35. -
  36.                      size -= bytesread;
  37. -
  38. +#ifdef HAVE_LCD_BITMAP
  39. +                    FOR_NB_SCREENS(i)
  40. +                    {
  41. +                        show_busy_slider(&screens[i], 2, screens[i].char_height,
  42. +                                            LCD_WIDTH-4, screens[i].char_height);
  43. +                        screens[i].update();
  44. +                    }
  45. +#endif
  46.                      while(bytesread > 0) {
  47.                          byteswritten = write(target_fd, buffer, bytesread);
  48.  
  49. Index: apps/gui/scrollbar.c
  50. ===================================================================
  51. --- apps/gui/scrollbar.c        (revision 14178)
  52. +++ apps/gui/scrollbar.c        (working copy)
  53. @@ -241,4 +241,36 @@
  54.  #endif
  55.      }
  56.  }
  57. +
  58. +void show_busy_slider(struct screen *s, int x, int y, int width, int height)
  59. +{
  60. +    static int start = 0, dir = 1;
  61. +    gui_scrollbar_draw(s, x, y, width, height, 100,
  62. +                           start, start+20, HORIZONTAL);
  63. +#if NB_SCREENS > 1
  64. +    if (s->screen_type == SCREEN_MAIN)
  65. +    {
  66. +#endif
  67. +        if (dir == 1)
  68. +        {
  69. +            start += 2;
  70. +            if (start+20 > 99)
  71. +            {
  72. +                dir = -1;
  73. +                start = 80;
  74. +            }
  75. +        }
  76. +        else
  77. +        {
  78. +            start -= 2;
  79. +            if (start < 1)
  80. +            {
  81. +                dir = 1;
  82. +            }
  83. +        }
  84. +#if NB_SCREENS > 1
  85. +    }
  86. +#endif
  87. +}
  88. +
  89.  #endif /* HAVE_LCD_BITMAP */
  90. Index: apps/gui/scrollbar.h
  91. ===================================================================
  92. --- apps/gui/scrollbar.h        (revision 14178)
  93. +++ apps/gui/scrollbar.h        (working copy)
  94. @@ -55,5 +55,6 @@
  95.                              int width, int height, int items,
  96.                              int min_shown, int max_shown,
  97.                              unsigned flags);
  98. +extern void show_busy_slider(struct screen *s, int x, int y, int width, int height);
  99.  #endif /* HAVE_LCD_BITMAP */
  100.  #endif /* _GUI_SCROLLBAR_H_ */

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

comments powered by Disqus
worth-right
worth-right