And burn_image too...
This commit is contained in:
parent
a16e03399f
commit
351d3126ff
@ -148,17 +148,18 @@ group {
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
max: 99999 20;
|
||||
min: 50 20;
|
||||
align: 0.0 1.0;
|
||||
|
||||
rel1 {
|
||||
to: "bg";
|
||||
relative: 0.0 1.0;
|
||||
offset: 10 -23;
|
||||
offset: 10 5;
|
||||
}
|
||||
|
||||
rel2 {
|
||||
to: "bg";
|
||||
relative: 1.0 1.0;
|
||||
offset: -11 -10;
|
||||
offset: -11 -5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -75,51 +75,9 @@ group {
|
||||
}
|
||||
}
|
||||
|
||||
part {
|
||||
name: "ecdb/burn_image/return";
|
||||
type: SWALLOW;
|
||||
repeat_events: 1;
|
||||
scale: 1;
|
||||
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
BUTTON("ecdb/burn_image/return", "ecdb/burn_image/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_image/begin";
|
||||
type: SWALLOW;
|
||||
repeat_events: 1;
|
||||
scale: 1;
|
||||
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
|
||||
rel1 {
|
||||
to: "ecdb/burn_image/return";
|
||||
relative: 0.0 1.0;
|
||||
offset: 0 5;
|
||||
}
|
||||
|
||||
rel2 {
|
||||
to: "ecdb/burn_image/return";
|
||||
relative: 1.0 1.0;
|
||||
offset: 0 30;
|
||||
}
|
||||
}
|
||||
}
|
||||
BUTTON("ecdb/burn_image/begin", "ecdb/burn_image/begin/text", 100, 26, 150, 26, "bg", "ecdb/burn_image/return", 0, 1, "bg", "ecdb/burn_image/return", 1, 1, 0, 5, -5, -1, 1, 0)
|
||||
|
||||
part {
|
||||
name: "ecdb/burn_image/file";
|
||||
@ -129,17 +87,21 @@ group {
|
||||
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
align: 1.0 0.0;
|
||||
max: 150 26;
|
||||
min: 100 26;
|
||||
|
||||
rel1 {
|
||||
to: "ecdb/burn_image/begin";
|
||||
to_y: "ecdb/burn_image/begin";
|
||||
to_x: "bg";
|
||||
relative: 0.0 1.0;
|
||||
offset: 0 5;
|
||||
}
|
||||
|
||||
rel2 {
|
||||
to: "ecdb/burn_image/begin";
|
||||
to: "bg";
|
||||
relative: 1.0 1.0;
|
||||
offset: 0 30;
|
||||
offset: -5 -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -152,17 +114,21 @@ group {
|
||||
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
align: 1.0 0.0;
|
||||
max: 150 26;
|
||||
min: 100 26;
|
||||
|
||||
rel1 {
|
||||
to: "ecdb/burn_image/file";
|
||||
to_y: "ecdb/burn_image/file";
|
||||
to_x: "bg";
|
||||
relative: 0.0 1.0;
|
||||
offset: 0 5;
|
||||
}
|
||||
|
||||
rel2 {
|
||||
to: "ecdb/burn_image/file";
|
||||
to: "bg";
|
||||
relative: 1.0 1.0;
|
||||
offset: 0 30;
|
||||
offset: -5 -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -175,17 +141,21 @@ group {
|
||||
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
max: 150 26;
|
||||
min: 100 26;
|
||||
align: 1.0 0.0;
|
||||
|
||||
rel1 {
|
||||
to: "ecdb/burn_image/drive";
|
||||
to_y: "ecdb/burn_image/drive";
|
||||
to_x: "bg";
|
||||
relative: 0.0 1.0;
|
||||
offset: 0 5;
|
||||
}
|
||||
|
||||
rel2 {
|
||||
to: "ecdb/burn_image/drive";
|
||||
to: "bg";
|
||||
relative: 1.0 1.0;
|
||||
offset: 0 30;
|
||||
offset: -5 -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -206,9 +176,10 @@ group {
|
||||
}
|
||||
|
||||
rel2 {
|
||||
to: "bg";
|
||||
relative: 1.0 1.0;
|
||||
offset: -205 -10;
|
||||
to_x: "ecdb/burn_image/speed";
|
||||
to_y: "bg";
|
||||
relative: 0.0 1.0;
|
||||
offset: -5 -10;
|
||||
}
|
||||
|
||||
image {
|
||||
@ -325,6 +296,8 @@ group {
|
||||
}
|
||||
|
||||
programs {
|
||||
BUTTON_PROGS("ecdb/burn_image/return")
|
||||
BUTTON_PROGS("ecdb/burn_image/begin")
|
||||
program {
|
||||
name: "burn_image_page,visible1";
|
||||
signal: "ecdb,burn_image_page,visible";
|
||||
|
@ -1,24 +1,28 @@
|
||||
/* 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
|
||||
_button_cb_return(void *data, Evas_Object *obj, void *event_info)
|
||||
_button_cb_return(void *data __UNUSED__, Evas_Object *obj,
|
||||
const char *emission __UNUSED__,
|
||||
const char *source __UNUSED__)
|
||||
{
|
||||
Evas_Object *swallow, *gui;
|
||||
Evas_Object *gui;
|
||||
char *signal;
|
||||
|
||||
gui = evas_object_name_find(ecore_evas_get(em->main_win_ee), "gui");
|
||||
swallow = evas_object_name_find(ecore_evas_get(em->main_win_ee),
|
||||
"burn_image_page");
|
||||
|
||||
edje_object_part_text_set(swallow, "progress_text", "Begin Burn");
|
||||
edje_object_part_text_set(swallow, "progress_percent", "0%");
|
||||
signal = evas_object_data_get(swallow, "hide_signal");
|
||||
edje_object_signal_emit(swallow, signal, "ecdb");
|
||||
edje_object_part_text_set(obj, "progress_text", "Begin Burn");
|
||||
edje_object_part_text_set(obj, "progress_percent", "0%");
|
||||
signal = evas_object_data_get(obj, "hide_signal");
|
||||
edje_object_signal_emit(obj, signal, "ecdb");
|
||||
ecdb_welcome_page_show();
|
||||
|
||||
/* Hide the filelist to be nice */
|
||||
@ -26,9 +30,11 @@ _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 __UNUSED__, Evas_Object *obj,
|
||||
const char *emission __UNUSED__,
|
||||
const char *source __UNUSED__)
|
||||
{
|
||||
Evas_Object *swallow, *gui, *o;
|
||||
Evas_Object *gui, *o;
|
||||
Ecdb_Burn_Project *proj;
|
||||
Ecdb_Source *iso_file;
|
||||
char *file, buf[1024];
|
||||
@ -36,8 +42,6 @@ _button_cb_begin(void *data, Evas_Object *obj, void *event_info)
|
||||
int drive, speed;
|
||||
|
||||
gui = evas_object_name_find(ecore_evas_get(em->main_win_ee), "gui");
|
||||
swallow = evas_object_name_find(ecore_evas_get(em->main_win_ee),
|
||||
"burn_image_page");
|
||||
o = evas_object_name_find(ecore_evas_get(em->main_win_ee),
|
||||
"ecdb/burn_image/file");
|
||||
file = ecdb_entry_text_get(o);
|
||||
@ -45,7 +49,7 @@ _button_cb_begin(void *data, Evas_Object *obj, void *event_info)
|
||||
// Make sure that file actually exists
|
||||
if (!ecore_file_exists(file))
|
||||
{
|
||||
edje_object_part_text_set(swallow, "progress_text", "File doesn't "
|
||||
edje_object_part_text_set(obj, "progress_text", "File doesn't "
|
||||
"exists!");
|
||||
FREE(file);
|
||||
return;
|
||||
@ -66,7 +70,7 @@ _button_cb_begin(void *data, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
printf("Choose a drive!\n");
|
||||
ecdb_burn_project_destroy(proj);
|
||||
edje_object_part_text_set(swallow, "progress_text", "Choose a Drive!");
|
||||
edje_object_part_text_set(obj, "progress_text", "Choose a Drive!");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -80,12 +84,12 @@ _button_cb_begin(void *data, Evas_Object *obj, void *event_info)
|
||||
proj->speed = speed;
|
||||
|
||||
snprintf(buf, sizeof(buf), "Commencing...");
|
||||
edje_object_part_text_set(swallow, "progress_text", buf);
|
||||
edje_object_part_text_set(obj, "progress_text", buf);
|
||||
if (!ecdb_aquire_drive(ECDB_PROJECT(proj), drive))
|
||||
{
|
||||
printf("Couldn't grab drive!\n");
|
||||
ecdb_burn_project_destroy(proj);
|
||||
edje_object_part_text_set(swallow, "progress_text",
|
||||
edje_object_part_text_set(obj, "progress_text",
|
||||
"Couldn't grab the drive!");
|
||||
return;
|
||||
}
|
||||
@ -95,11 +99,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(swallow, "ecdb,burn_image,start", "ecdb");
|
||||
const char *ids[] = {"ecdb/burn_image/return", "ecdb/burn_image/begin",
|
||||
"ecdb/burn_image/file", "ecdb/burn_image/drive",
|
||||
edje_object_signal_emit(obj, "ecdb,burn_image,start", "ecdb");
|
||||
const char *ids[] = {"ecdb/burn_image/file", "ecdb/burn_image/drive",
|
||||
"ecdb/burn_image/speed"};
|
||||
ecdb_gui_controls_disable(ids, 5);
|
||||
ecdb_gui_controls_disable(ids, 3);
|
||||
edje_object_signal_emit(obj, "ecdb,disable,ecdb/burn_image/begin",
|
||||
"ecdb");
|
||||
edje_object_signal_emit(obj, "ecdb,disable,ecdb/burn_image/return",
|
||||
"ecdb");
|
||||
return;
|
||||
|
||||
case ECDB_ERROR_IMAGE_CREATE:
|
||||
@ -118,7 +125,7 @@ _button_cb_begin(void *data, Evas_Object *obj, void *event_info)
|
||||
snprintf(buf, sizeof(buf), "Unknown error :-(");
|
||||
}
|
||||
|
||||
edje_object_part_text_set(swallow, "progress_text", buf);
|
||||
edje_object_part_text_set(obj, "progress_text", buf);
|
||||
Ecdb_Project *p = ECDB_PROJECT(proj);
|
||||
burn_drive_release(p->drive->tangible[0].drive, 1);
|
||||
burn_drive_info_free(p->drive->tangible);
|
||||
@ -202,17 +209,15 @@ ecdb_burn_image_page_show(void)
|
||||
ecdb_page_hide_finished, NULL);
|
||||
evas_object_show(swallow);
|
||||
|
||||
b = ecdb_button_add(swallow, "ecdb/burn_image/return");
|
||||
ecdb_button_label_set(b, "Return to Main Page");
|
||||
evas_object_smart_callback_add(b, "clicked", _button_cb_return, NULL);
|
||||
evas_object_show(b);
|
||||
ecdb_button_icon_set(b, "ecdb/burn_image/return");
|
||||
edje_object_part_text_set(swallow, "ecdb/burn_image/return/text",
|
||||
"Return to Main Page");
|
||||
edje_object_signal_callback_add(swallow, "ecdb/burn_image/return,clicked",
|
||||
"*", _button_cb_return, NULL);
|
||||
|
||||
b = ecdb_button_add(swallow, "ecdb/burn_image/begin");
|
||||
ecdb_button_label_set(b, "Start Burn");
|
||||
evas_object_smart_callback_add(b, "clicked", _button_cb_begin, NULL);
|
||||
evas_object_show(b);
|
||||
ecdb_button_icon_set(b, "ecdb/burn_image/begin");
|
||||
edje_object_part_text_set(swallow, "ecdb/burn_image/begin/text",
|
||||
"Start Burn");
|
||||
edje_object_signal_callback_add(swallow, "ecdb/burn_image/begin,clicked",
|
||||
"*", _button_cb_begin, NULL);
|
||||
|
||||
b = ecdb_entry_add(swallow, "ecdb/burn_image/file");
|
||||
ecdb_entry_text_set(b, "Burn File");
|
||||
|
Loading…
Reference in New Issue
Block a user