Small superficial fixes

This commit is contained in:
Jaime Thomas 2008-12-09 23:58:51 +00:00
parent 43ebca0835
commit 3a43969382
3 changed files with 16 additions and 6 deletions

View File

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

View File

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

View File

@ -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