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

View File

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

View File

@ -1,9 +1,13 @@
/* vim: set sw=3 ts=3 sts=3 expandtab: */
#include "ecdb.h"
static void _button_cb_return(void *data, Evas_Object *obj, void *event_info);
static void _button_cb_begin(void *data, Evas_Object *obj, void *event_info);
static void _button_cb_return(void *data, Evas_Object *obj,
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 _settings_clicked(void *data, Evas_Object *obj,
const char *emission, const char *source);
static int _update_capacity(void *data, int type, void *ev_data);
// 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 _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 _settings_clicked(void *data, Evas_Object *obj, void *event_into);
// Update on showing to proper values
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
_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;
Ecdb_Burn_Project *proj;
@ -86,7 +91,9 @@ _button_cb_return(void *data, Evas_Object *obj, void *event_info)
}
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;
Ecdb_Burn_Project *proj;
@ -137,10 +144,14 @@ _button_cb_begin(void *data, Evas_Object *obj, void *event_info)
case ECDB_ERROR_NONE:
edje_object_signal_emit(gui, "ecdb,filelist,hide", "ecdb");
edje_object_signal_emit(proj->parent, "ecdb,burn_data,start", "ecdb");
const char *ids[] = {"ecdb/burn_data/return", "ecdb/burn_data/begin",
"ecdb/burn_data/file", "ecdb/burn_data/drive",
"ecdb/burn_data/speed"};
ecdb_gui_controls_disable(ids, 5);
const char *ids[] = {"ecdb/burn_data/drives", "ecdb/burn_data/speed"};
ecdb_gui_controls_disable(ids, 2);
edje_object_signal_emit(proj->parent,
"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;
case ECDB_ERROR_IMAGE_CREATE:
@ -393,7 +404,9 @@ _proj_config(void *data, Evas_Object *obj, void *event_info)
}
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;
const Evas_Object *table;
@ -452,17 +465,17 @@ ecdb_burn_data_page_show(void)
evas_object_show(swallow);
proj->parent = swallow;
b = ecdb_button_add(swallow, "ecdb/burn_data/return");
ecdb_button_label_set(b, "Return to Main Page");
evas_object_smart_callback_add(b, "clicked", _button_cb_return, proj);
evas_object_show(b);
ecdb_button_icon_set(b, "ecdb/burn_data/return");
// The return button
edje_object_part_text_set(swallow, "ecdb/burn_data/return/text",
"Return to Main Page");
edje_object_signal_callback_add(swallow, "ecdb/burn_data/return,clicked",
"*", _button_cb_return, proj);
b = ecdb_button_add(swallow, "ecdb/burn_data/begin");
ecdb_button_label_set(b, "Start Burn");
evas_object_smart_callback_add(b, "clicked", _button_cb_begin, proj);
evas_object_show(b);
ecdb_button_icon_set(b, "ecdb/burn_data/begin");
// The start button
edje_object_part_text_set(swallow, "ecdb/burn_data/begin/text",
"Start Burn");
edje_object_signal_callback_add(swallow, "ecdb/burn_data/begin,clicked",
"*", _button_cb_begin, proj);
proj->drive_combo = ecdb_combo_add(swallow, "ecdb/burn_data/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");
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");
evas_object_data_set(proj->capacity, "source", src);
ecore_event_handler_add(ECDB_FILELIST_SIZE_CHANGED, _update_capacity,
@ -593,10 +605,11 @@ ecdb_burn_data_page_show(void)
evas_object_show(b);
// At the end so t is a valid pointer
b = ecdb_button_add(swallow, "ecdb/burn_data/settings");
ecdb_button_label_set(b, "Settings");
evas_object_smart_callback_add(b, "clicked", _settings_clicked, t);
evas_object_show(b);
edje_object_part_text_set(swallow, "ecdb/burn_data/settings/text",
"Settings");
edje_object_signal_callback_add(swallow,
"ecdb/burn_data/settings,clicked",
"*", _settings_clicked, t);
}
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;
Ecdb_Erase_Project *proj;
char buf[1024];
const char *state;
const char *state, *ids[] = {"ecdb/erase/drive"};
int drive;
proj = ecdb_erase_project_new();
@ -69,7 +69,11 @@ _button_cb_begin(void *data __UNUSED__, Evas_Object *obj,
return;
}
ecdb_gui_controls_enable(ids, 1);
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
@ -145,17 +149,15 @@ void
ecdb_erase_cleanup(void)
{
Evas_Object *swallow;
const char *ids[] = {"ecdb/erase/return", "ecdb/erase/begin",
"ecdb/erase/speed", "ecdb/erase/drive"};
const char *ids[] = {"ecdb/erase/drive"};
swallow = evas_object_name_find(ecore_evas_get(em->main_win_ee),
"erase_page");
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");
swallow = evas_object_name_find(ecore_evas_get(em->main_win_ee),
"ecdb/erase/drive");
ecdb_check_checked_set(swallow, 0);
edje_object_signal_emit(swallow, "ecdb,enable,ecdb/erase/begin", "ecdb");
edje_object_signal_emit(swallow, "ecdb,enable,ecdb/erase/return", "ecdb");
edje_object_signal_emit(swallow, "ecdb,enable,ecdb/erase/speed", "ecdb");
}