Now the theme controls what data is set for progress updates.

This commit is contained in:
Jaime Thomas
2008-12-26 05:52:47 +00:00
parent a8695bf86e
commit aa16a66e33
5 changed files with 62 additions and 14 deletions

View File

@ -3,6 +3,27 @@ group {
name: "ecdb/burn_image_page";
min: 640 170;
script {
public message(Msg_Type:type, id, ...) {
if ((type == MSG_INT_SET) && (id == 0)) {
new percent[10], sectors[100];
snprintf(percent, 10, "%d%%", getarg(2));
set_text(PART:"progress_percent", percent);
snprintf(sectors, 100, "%d/%d", getarg(3), getarg(4));
set_text(PART:"progress_text", sectors);
/* See the erase_disc.edc for other info sent */
}
else if ((type == MSG_STRING) && (id == 1))
{
new text[100];
snprintf(text, 100, "%s", getarg(2));
set_text(PART:"progress_text", text);
set_text(PART:"progress_percent", "100%");
}
}
}
parts {
part {
name: "bg";

View File

@ -3,6 +3,22 @@ group {
name: "ecdb/erase_page";
min: 640 170;
script {
public message(Msg_Type:type, id, ...) {
if ((type == MSG_INT_SET) && (id == 0)) {
new percent[10], sectors[100];
snprintf(percent, 10, "%d%%", getarg(2));
set_text(PART:"progress_percent", percent);
snprintf(sectors, 100, "%d/%d", getarg(3), getarg(4));
set_text(PART:"progress_text", sectors);
/* Also sent is the buffer available [getarg(5)] and
* the buffer capacity [getarg(6)]
*/
}
}
}
parts {
part {
name: "bg";