Avoid infinite recalculation loop.

This commit is contained in:
Jaime Thomas
2008-12-21 00:09:07 +00:00
parent acce34c9dc
commit 7f0f6159a8
6 changed files with 128 additions and 20 deletions

View File

@@ -806,8 +806,12 @@ ecdb_burn_image_page_show(void)
if (!swallow)
{
Evas_Object *b;
Evas_Object *b, *c1, *c2;
Eina_List *l;
Ecdb_Drive_Info *drive;
Evas_Coord x, y, w, h;
char buf[1024];
int i, write_speed_count;
swallow = edje_object_add(ecore_evas_get(em->main_win_ee));
edje_object_file_set(swallow, em->theme_path, "ecdb/burn_image_page");
@@ -842,6 +846,37 @@ ecdb_burn_image_page_show(void)
b = ecdb_entry_add(swallow, "ecdb/burn_image/file");
ecdb_entry_text_set(b, "Burn File");
evas_object_show(b);
c1 = ecdb_combo_add(swallow, "ecdb/burn_image/drive");
ecdb_combo_header_set(c1, "Drive");
evas_object_show(c1);
c2 = ecdb_combo_add(swallow, "ecdb/burn_image/speed");
ecdb_combo_header_set(c2, "Speed");
evas_object_show(c2);
EINA_LIST_FOREACH(em->drives, l, drive)
{
b = ecdb_button_add(c1, NULL);
ecdb_button_label_set(b, drive->product);
ecdb_combo_append(c1, b);
evas_object_show(b);
// Need to set this
write_speed_count = drive->write_speeds[0];
for (i = 1; i < write_speed_count; i++)
{
if (drive->write_speeds[i] <= 0)
break;
b = ecdb_button_add(c2, NULL);
snprintf(buf, sizeof(buf), "%d", drive->write_speeds[i]);
printf("speed: %d\n", drive->write_speeds[i]);
ecdb_button_label_set(b, buf);
ecdb_combo_append(c2, b);
evas_object_show(b);
}
}
}
else if (edje_object_part_swallow_get(gui, "action_area") != swallow)