Small superficial fixes

This commit is contained in:
Jaime Thomas 2008-12-09 23:58:51 +00:00
parent 8701dba4d2
commit 005e600566
3 changed files with 16 additions and 6 deletions

View File

@ -131,7 +131,7 @@ group {
rel1 { rel1 {
to: "bg"; to: "bg";
relative: 0.0 0.0; relative: 0.0 0.0;
offset: 10 13; offset: 10 5;
} }
rel2 { rel2 {

View File

@ -131,7 +131,7 @@ group {
rel1 { rel1 {
to: "bg"; to: "bg";
relative: 0.0 0.0; relative: 0.0 0.0;
offset: 10 13; offset: 10 5;
} }
rel2 { rel2 {

View File

@ -218,6 +218,7 @@ ecdb_burn_progress_handler(void *data, void *buffer, unsigned int nbyte)
Evas_Object *swallow; Evas_Object *swallow;
char buf[1024]; char buf[1024];
static int last_sector = 0; static int last_sector = 0;
int percent;
if ((nbyte != sizeof(BurnProgress)) || (!strcmp((char *)buffer, "AC"))) if ((nbyte != sizeof(BurnProgress)) || (!strcmp((char *)buffer, "AC")))
{ {
@ -246,11 +247,20 @@ ecdb_burn_progress_handler(void *data, void *buffer, unsigned int nbyte)
swallow = evas_object_name_find(ecore_evas_get(em->main_win_ee), swallow = evas_object_name_find(ecore_evas_get(em->main_win_ee),
"burn_image_page"); "burn_image_page");
snprintf(buf, sizeof(buf), "%d/%d", last_sector, p->sectors); percent = (int)((double)(last_sector + 1) / (double)p->sectors * 100.0);
edje_object_part_text_set(swallow, "progress_text", buf); snprintf(buf, sizeof(buf), "%d%%", percent);
snprintf(buf, sizeof(buf), "%d%%", (int)((double)(last_sector + 1) /
(double)p->sectors * 100.0));
edje_object_part_text_set(swallow, "progress_percent", buf); edje_object_part_text_set(swallow, "progress_percent", buf);
// Display an nice and comforting message here
if (percent >= 100)
{
edje_object_part_text_set(swallow, "progress_text", "Finalizing disc...");
}
else
{
snprintf(buf, sizeof(buf), "%d/%d", last_sector, p->sectors);
edje_object_part_text_set(swallow, "progress_text", buf);
}
} }
int int