Subversion Repositories freemyipod

Rev

Rev 833 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 833 Rev 834
Line 27... Line 27...
27
#include "util.h"
27
#include "util.h"
28
#include "main.h"
28
#include "main.h"
29
#include "confirmchooser.h"
29
#include "confirmchooser.h"
30
 
30
 
31
 
31
 
32
void run_clearcfg(void** firmware, void** app, int* size)
32
void run_clearcfg()
33
{
33
{
34
    if (!run_confirmchooser("Really clear Rockbox config?")) return;
34
    if (!run_confirmchooser("Really clear Rockbox config?")) return;
35
    remove("/.rockbox/config.cfg");
35
    remove("/.rockbox/config.cfg");
36
    memcpy(framebuf, bg, 320 * 240 * 3);
36
    memcpy(framebuf, bg, 320 * 240 * 3);
37
    message(97, "Rockbox configuration", "  has been cleared.  ");
37
    message(97, "Rockbox configuration", "  has been cleared.  ");
38
}
38
}
39
 
39
 
40
void run_cleardb(void** firmware, void** app, int* size)
40
void run_cleardb()
41
{
41
{
42
    if (!run_confirmchooser("Really clear Rockbox database?")) return;
42
    if (!run_confirmchooser("Really clear Rockbox database?")) return;
43
    remove("/.rockbox/database_0.tcd");
43
    remove("/.rockbox/database_0.tcd");
44
    remove("/.rockbox/database_1.tcd");
44
    remove("/.rockbox/database_1.tcd");
45
    remove("/.rockbox/database_2.tcd");
45
    remove("/.rockbox/database_2.tcd");
Line 67... Line 67...
67
static void fat32_progressbar_update(void* user, int current)
67
static void fat32_progressbar_update(void* user, int current)
68
{
68
{
69
    progressbar_setpos((struct progressbar_state*)user, current, false);
69
    progressbar_setpos((struct progressbar_state*)user, current, false);
70
}
70
}
71
 
71
 
72
void run_reformat(void** firmware, void** app, int* size)
72
void run_reformat()
73
{
73
{
74
    if (!run_confirmchooser("Really reformat data partition?")) return;
74
    if (!run_confirmchooser("Really reformat data partition?")) return;
75
    memcpy(framebuf, bg, 320 * 240 * 3);
75
    memcpy(framebuf, bg, 320 * 240 * 3);
76
    rendertext(framebuf, 70, 125, 320, 0xff7fffff, 0xa0000000, "Reformatting data partition...");
76
    rendertext(framebuf, 70, 125, 320, 0xff7fffff, 0xa0000000, "Reformatting data partition...");
77
    update_display(NULL);
77
    update_display(NULL);