Data burning works somewhat nicely now... Also some misc memory leaks and small fixes.

This commit is contained in:
Jaime Thomas
2009-02-27 01:05:10 +00:00
parent 6367f59df8
commit 39ce45193b
3 changed files with 112 additions and 28 deletions

View File

@ -1,7 +1,29 @@
/* vim: set sw=3 ts=3 sts=3 expandtab: */
group {
name: "ecdb/burn_data_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";
@ -202,6 +224,7 @@ group {
description {
state: "default" 0.0;
color: 255 255 255 255;
align: 0.5 0.5;
rel1 {
to: "bg";
@ -217,10 +240,34 @@ group {
}
}
description {
state: "before_show" 0.0;
align: 0.0 0.0;
rel1 {
relative: 0.0 0.0;
offset: -33 0;
}
rel2 {
relative: 0.0 0.0;
offset: -1 0;
}
}
description {
state: "hidden" 0.0;
inherit: "default" 0.0;
color: 255 255 255 0;
align: 1.0 1.0;
rel1 {
relative: 1.0 1.0;
offset: -1 -1;
}
rel2 {
relative: 1.0 1.0;
offset: 33 33;
}
}
}
@ -254,10 +301,11 @@ group {
name: "progress_outline";
type: IMAGE;
mouse_events: 0;
clip_to: "progress_outline_clip";
description {
state: "default" 0.0;
color: 255 255 255 0;
color: 255 255 255 255;
rel1 {
to: "bg";
@ -266,9 +314,9 @@ group {
}
rel2 {
to_y: "bg";
to_x: "ecdb/burn_data/return";
relative: 0.0 1.0;
to_y: "ecdb/burn_data/capacity";
relative: 0.0 0.0;
offset: -5 -10;
}
@ -277,6 +325,20 @@ group {
border: 9 9 9 9;
}
}
}
part {
name: "progress_outline_clip";
type: RECT;
mouse_events: 0;
description {
state: "default" 0.0;
color: 255 255 255 0;
rel1.to: "progress_outline";
rel2.to: "progress_outline";
}
description {
state: "visible" 0.0;
@ -289,7 +351,7 @@ group {
name: "progress_text";
type: TEXT;
effect: SOFT_SHADOW;
clip_to: "progress_outline";
clip_to: "progress_outline_clip";
description {
state: "default" 0.0;
@ -329,7 +391,7 @@ group {
name: "progress_percent";
type: TEXT;
effect: SOFT_SHADOW;
clip_to: "progress_outline";
clip_to: "progress_outline_clip";
description {
state: "default" 0.0;
@ -439,9 +501,16 @@ group {
signal: "ecdb,burn_data,start";
source: "ecdb";
action: STATE_SET "hidden" 0.0;
target: "ecdb/burn_data/filelist";
target: "ecdb/burn_data/capacity";
target: "ecdb/burn_data/filelist";
transition: DECELERATE 0.5;
after: "burn_data_page,useless,reset";
}
program {
name: "burn_data_page,useless,reset";
action: STATE_SET "before_show" 0.0;
target: "ecdb/burn_data/filelist";
}
program {
@ -449,22 +518,22 @@ group {
signal: "ecdb,burn_data,start";
source: "ecdb";
action: STATE_SET "visible" 0.0;
target: "progress_outline";
target: "progress_outline_clip";
transition: DECELERATE 0.5;
}
program {
name: "burn_data_page,useful,hide";
signal: "ecdb,burn_data,reset";
signal: "ecdb,burn_data,hide";
source: "ecdb";
action: STATE_SET "default" 0.0;
target: "progress_outline";
target: "progress_outline_clip";
transition: DECELERATE 0.5;
}
program {
name: "burn_data_page,useless,show";
signal: "ecdb,burn_data,reset";
signal: "ecdb,burn_data,hide";
source: "ecdb";
action: STATE_SET "default" 0.0;
target: "ecdb/burn_data/filelist";

View File

@ -23,6 +23,7 @@ group {
description {
state: "default" 0.0;
color: 0 0 0 0;
align: 0.5 0.5;
rel1 {
relative: 0.0 0.0;
@ -38,6 +39,7 @@ group {
description {
state: "before_show" 0.0;
color: 0 0 0 0;
align: 0.0 0.0;
rel1 {
relative: 0.0 0.0;
@ -53,6 +55,7 @@ group {
description {
state: "hide" 0.0;
color: 0 0 0 0;
align: 1.0 1.0;
rel1 {
relative: 1.0 1.0;