Also move burn_data over as well.

This commit is contained in:
Jaime Thomas 2009-01-24 22:47:17 +00:00
parent 87dc267155
commit a16e03399f
4 changed files with 74 additions and 110 deletions

View File

@ -54,51 +54,9 @@ group {
} }
} }
part { BUTTON("ecdb/burn_data/return", "ecdb/burn_data/return/text", 100, 26, 150, 26, "bg", "bg", 0, 0, "bg", "bg", 1, 1, 0, 5, -5, 1, 1, 0)
name: "ecdb/burn_data/return";
type: SWALLOW;
repeat_events: 1;
scale: 1;
description {
state: "default" 0.0;
rel1 { BUTTON("ecdb/burn_data/begin", "ecdb/burn_data/begin/text", 100, 26, 150, 26, "bg", "ecdb/burn_data/return", 0, 1, "bg", "ecdb/burn_data/return", 1, 1, 0, 5, -5, -1, 1, 0)
to: "bg";
relative: 1.0 0.0;
offset: -200 5;
}
rel2 {
to: "bg";
relative: 1.0 0.0;
offset: -11 30;
}
}
}
part {
name: "ecdb/burn_data/begin";
type: SWALLOW;
repeat_events: 1;
scale: 1;
description {
state: "default" 0.0;
rel1 {
to: "ecdb/burn_data/return";
relative: 0.0 1.0;
offset: 0 5;
}
rel2 {
to: "ecdb/burn_data/return";
relative: 1.0 1.0;
offset: 0 30;
}
}
}
part { part {
name: "ecdb/burn_data/drive"; name: "ecdb/burn_data/drive";
@ -108,17 +66,21 @@ group {
description { description {
state: "default" 0.0; state: "default" 0.0;
align: 1.0 0.0;
max: 150 26;
min: 100 26;
rel1 { rel1 {
to: "ecdb/burn_data/begin"; to_y: "ecdb/burn_data/begin";
to_x: "bg";
relative: 0.0 1.0; relative: 0.0 1.0;
offset: 0 5; offset: 0 5;
} }
rel2 { rel2 {
to: "ecdb/burn_data/begin"; to: "bg";
relative: 1.0 1.0; relative: 1.0 1.0;
offset: 0 30; offset: -5 -1;
} }
} }
} }
@ -131,43 +93,26 @@ group {
description { description {
state: "default" 0.0; state: "default" 0.0;
align: 1.0 0.0;
max: 150 26;
min: 100 26;
rel1 { rel1 {
to: "ecdb/burn_data/drive"; to_y: "ecdb/burn_data/drive";
to_x: "bg";
relative: 0.0 1.0; relative: 0.0 1.0;
offset: 0 5; offset: 0 5;
} }
rel2 { rel2 {
to: "ecdb/burn_data/drive"; to: "bg";
relative: 1.0 1.0; relative: 1.0 1.0;
offset: 0 30; offset: -5 -1;
} }
} }
} }
part { BUTTON("ecdb/burn_data/settings", "ecdb/burn_data/settings/text", 100, 26, 150, 26, "bg", "ecdb/burn_data/speed", 0, 1, "bg", "ecdb/burn_data/speed", 1, 1, 0, 5, -5, -1, 1, 0)
name: "ecdb/burn_data/settings";
type: SWALLOW;
repeat_events: 1;
scale: 1;
description {
state: "default" 0.0;
rel1 {
to: "ecdb/burn_data/speed";
relative: 0.0 1.0;
offset: 0 5;
}
rel2 {
to: "ecdb/burn_data/speed";
relative: 1.0 1.0;
offset: 0 30;
}
}
}
/* Missing a description later */ /* Missing a description later */
part { part {
@ -186,9 +131,10 @@ group {
} }
rel2 { rel2 {
to: "bg"; to_x: "ecdb/burn_data/return";
relative: 1.0 1.0; to_y: "ecdb/burn_data/capacity";
offset: -205 -26; relative: 0.0 0.0;
offset: -5 -10;
} }
} }
} }
@ -212,7 +158,7 @@ group {
rel2 { rel2 {
to: "bg"; to: "bg";
relative: 1.0 1.0; relative: 1.0 1.0;
offset: -11 -1; offset: -11 -10;
} }
} }
} }
@ -350,6 +296,9 @@ group {
} }
programs { programs {
BUTTON_PROGS("ecdb/burn_data/return")
BUTTON_PROGS("ecdb/burn_data/begin")
BUTTON_PROGS("ecdb/burn_data/settings")
program { program {
name: "burn_data_page,visible1"; name: "burn_data_page,visible1";
signal: "ecdb,burn_data_page,visible"; signal: "ecdb,burn_data_page,visible";

View File

@ -91,7 +91,7 @@ group {
to_y: "ecdb/erase/speed"; to_y: "ecdb/erase/speed";
to_x: "bg"; to_x: "bg";
relative: 0.0 1.0; relative: 0.0 1.0;
offset: 5 5; offset: 0 5;
} }
rel2 { rel2 {

View File

@ -1,9 +1,13 @@
/* vim: set sw=3 ts=3 sts=3 expandtab: */ /* vim: set sw=3 ts=3 sts=3 expandtab: */
#include "ecdb.h" #include "ecdb.h"
static void _button_cb_return(void *data, Evas_Object *obj, void *event_info); static void _button_cb_return(void *data, Evas_Object *obj,
static void _button_cb_begin(void *data, Evas_Object *obj, void *event_info); const char *emission, const char *source);
static void _button_cb_begin(void *data, Evas_Object *obj,
const char *emission, const char *source);
static void _combo_cb_clicked(void *data, Evas_Object *obj, void *event_info); static void _combo_cb_clicked(void *data, Evas_Object *obj, void *event_info);
static void _settings_clicked(void *data, Evas_Object *obj,
const char *emission, const char *source);
static int _update_capacity(void *data, int type, void *ev_data); static int _update_capacity(void *data, int type, void *ev_data);
// Config inwin updates // Config inwin updates
@ -16,7 +20,6 @@ static void _sim_clicked(void *data, Evas_Object *obj, void *event_info);
static void _underrun_clicked(void *data, Evas_Object *obj, void *event_info); static void _underrun_clicked(void *data, Evas_Object *obj, void *event_info);
static void _apply_clicked(void *data, Evas_Object *obj, void *event_info); static void _apply_clicked(void *data, Evas_Object *obj, void *event_info);
static void _proj_name(void *data, Evas *e, Evas_Object *obj, void *event_info); static void _proj_name(void *data, Evas *e, Evas_Object *obj, void *event_info);
static void _settings_clicked(void *data, Evas_Object *obj, void *event_into);
// Update on showing to proper values // Update on showing to proper values
static void _joliet_config(void *data, Evas_Object *obj, void *event_info); static void _joliet_config(void *data, Evas_Object *obj, void *event_info);
@ -65,7 +68,9 @@ _update_capacity(void *data, int type, void *ev_data)
} }
static void static void
_button_cb_return(void *data, Evas_Object *obj, void *event_info) _button_cb_return(void *data, Evas_Object *obj __UNUSED__,
const char *emission __UNUSED__,
const char *source __UNUSED__)
{ {
Evas_Object *gui; Evas_Object *gui;
Ecdb_Burn_Project *proj; Ecdb_Burn_Project *proj;
@ -86,7 +91,9 @@ _button_cb_return(void *data, Evas_Object *obj, void *event_info)
} }
static void static void
_button_cb_begin(void *data, Evas_Object *obj, void *event_info) _button_cb_begin(void *data, Evas_Object *obj __UNUSED__,
const char *emission __UNUSED__,
const char *source __UNUSED__)
{ {
Evas_Object *gui; Evas_Object *gui;
Ecdb_Burn_Project *proj; Ecdb_Burn_Project *proj;
@ -137,10 +144,14 @@ _button_cb_begin(void *data, Evas_Object *obj, void *event_info)
case ECDB_ERROR_NONE: case ECDB_ERROR_NONE:
edje_object_signal_emit(gui, "ecdb,filelist,hide", "ecdb"); edje_object_signal_emit(gui, "ecdb,filelist,hide", "ecdb");
edje_object_signal_emit(proj->parent, "ecdb,burn_data,start", "ecdb"); edje_object_signal_emit(proj->parent, "ecdb,burn_data,start", "ecdb");
const char *ids[] = {"ecdb/burn_data/return", "ecdb/burn_data/begin", const char *ids[] = {"ecdb/burn_data/drives", "ecdb/burn_data/speed"};
"ecdb/burn_data/file", "ecdb/burn_data/drive", ecdb_gui_controls_disable(ids, 2);
"ecdb/burn_data/speed"}; edje_object_signal_emit(proj->parent,
ecdb_gui_controls_disable(ids, 5); "ecdb,disable,ecdb/burn_data/return", "ecdb");
edje_object_signal_emit(proj->parent,
"ecdb,disable,ecdb/burn_data/begin", "ecdb");
edje_object_signal_emit(proj->parent,
"ecdb,disable,ecdb/burn_data/settings", "ecdb");
return; return;
case ECDB_ERROR_IMAGE_CREATE: case ECDB_ERROR_IMAGE_CREATE:
@ -393,7 +404,9 @@ _proj_config(void *data, Evas_Object *obj, void *event_info)
} }
static void static void
_settings_clicked(void *data, Evas_Object *obj, void *event_into) _settings_clicked(void *data, Evas_Object *obj __UNUSED__,
const char *emission __UNUSED__,
const char *source __UNUSED__)
{ {
Eina_Iterator *it; Eina_Iterator *it;
const Evas_Object *table; const Evas_Object *table;
@ -452,17 +465,17 @@ ecdb_burn_data_page_show(void)
evas_object_show(swallow); evas_object_show(swallow);
proj->parent = swallow; proj->parent = swallow;
b = ecdb_button_add(swallow, "ecdb/burn_data/return"); // The return button
ecdb_button_label_set(b, "Return to Main Page"); edje_object_part_text_set(swallow, "ecdb/burn_data/return/text",
evas_object_smart_callback_add(b, "clicked", _button_cb_return, proj); "Return to Main Page");
evas_object_show(b); edje_object_signal_callback_add(swallow, "ecdb/burn_data/return,clicked",
ecdb_button_icon_set(b, "ecdb/burn_data/return"); "*", _button_cb_return, proj);
b = ecdb_button_add(swallow, "ecdb/burn_data/begin"); // The start button
ecdb_button_label_set(b, "Start Burn"); edje_object_part_text_set(swallow, "ecdb/burn_data/begin/text",
evas_object_smart_callback_add(b, "clicked", _button_cb_begin, proj); "Start Burn");
evas_object_show(b); edje_object_signal_callback_add(swallow, "ecdb/burn_data/begin,clicked",
ecdb_button_icon_set(b, "ecdb/burn_data/begin"); "*", _button_cb_begin, proj);
proj->drive_combo = ecdb_combo_add(swallow, "ecdb/burn_data/drive"); proj->drive_combo = ecdb_combo_add(swallow, "ecdb/burn_data/drive");
ecdb_combo_header_set(proj->drive_combo, "Drive"); ecdb_combo_header_set(proj->drive_combo, "Drive");
@ -511,7 +524,6 @@ ecdb_burn_data_page_show(void)
b = edje_object_part_swallow_get(swallow, "ecdb/burn_data/filelist"); b = edje_object_part_swallow_get(swallow, "ecdb/burn_data/filelist");
ecdb_widget_focus_callback_add(b, "ecdb/burn_data/filelist"); ecdb_widget_focus_callback_add(b, "ecdb/burn_data/filelist");
// FIXME Turn this into a normal widget
proj->capacity = ecdb_capacity_add(swallow, "ecdb/burn_data/capacity"); proj->capacity = ecdb_capacity_add(swallow, "ecdb/burn_data/capacity");
evas_object_data_set(proj->capacity, "source", src); evas_object_data_set(proj->capacity, "source", src);
ecore_event_handler_add(ECDB_FILELIST_SIZE_CHANGED, _update_capacity, ecore_event_handler_add(ECDB_FILELIST_SIZE_CHANGED, _update_capacity,
@ -593,10 +605,11 @@ ecdb_burn_data_page_show(void)
evas_object_show(b); evas_object_show(b);
// At the end so t is a valid pointer // At the end so t is a valid pointer
b = ecdb_button_add(swallow, "ecdb/burn_data/settings"); edje_object_part_text_set(swallow, "ecdb/burn_data/settings/text",
ecdb_button_label_set(b, "Settings"); "Settings");
evas_object_smart_callback_add(b, "clicked", _settings_clicked, t); edje_object_signal_callback_add(swallow,
evas_object_show(b); "ecdb/burn_data/settings,clicked",
"*", _settings_clicked, t);
} }
else if (edje_object_part_swallow_get(gui, "action_area") != swallow) else if (edje_object_part_swallow_get(gui, "action_area") != swallow)
{ {

View File

@ -28,7 +28,7 @@ _button_cb_begin(void *data __UNUSED__, Evas_Object *obj,
Evas_Object *o; Evas_Object *o;
Ecdb_Erase_Project *proj; Ecdb_Erase_Project *proj;
char buf[1024]; char buf[1024];
const char *state; const char *state, *ids[] = {"ecdb/erase/drive"};
int drive; int drive;
proj = ecdb_erase_project_new(); proj = ecdb_erase_project_new();
@ -69,7 +69,11 @@ _button_cb_begin(void *data __UNUSED__, Evas_Object *obj,
return; return;
} }
ecdb_gui_controls_enable(ids, 1);
edje_object_signal_emit(obj, "ecdb,erase,start", "ecdb"); edje_object_signal_emit(obj, "ecdb,erase,start", "ecdb");
edje_object_signal_emit(obj, "ecdb,disable,ecdb/erase/begin", "ecdb");
edje_object_signal_emit(obj, "ecdb,disable,ecdb/erase/return", "ecdb");
edje_object_signal_emit(obj, "ecdb,disable,ecdb/erase/speed", "ecdb");
} }
void void
@ -145,17 +149,15 @@ void
ecdb_erase_cleanup(void) ecdb_erase_cleanup(void)
{ {
Evas_Object *swallow; Evas_Object *swallow;
const char *ids[] = {"ecdb/erase/return", "ecdb/erase/begin", const char *ids[] = {"ecdb/erase/drive"};
"ecdb/erase/speed", "ecdb/erase/drive"};
swallow = evas_object_name_find(ecore_evas_get(em->main_win_ee), swallow = evas_object_name_find(ecore_evas_get(em->main_win_ee),
"erase_page"); "erase_page");
edje_object_part_text_set(swallow, "progress_text", "Erase Complete!"); edje_object_part_text_set(swallow, "progress_text", "Erase Complete!");
ecdb_gui_controls_enable(ids, 4); ecdb_gui_controls_enable(ids, 1);
edje_object_signal_emit(swallow, "ecdb,erase,done", "ecdb"); edje_object_signal_emit(swallow, "ecdb,erase,done", "ecdb");
edje_object_signal_emit(swallow, "ecdb,enable,ecdb/erase/begin", "ecdb");
swallow = evas_object_name_find(ecore_evas_get(em->main_win_ee), edje_object_signal_emit(swallow, "ecdb,enable,ecdb/erase/return", "ecdb");
"ecdb/erase/drive"); edje_object_signal_emit(swallow, "ecdb,enable,ecdb/erase/speed", "ecdb");
ecdb_check_checked_set(swallow, 0);
} }