Buttons work now, need to add signals and callbacks for them now

This commit is contained in:
Jaime Thomas 2008-09-19 15:13:34 +00:00
parent 7fb90ba830
commit d8709c66eb
3 changed files with 33 additions and 27 deletions

View File

@ -3,33 +3,14 @@ group {
min: 640 170;
parts {
part {
name: "background";
type: RECT;
description {
state: "default" 0.0;
color: 0 255 0 255;
rel1 {
relative: 0.0 0.0;
offset: 0 0;
}
rel2 {
relative: 1.0 1.0;
offset: -1 -1;
}
}
}
part {
name: "b1";
type: SWALLOW;
repeat_events: 1;
description {
state: "default" 0.0;
min: 88 24;
min: 28 24;
rel1 {
relative: 0.0 0.0;
@ -46,6 +27,7 @@ group {
part {
name: "b2";
type: SWALLOW;
repeat_events: 1;
description {
state: "default" 0.0;
@ -66,6 +48,7 @@ group {
part {
name: "b3";
type: SWALLOW;
repeat_events: 1;
description {
state: "default" 0.0;
@ -86,6 +69,7 @@ group {
part {
name: "b4";
type: SWALLOW;
repeat_events: 1;
description {
state: "default" 0.0;

View File

@ -235,12 +235,12 @@ group {
part {
name: "action_area";
type: SWALLOW;
mouse_events: 0;
mouse_events: 1;
repeat_events: 1;
description {
state: "default" 0.0;
min: 99999 170;
min: 640 170;
rel1 {
to: "paned_draggie";

View File

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