From 3a43969382f4d817da771f5be8f934fa108d39bf Mon Sep 17 00:00:00 2001 From: Jaime Thomas Date: Tue, 9 Dec 2008 23:58:51 +0000 Subject: [PATCH] Small superficial fixes --- .../data/themes/default/groups/burn_image.edc | 2 +- .../data/themes/default/groups/erase_disc.edc | 2 +- experimental/ecdb/trunk/src/ecdb_burn.c | 18 ++++++++++++++---- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/experimental/ecdb/trunk/data/themes/default/groups/burn_image.edc b/experimental/ecdb/trunk/data/themes/default/groups/burn_image.edc index 2e3b767c..54e5fcab 100644 --- a/experimental/ecdb/trunk/data/themes/default/groups/burn_image.edc +++ b/experimental/ecdb/trunk/data/themes/default/groups/burn_image.edc @@ -131,7 +131,7 @@ group { rel1 { to: "bg"; relative: 0.0 0.0; - offset: 10 13; + offset: 10 5; } rel2 { diff --git a/experimental/ecdb/trunk/data/themes/default/groups/erase_disc.edc b/experimental/ecdb/trunk/data/themes/default/groups/erase_disc.edc index 30927972..26f204e6 100644 --- a/experimental/ecdb/trunk/data/themes/default/groups/erase_disc.edc +++ b/experimental/ecdb/trunk/data/themes/default/groups/erase_disc.edc @@ -131,7 +131,7 @@ group { rel1 { to: "bg"; relative: 0.0 0.0; - offset: 10 13; + offset: 10 5; } rel2 { diff --git a/experimental/ecdb/trunk/src/ecdb_burn.c b/experimental/ecdb/trunk/src/ecdb_burn.c index 8b4ab9c7..b2b1fa7e 100644 --- a/experimental/ecdb/trunk/src/ecdb_burn.c +++ b/experimental/ecdb/trunk/src/ecdb_burn.c @@ -218,6 +218,7 @@ ecdb_burn_progress_handler(void *data, void *buffer, unsigned int nbyte) Evas_Object *swallow; char buf[1024]; static int last_sector = 0; + int percent; 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), "burn_image_page"); - snprintf(buf, sizeof(buf), "%d/%d", last_sector, p->sectors); - edje_object_part_text_set(swallow, "progress_text", buf); - snprintf(buf, sizeof(buf), "%d%%", (int)((double)(last_sector + 1) / - (double)p->sectors * 100.0)); + percent = (int)((double)(last_sector + 1) / (double)p->sectors * 100.0); + snprintf(buf, sizeof(buf), "%d%%", percent); 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