Buttons work now, need to add signals and callbacks for them now
This commit is contained in:
@ -209,21 +209,43 @@ ecdb_create_main_gui(void)
|
||||
evas_object_show(swallow);
|
||||
|
||||
// Set up the welcome page
|
||||
Evas_Object *welcome_page, *buttons;
|
||||
Evas_Object *welcome_page;
|
||||
|
||||
welcome_page = edje_object_add(ecore_evas_get(em->main_win_ee));
|
||||
evas_object_name_set(welcome_page, "welcome_page");
|
||||
// XXX Don't hardcode this
|
||||
edje_object_file_set(welcome_page, PACKAGE_DATA_DIR
|
||||
"/themes/default.edj", "ecdb/welcome_page");
|
||||
edje_object_part_swallow(gui, "action_area", welcome_page);
|
||||
edje_object_part_geometry_get(gui, "active_area", &x, &y, &w, &h);
|
||||
evas_object_move(welcome_page, x, y);
|
||||
evas_object_resize(welcome_page, w, h);
|
||||
edje_object_part_swallow(gui, "action_area", welcome_page);
|
||||
evas_object_show(welcome_page);
|
||||
|
||||
/* Buttons next */
|
||||
|
||||
/* Buttons next, do properly next */
|
||||
Evas_Object *b;
|
||||
int i;
|
||||
char *names[] = {"b1","b2","b3","b4"};
|
||||
char *labels[] = {"Burn Data CD", "Burn Audio CD", "Copy Disc",
|
||||
"Erase Re-writable disc"};
|
||||
char *icons[] = {"drive_optical.png", "audio.png", "iso.png",
|
||||
"clear.png"};
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
b = edje_object_add(ecore_evas_get(em->main_win_ee));
|
||||
evas_object_name_set(b, names[i]);
|
||||
edje_object_file_set(b, PACKAGE_DATA_DIR
|
||||
"/themes/default.edj", "ecdb/button");
|
||||
edje_object_part_geometry_get(welcome_page, names[i],
|
||||
&x, &y, &w, &h);
|
||||
edje_object_part_text_set(b, "label", labels[i]);
|
||||
ecdb_button_icon_swallow(ecore_evas_get(em->main_win_ee), b,
|
||||
icons[i]);
|
||||
evas_object_move(b, x, y);
|
||||
evas_object_resize(b, w, h);
|
||||
edje_object_part_swallow(welcome_page, names[i], b);
|
||||
evas_object_show(b);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user