2008-12-22 01:12:16 +00:00
|
|
|
/* vim: set sw=3 ts=3 sts=3 expandtab: */
|
|
|
|
#include "ecdb.h"
|
|
|
|
|
2009-01-30 03:59:48 +00:00
|
|
|
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);
|
2009-02-06 04:03:13 +00:00
|
|
|
static void _page_del(void *data, Evas *e, Evas_Object *obj, void *ev);
|
2008-12-22 01:12:16 +00:00
|
|
|
static void _combo_cb_clicked(void *data, Evas_Object *obj, void *event_info);
|
2009-02-22 00:21:31 +00:00
|
|
|
static void _update_capacity(Ewl_Widget *w, void *ev_info, void *data);
|
2008-12-24 22:59:59 +00:00
|
|
|
|
2009-01-11 02:14:02 +00:00
|
|
|
// Config inwin updates
|
2009-02-09 02:51:35 +00:00
|
|
|
static void _joliet_clicked(void *data, Evas_Object *obj, const char *emission,
|
|
|
|
const char *source);
|
|
|
|
static void _rockridge_clicked(void *data, Evas_Object *obj,
|
|
|
|
const char *emission,
|
|
|
|
const char *source);
|
|
|
|
static void _symlinks_clicked(void *data, Evas_Object *obj,
|
|
|
|
const char *emission,
|
|
|
|
const char *source);
|
|
|
|
static void _hidden_clicked(void *data, Evas_Object *obj, const char *emission,
|
|
|
|
const char *source);
|
|
|
|
static void _multi_clicked(void *data, Evas_Object *obj, const char *emission,
|
|
|
|
const char *source);
|
|
|
|
static void _sim_clicked(void *data, Evas_Object *obj, const char *emission,
|
|
|
|
const char *source);
|
|
|
|
static void _underrun_clicked(void *data, Evas_Object *obj,
|
|
|
|
const char *emission,
|
|
|
|
const char *source);
|
|
|
|
static void _apply_clicked(void *data, Evas_Object *obj, const char *emission,
|
|
|
|
const char *source);
|
2009-01-11 02:14:02 +00:00
|
|
|
static void _proj_name(void *data, Evas *e, Evas_Object *obj, void *event_info);
|
2009-01-30 03:59:48 +00:00
|
|
|
static void _settings_clicked(void *data, Evas_Object *obj,
|
|
|
|
const char *emission,
|
|
|
|
const char *source);
|
2009-01-11 02:14:02 +00:00
|
|
|
|
|
|
|
// Update on showing to proper values
|
|
|
|
static void _joliet_config(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
static void _rockridge_config(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
static void _symlinks_config(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
static void _hidden_config(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
static void _multi_config(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
static void _sim_config(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
static void _underrun_config(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
static void _proj_config(void *data, Evas_Object *obj, void *event_info);
|
2009-02-05 04:11:22 +00:00
|
|
|
static void _page_hide_finished(void *data, Evas_Object *o,
|
|
|
|
const char *emission,
|
|
|
|
const char *source);
|
|
|
|
|
2009-02-06 04:03:13 +00:00
|
|
|
static void
|
|
|
|
_page_del(void *data, Evas *e __UNUSED__, Evas_Object *obj, void *ev __UNUSED__)
|
|
|
|
{
|
|
|
|
Ecdb_Data_Project *proj;
|
|
|
|
Ecdb_Source *src;
|
|
|
|
|
|
|
|
src = data;
|
|
|
|
proj = evas_object_data_get(obj, "proj");
|
|
|
|
if (proj)
|
|
|
|
ecdb_data_project_destroy(proj);
|
|
|
|
}
|
|
|
|
|
2009-02-05 04:11:22 +00:00
|
|
|
static void
|
|
|
|
_page_hide_finished(void *data, Evas_Object *o,
|
|
|
|
const char *emission __UNUSED__,
|
|
|
|
const char *source __UNUSED__)
|
|
|
|
{
|
2009-02-27 01:05:10 +00:00
|
|
|
Ecdb_Page *page = data;
|
|
|
|
Ecdb_Data_Project *proj;
|
2009-02-05 04:11:22 +00:00
|
|
|
|
2009-02-27 01:05:10 +00:00
|
|
|
proj = evas_object_data_get(page->data, "proj");
|
|
|
|
edje_object_part_unswallow(page->gui, page->data);
|
|
|
|
evas_object_hide(page->data);
|
|
|
|
ewl_widget_hide(proj->filelist);
|
2009-02-05 04:11:22 +00:00
|
|
|
}
|
2009-01-11 02:14:02 +00:00
|
|
|
|
2009-02-22 00:21:31 +00:00
|
|
|
static void
|
|
|
|
_update_capacity(Ewl_Widget *w, void *ev_info, void *data)
|
2008-12-24 22:59:59 +00:00
|
|
|
{
|
2009-02-05 04:11:22 +00:00
|
|
|
Ecdb_Page *page;
|
2008-12-24 22:59:59 +00:00
|
|
|
Ecdb_Source *src;
|
2009-02-05 04:11:22 +00:00
|
|
|
Ecdb_Data_Project *proj;
|
2009-01-11 22:13:44 +00:00
|
|
|
Ecdb_Project *base_proj;
|
|
|
|
float val;
|
2008-12-24 22:59:59 +00:00
|
|
|
|
2009-02-05 04:11:22 +00:00
|
|
|
page = data;
|
2008-12-26 19:03:11 +00:00
|
|
|
|
2009-02-05 04:11:22 +00:00
|
|
|
proj = evas_object_data_get(page->data, "proj");
|
2009-01-11 22:13:44 +00:00
|
|
|
base_proj = ECDB_PROJECT(proj);
|
2009-02-22 00:21:31 +00:00
|
|
|
src = data;
|
|
|
|
|
|
|
|
/* Find our topmost source */
|
|
|
|
while ((src) && (src->parent))
|
|
|
|
src = src->parent;
|
|
|
|
|
2009-01-11 22:13:44 +00:00
|
|
|
if ((base_proj->drive) && (base_proj->drive->capacity > 0))
|
2008-12-25 06:23:20 +00:00
|
|
|
{
|
2009-02-23 01:22:02 +00:00
|
|
|
EINA_ERROR_PDBG("drive capacity: %lld, src->size: %lld\n",
|
2009-01-11 22:13:44 +00:00
|
|
|
base_proj->drive->capacity, src->size);
|
|
|
|
val = (float)src->size / (float)base_proj->drive->capacity;
|
2008-12-25 06:23:20 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2008-12-26 19:03:11 +00:00
|
|
|
// Default to a nice, small size
|
2009-01-11 22:13:44 +00:00
|
|
|
val = (float)src->size / 1048576.0 / 700.0;
|
2008-12-26 19:03:11 +00:00
|
|
|
}
|
2009-01-11 22:13:44 +00:00
|
|
|
if (val > 1.0)
|
2008-12-26 19:03:11 +00:00
|
|
|
{
|
2009-02-23 01:22:02 +00:00
|
|
|
EINA_ERROR_PDBG("OVER SIZE LIMIT!\n");
|
2009-01-11 22:13:44 +00:00
|
|
|
edje_object_signal_emit(proj->capacity, "ecdb,capacity,exceeded", "ecdb");
|
2009-02-05 04:11:22 +00:00
|
|
|
edje_object_signal_emit(page->data, "ecdb,capacity, exceeded", "ecdb");
|
2008-12-25 06:23:20 +00:00
|
|
|
}
|
2009-01-11 22:13:44 +00:00
|
|
|
ecdb_capacity_float_set(proj->capacity, val);
|
2009-02-23 01:22:02 +00:00
|
|
|
EINA_ERROR_PDBG("%lld\n", src->size);
|
2008-12-24 22:59:59 +00:00
|
|
|
}
|
2008-12-22 01:12:16 +00:00
|
|
|
|
|
|
|
static void
|
2009-01-30 03:59:48 +00:00
|
|
|
_button_cb_return(void *data, Evas_Object *obj,
|
|
|
|
const char *emission __UNUSED__,
|
|
|
|
const char *source __UNUSED__)
|
2008-12-22 01:12:16 +00:00
|
|
|
{
|
2009-02-05 04:11:22 +00:00
|
|
|
Ecdb_Page *page;
|
2008-12-26 19:03:11 +00:00
|
|
|
|
2009-02-05 04:11:22 +00:00
|
|
|
page = data;
|
|
|
|
edje_object_signal_emit(page->data, "ecdb,burn_data_page,hide", "ecdb");
|
|
|
|
ecdb_welcome_page_show(page);
|
2008-12-22 01:12:16 +00:00
|
|
|
|
|
|
|
/* Hide the filelist to be nice */
|
2009-02-05 04:11:22 +00:00
|
|
|
edje_object_signal_emit(page->gui, "ecdb,filelist,hide", "ecdb");
|
2008-12-22 01:12:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2009-02-05 04:11:22 +00:00
|
|
|
_button_cb_begin(void *data, Evas_Object *obj __UNUSED__,
|
2009-01-30 03:59:48 +00:00
|
|
|
const char *emission __UNUSED__,
|
|
|
|
const char *source __UNUSED__)
|
2008-12-22 01:12:16 +00:00
|
|
|
{
|
2009-02-05 04:11:22 +00:00
|
|
|
Ecdb_Data_Project *proj;
|
|
|
|
Ecdb_Page *page;
|
2008-12-23 22:42:15 +00:00
|
|
|
char buf[1024];
|
2008-12-22 01:12:16 +00:00
|
|
|
Ecdb_Burn_Result burn_result;
|
2009-02-05 04:11:22 +00:00
|
|
|
int drive, speed, idx;
|
2008-12-22 01:12:16 +00:00
|
|
|
|
2009-02-05 04:11:22 +00:00
|
|
|
page = data;
|
|
|
|
proj = evas_object_data_get(page->data, "proj");
|
2008-12-26 19:03:11 +00:00
|
|
|
|
2009-02-05 04:11:22 +00:00
|
|
|
drive = ecdb_combo_selected_get(ECDB_PROJECT(proj)->drive_combo);
|
|
|
|
if (drive < 0)
|
2008-12-22 01:12:16 +00:00
|
|
|
{
|
2009-02-23 01:22:02 +00:00
|
|
|
EINA_ERROR_PINFO("Choose a drive!\n");
|
2009-02-05 04:11:22 +00:00
|
|
|
edje_object_part_text_set(page->data, "progress_text", "Choose a Drive!");
|
2008-12-22 01:12:16 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
speed = ecdb_speed_convert(eina_list_nth(em->drives, drive),
|
2009-02-05 04:11:22 +00:00
|
|
|
ecdb_combo_selected_get(ECDB_BURN(proj)->speed_combo));
|
2008-12-22 01:12:16 +00:00
|
|
|
if (speed < 0)
|
2009-02-05 04:11:22 +00:00
|
|
|
ECDB_BURN(proj)->speed = 0;
|
2008-12-22 01:12:16 +00:00
|
|
|
else
|
2009-02-05 04:11:22 +00:00
|
|
|
ECDB_BURN(proj)->speed = speed;
|
2008-12-22 01:12:16 +00:00
|
|
|
|
2009-02-05 04:11:22 +00:00
|
|
|
ECDB_BURN(proj)->files = ewl_widget_data_get(proj->filelist, "source");
|
|
|
|
while (ECDB_BURN(proj)->files->parent)
|
|
|
|
ECDB_BURN(proj)->files = ECDB_BURN(proj)->files->parent;
|
2008-12-23 22:42:15 +00:00
|
|
|
|
2008-12-22 01:12:16 +00:00
|
|
|
snprintf(buf, sizeof(buf), "Commencing...");
|
2009-02-05 04:11:22 +00:00
|
|
|
edje_object_part_text_set(page->data, "progress_text", buf);
|
2009-01-11 22:13:44 +00:00
|
|
|
if (!ecdb_aquire_drive(ECDB_PROJECT(proj), drive))
|
2008-12-22 01:12:16 +00:00
|
|
|
{
|
2009-02-23 01:22:02 +00:00
|
|
|
EINA_ERROR_PWARN("Couldn't grab drive!\n");
|
2009-02-05 04:11:22 +00:00
|
|
|
edje_object_part_text_set(page->data, "progress_text",
|
2008-12-22 01:12:16 +00:00
|
|
|
"Couldn't grab the drive!");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2009-02-17 19:16:38 +00:00
|
|
|
burn_result = ecdb_burn_project(ECDB_BURN(proj), page);
|
2008-12-22 01:12:16 +00:00
|
|
|
switch (burn_result)
|
|
|
|
{
|
|
|
|
case ECDB_ERROR_NONE:
|
2009-02-05 04:11:22 +00:00
|
|
|
edje_object_signal_emit(page->gui, "ecdb,filelist,hide", "ecdb");
|
|
|
|
edje_object_signal_emit(page->data, "ecdb,burn_data,start", "ecdb");
|
|
|
|
Evas_Object *objs[] = {proj->capacity, proj->settings,
|
|
|
|
proj->filelist_swallow, ECDB_BURN(proj)->speed_combo,
|
|
|
|
ECDB_PROJECT(proj)->ret, ECDB_PROJECT(proj)->begin,
|
|
|
|
NULL};
|
2009-02-27 01:05:10 +00:00
|
|
|
for (idx = 0; objs[idx] != NULL; idx++)
|
|
|
|
{
|
2009-02-05 04:11:22 +00:00
|
|
|
edje_object_signal_emit(objs[idx], "ecdb,disable", "ecdb");
|
2009-02-27 01:05:10 +00:00
|
|
|
printf("disabling controls...\n");
|
|
|
|
}
|
2008-12-22 01:12:16 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ECDB_ERROR_IMAGE_CREATE:
|
|
|
|
snprintf(buf, sizeof(buf), "Invalid file!");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ECDB_ERROR_SOURCE_ATTACH:
|
|
|
|
snprintf(buf, sizeof(buf), "Couldn't attach source data!");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ECDB_ERROR_WRITE_MODE:
|
|
|
|
snprintf(buf, sizeof(buf), "No suitable burn mode!");
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
snprintf(buf, sizeof(buf), "Unknown error :-(");
|
2009-02-17 19:16:38 +00:00
|
|
|
}
|
|
|
|
|
2009-02-05 04:11:22 +00:00
|
|
|
edje_object_part_text_set(page->data, "progress_text", buf);
|
2009-01-11 22:13:44 +00:00
|
|
|
burn_drive_release(ECDB_PROJECT(proj)->drive->tangible[0].drive, 1);
|
|
|
|
burn_drive_info_free(ECDB_PROJECT(proj)->drive->tangible);
|
2008-12-22 01:12:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2009-02-06 04:03:13 +00:00
|
|
|
_combo_cb_clicked(void *data, Evas_Object *obj __UNUSED__,
|
|
|
|
void *event_info __UNUSED__)
|
2008-12-22 01:12:16 +00:00
|
|
|
{
|
2008-12-26 19:03:11 +00:00
|
|
|
Evas_Object *b;
|
2009-02-22 00:21:31 +00:00
|
|
|
Ecdb_Data_Project *proj;
|
2009-01-11 22:13:44 +00:00
|
|
|
Ecdb_Project *base_proj;
|
2008-12-23 02:26:24 +00:00
|
|
|
int sel, i, num_speeds, speed;
|
2008-12-22 01:12:16 +00:00
|
|
|
char buf[1024];
|
|
|
|
|
2009-02-06 04:03:13 +00:00
|
|
|
proj = data;
|
|
|
|
if (!proj)
|
2008-12-26 19:03:11 +00:00
|
|
|
return;
|
|
|
|
|
2009-01-11 22:13:44 +00:00
|
|
|
base_proj = ECDB_PROJECT(proj);
|
2009-02-05 04:11:22 +00:00
|
|
|
sel = ecdb_combo_selected_get(base_proj->drive_combo);
|
2008-12-22 01:12:16 +00:00
|
|
|
if (sel < 0)
|
|
|
|
return;
|
|
|
|
|
2009-01-11 22:13:44 +00:00
|
|
|
base_proj->drive = eina_list_nth(em->drives, sel);
|
2009-02-06 04:03:13 +00:00
|
|
|
|
|
|
|
/* Don't keep adding items to the combo if the drive hasn't changed */
|
2009-02-22 00:21:31 +00:00
|
|
|
if (base_proj->drive == ecdb_combo_data_get(ECDB_BURN(proj)->speed_combo))
|
2009-02-19 02:02:43 +00:00
|
|
|
return;
|
2009-02-06 04:03:13 +00:00
|
|
|
|
2008-12-26 19:03:11 +00:00
|
|
|
// Update the capacity here, as our capacity could change with the drive
|
2009-02-22 00:21:31 +00:00
|
|
|
ewl_callback_call_with_event_data(proj->filelist, ECDB_FILELIST_SIZE_CHANGED,
|
|
|
|
ECDB_BURN(proj)->files);
|
2009-01-11 22:13:44 +00:00
|
|
|
num_speeds = base_proj->drive->write_speeds[0];
|
2009-02-22 00:21:31 +00:00
|
|
|
ecdb_combo_data_set(ECDB_BURN(proj)->speed_combo, base_proj->drive);
|
2008-12-22 01:12:16 +00:00
|
|
|
for (i = 1; i < num_speeds; i++)
|
|
|
|
{
|
2009-01-11 22:13:44 +00:00
|
|
|
if (base_proj->drive->write_speeds[i] <= 0)
|
2008-12-22 01:12:16 +00:00
|
|
|
continue;
|
|
|
|
|
2009-02-22 00:21:31 +00:00
|
|
|
b = ecdb_combo_item_add(ECDB_BURN(proj)->speed_combo, NULL);
|
2008-12-23 02:26:24 +00:00
|
|
|
|
2009-01-11 22:13:44 +00:00
|
|
|
if ((base_proj->drive->profile_name) &&
|
|
|
|
(base_proj->drive->profile_name[0] != '\0'))
|
2008-12-23 02:26:24 +00:00
|
|
|
{
|
2009-01-11 22:13:44 +00:00
|
|
|
if (base_proj->drive->profile_name[0] == 'C')
|
|
|
|
speed = base_proj->drive->write_speeds[i] / 150;
|
|
|
|
else if (base_proj->drive->profile_name[0] == 'D')
|
|
|
|
speed = base_proj->drive->write_speeds[i] / 1352;
|
2008-12-23 02:26:24 +00:00
|
|
|
else
|
2009-01-11 22:13:44 +00:00
|
|
|
speed = base_proj->drive->write_speeds[i] / 4500;
|
2008-12-23 02:26:24 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
speed = 0;
|
|
|
|
}
|
|
|
|
|
2008-12-26 19:03:11 +00:00
|
|
|
snprintf(buf, sizeof(buf), "%dX (%dkb/s)", speed,
|
2009-01-11 22:13:44 +00:00
|
|
|
base_proj->drive->write_speeds[i]);
|
2008-12-24 18:59:22 +00:00
|
|
|
ecdb_combo_item_label_set(b, buf);
|
2009-02-22 00:21:31 +00:00
|
|
|
ecdb_combo_append(ECDB_BURN(proj)->speed_combo, b);
|
2008-12-22 01:12:16 +00:00
|
|
|
evas_object_show(b);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-01-11 02:14:02 +00:00
|
|
|
static void
|
2009-02-09 02:51:35 +00:00
|
|
|
_joliet_clicked(void *data, Evas_Object *obj, const char *emission __UNUSED__,
|
|
|
|
const char *source __UNUSED__)
|
2009-01-11 02:14:02 +00:00
|
|
|
{
|
|
|
|
int state;
|
2009-02-05 04:11:22 +00:00
|
|
|
Ecdb_Data_Project *proj;
|
2009-01-11 02:14:02 +00:00
|
|
|
|
|
|
|
proj = data;
|
2009-02-09 02:51:35 +00:00
|
|
|
proj->use_joliet = !proj->use_joliet;
|
2009-02-17 19:16:38 +00:00
|
|
|
|
2009-01-11 02:14:02 +00:00
|
|
|
state = ecdb_check_checked_get(obj);
|
2009-02-09 02:51:35 +00:00
|
|
|
if (state != proj->use_joliet)
|
|
|
|
ecdb_check_checked_set(obj, proj->use_joliet);
|
2009-01-11 02:14:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2009-02-17 19:16:38 +00:00
|
|
|
_joliet_config(void *data, Evas_Object *obj, void *event_info __UNUSED__)
|
2009-01-11 02:14:02 +00:00
|
|
|
{
|
2009-02-05 04:11:22 +00:00
|
|
|
Ecdb_Data_Project *proj;
|
2009-01-11 02:14:02 +00:00
|
|
|
|
|
|
|
proj = data;
|
|
|
|
ecdb_check_checked_set(obj, proj->use_joliet);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2009-02-09 02:51:35 +00:00
|
|
|
_rockridge_clicked(void *data, Evas_Object *obj,
|
|
|
|
const char *emission __UNUSED__,
|
|
|
|
const char *source __UNUSED__)
|
2009-01-11 02:14:02 +00:00
|
|
|
{
|
|
|
|
int state;
|
2009-02-05 04:11:22 +00:00
|
|
|
Ecdb_Data_Project *proj;
|
2009-01-11 02:14:02 +00:00
|
|
|
|
|
|
|
proj = data;
|
2009-02-09 02:51:35 +00:00
|
|
|
proj->use_rockridge = !proj->use_rockridge;
|
2009-02-17 19:16:38 +00:00
|
|
|
|
2009-01-11 02:14:02 +00:00
|
|
|
state = ecdb_check_checked_get(obj);
|
2009-02-09 02:51:35 +00:00
|
|
|
if (state != proj->use_rockridge)
|
|
|
|
ecdb_check_checked_set(obj, proj->use_rockridge);
|
2009-01-11 02:14:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2009-02-09 02:51:35 +00:00
|
|
|
_rockridge_config(void *data, Evas_Object *obj, void *event_info __UNUSED__)
|
2009-01-11 02:14:02 +00:00
|
|
|
{
|
2009-02-05 04:11:22 +00:00
|
|
|
Ecdb_Data_Project *proj;
|
2009-01-11 02:14:02 +00:00
|
|
|
|
|
|
|
proj = data;
|
|
|
|
ecdb_check_checked_set(obj, proj->use_rockridge);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2009-02-09 02:51:35 +00:00
|
|
|
_symlinks_clicked(void *data, Evas_Object *obj, const char *emission __UNUSED__,
|
|
|
|
const char *source __UNUSED__)
|
2009-01-11 02:14:02 +00:00
|
|
|
{
|
|
|
|
int state;
|
2009-02-05 04:11:22 +00:00
|
|
|
Ecdb_Data_Project *proj;
|
2009-01-11 02:14:02 +00:00
|
|
|
|
|
|
|
proj = data;
|
2009-02-09 02:51:35 +00:00
|
|
|
proj->follow_symlinks = !proj->follow_symlinks;
|
2009-02-17 19:16:38 +00:00
|
|
|
|
2009-01-11 02:14:02 +00:00
|
|
|
state = ecdb_check_checked_get(obj);
|
2009-02-09 02:51:35 +00:00
|
|
|
if (state != proj->follow_symlinks)
|
|
|
|
ecdb_check_checked_set(obj, proj->follow_symlinks);
|
2009-01-11 02:14:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2009-02-09 02:51:35 +00:00
|
|
|
_symlinks_config(void *data, Evas_Object *obj, void *event_info __UNUSED__)
|
2009-01-11 02:14:02 +00:00
|
|
|
{
|
2009-02-05 04:11:22 +00:00
|
|
|
Ecdb_Data_Project *proj;
|
2009-01-11 02:14:02 +00:00
|
|
|
|
|
|
|
proj = data;
|
|
|
|
ecdb_check_checked_set(obj, proj->follow_symlinks);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2009-02-09 02:51:35 +00:00
|
|
|
_hidden_clicked(void *data, Evas_Object *obj, const char *emission __UNUSED__,
|
|
|
|
const char *source __UNUSED__)
|
2009-01-11 02:14:02 +00:00
|
|
|
{
|
|
|
|
int state;
|
2009-02-05 04:11:22 +00:00
|
|
|
Ecdb_Data_Project *proj;
|
2009-01-11 02:14:02 +00:00
|
|
|
|
|
|
|
proj = data;
|
2009-02-09 02:51:35 +00:00
|
|
|
proj->ignore_hidden = !proj->ignore_hidden;
|
2009-02-17 19:16:38 +00:00
|
|
|
|
2009-01-11 02:14:02 +00:00
|
|
|
state = ecdb_check_checked_get(obj);
|
2009-02-09 02:51:35 +00:00
|
|
|
if (state != proj->ignore_hidden)
|
|
|
|
ecdb_check_checked_set(obj, proj->ignore_hidden);
|
2009-01-11 02:14:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2009-02-09 02:51:35 +00:00
|
|
|
_hidden_config(void *data, Evas_Object *obj, void *event_info __UNUSED__)
|
2009-01-11 02:14:02 +00:00
|
|
|
{
|
2009-02-05 04:11:22 +00:00
|
|
|
Ecdb_Data_Project *proj;
|
2009-01-11 02:14:02 +00:00
|
|
|
|
|
|
|
proj = data;
|
|
|
|
ecdb_check_checked_set(obj, proj->ignore_hidden);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2009-02-09 02:51:35 +00:00
|
|
|
_multi_clicked(void *data, Evas_Object *obj, const char *emission __UNUSED__,
|
|
|
|
const char *source __UNUSED__)
|
2009-01-11 02:14:02 +00:00
|
|
|
{
|
|
|
|
int state;
|
|
|
|
Ecdb_Burn_Project *proj;
|
|
|
|
|
|
|
|
proj = data;
|
2009-02-09 02:51:35 +00:00
|
|
|
proj->multi = !proj->multi;
|
2009-02-17 19:16:38 +00:00
|
|
|
|
2009-01-11 02:14:02 +00:00
|
|
|
state = ecdb_check_checked_get(obj);
|
2009-02-09 02:51:35 +00:00
|
|
|
if (state != proj->multi)
|
|
|
|
ecdb_check_checked_set(obj, proj->multi);
|
2009-01-11 02:14:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2009-02-09 02:51:35 +00:00
|
|
|
_multi_config(void *data, Evas_Object *obj, void *event_info __UNUSED__)
|
2009-01-11 02:14:02 +00:00
|
|
|
{
|
|
|
|
Ecdb_Burn_Project *proj;
|
|
|
|
|
|
|
|
proj = data;
|
|
|
|
ecdb_check_checked_set(obj, proj->multi);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2009-02-09 02:51:35 +00:00
|
|
|
_sim_clicked(void *data, Evas_Object *obj, const char *emission __UNUSED__,
|
|
|
|
const char *source __UNUSED__)
|
2009-01-11 02:14:02 +00:00
|
|
|
{
|
|
|
|
int state;
|
|
|
|
Ecdb_Burn_Project *proj;
|
|
|
|
|
|
|
|
proj = data;
|
2009-02-09 02:51:35 +00:00
|
|
|
proj->simulate = !proj->simulate;
|
2009-02-17 19:16:38 +00:00
|
|
|
|
2009-01-11 02:14:02 +00:00
|
|
|
state = ecdb_check_checked_get(obj);
|
2009-02-09 02:51:35 +00:00
|
|
|
if (state != proj->simulate)
|
|
|
|
ecdb_check_checked_set(obj, proj->simulate);
|
2009-01-11 02:14:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2009-02-09 02:51:35 +00:00
|
|
|
_sim_config(void *data, Evas_Object *obj, void *event_info __UNUSED__)
|
2009-01-11 02:14:02 +00:00
|
|
|
{
|
|
|
|
Ecdb_Burn_Project *proj;
|
|
|
|
|
|
|
|
proj = data;
|
|
|
|
ecdb_check_checked_set(obj, proj->simulate);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2009-02-09 02:51:35 +00:00
|
|
|
_underrun_clicked(void *data, Evas_Object *obj, const char *emission __UNUSED__,
|
|
|
|
const char *source __UNUSED__)
|
2009-01-11 02:14:02 +00:00
|
|
|
{
|
|
|
|
int state;
|
|
|
|
Ecdb_Burn_Project *proj;
|
|
|
|
|
|
|
|
proj = data;
|
2009-02-09 02:51:35 +00:00
|
|
|
proj->underrun_proof = !proj->underrun_proof;
|
2009-02-17 19:16:38 +00:00
|
|
|
|
2009-01-11 02:14:02 +00:00
|
|
|
state = ecdb_check_checked_get(obj);
|
2009-02-09 02:51:35 +00:00
|
|
|
if (state != proj->underrun_proof)
|
|
|
|
ecdb_check_checked_set(obj, proj->underrun_proof);
|
2009-01-11 02:14:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2009-02-09 02:51:35 +00:00
|
|
|
_underrun_config(void *data, Evas_Object *obj, void *event_info __UNUSED__)
|
2009-01-11 02:14:02 +00:00
|
|
|
{
|
|
|
|
Ecdb_Burn_Project *proj;
|
|
|
|
|
|
|
|
proj = data;
|
|
|
|
ecdb_check_checked_set(obj, proj->underrun_proof);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2009-02-09 02:51:35 +00:00
|
|
|
_apply_clicked(void *data, Evas_Object *obj, const char *emission __UNUSED__,
|
|
|
|
const char *source __UNUSED__)
|
2009-01-11 02:14:02 +00:00
|
|
|
{
|
|
|
|
ecdb_config_inwin_hide(data);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2009-02-09 02:51:35 +00:00
|
|
|
_proj_name(void *data, Evas *e, Evas_Object *obj, void *event_info __UNUSED__)
|
2009-01-11 02:14:02 +00:00
|
|
|
{
|
2009-02-06 04:03:13 +00:00
|
|
|
char *name;
|
2009-02-05 04:11:22 +00:00
|
|
|
Ecdb_Data_Project *proj;
|
2009-01-11 02:14:02 +00:00
|
|
|
|
|
|
|
proj = data;
|
|
|
|
name = ecdb_entry_text_get(obj);
|
2009-01-11 02:43:33 +00:00
|
|
|
if (proj->volume_id)
|
|
|
|
free(proj->volume_id);
|
|
|
|
|
2009-02-06 04:03:13 +00:00
|
|
|
proj->volume_id = name;
|
2009-01-11 02:14:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2009-02-09 02:51:35 +00:00
|
|
|
_proj_config(void *data, Evas_Object *obj, void *event_info __UNUSED__)
|
2009-01-11 02:14:02 +00:00
|
|
|
{
|
2009-02-05 04:11:22 +00:00
|
|
|
Ecdb_Data_Project *proj;
|
2009-01-11 02:14:02 +00:00
|
|
|
|
|
|
|
proj = data;
|
|
|
|
|
|
|
|
if (proj->volume_id)
|
|
|
|
ecdb_entry_text_set(obj, proj->volume_id);
|
|
|
|
else
|
|
|
|
ecdb_entry_text_set(obj, "Project Name");
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2009-01-30 03:59:48 +00:00
|
|
|
_settings_clicked(void *data, Evas_Object *obj __UNUSED__,
|
|
|
|
const char *emission __UNUSED__,
|
|
|
|
const char *source __UNUSED__)
|
2009-01-11 02:14:02 +00:00
|
|
|
{
|
|
|
|
Eina_Iterator *it;
|
|
|
|
const Evas_Object *table;
|
|
|
|
Evas_Object *o;
|
|
|
|
|
|
|
|
table = edje_object_part_object_get(data, "ecdb.table");
|
|
|
|
it = evas_object_table_iterator_new(table);
|
2009-02-17 19:16:38 +00:00
|
|
|
|
2009-01-11 02:14:02 +00:00
|
|
|
if (!it)
|
|
|
|
{
|
2009-02-23 01:22:02 +00:00
|
|
|
EINA_ERROR_PWARN("_settings_clicked: NULL iterator!\n");
|
2009-01-11 02:14:02 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
while (eina_iterator_next(it, (void **)&o))
|
|
|
|
evas_object_smart_callback_call(o, "proj_config", NULL);
|
|
|
|
eina_iterator_free(it);
|
|
|
|
|
|
|
|
ecdb_config_inwin_show(data);
|
|
|
|
}
|
|
|
|
|
2008-12-22 01:12:16 +00:00
|
|
|
void
|
2009-02-05 04:11:22 +00:00
|
|
|
ecdb_burn_data_page_show(Ecdb_Page *page)
|
2008-12-22 01:12:16 +00:00
|
|
|
{
|
2009-02-05 04:11:22 +00:00
|
|
|
if (!page->data)
|
2008-12-22 01:12:16 +00:00
|
|
|
{
|
2009-01-11 22:13:44 +00:00
|
|
|
Evas_Object *b, *t;
|
2008-12-22 01:12:16 +00:00
|
|
|
Eina_List *l;
|
|
|
|
Ecdb_Drive_Info *drive;
|
|
|
|
Evas_Coord x, y, w, h;
|
2009-02-05 04:11:22 +00:00
|
|
|
Ewl_Widget *embed;
|
|
|
|
Ecdb_Data_Project *proj;
|
|
|
|
Ecdb_Burn_Project *bup;
|
|
|
|
Ecdb_Project *bp;
|
|
|
|
|
|
|
|
page->data = edje_object_add(ecore_evas_get(em->main_win_ee));
|
|
|
|
edje_object_file_set(page->data, em->theme_path, "ecdb/burn_data_page");
|
|
|
|
edje_object_part_geometry_get(page->gui, "active_area", &x, &y, &w, &h);
|
|
|
|
evas_object_move(page->data, x, y);
|
|
|
|
evas_object_resize(page->data, w, h);
|
|
|
|
edje_object_part_swallow(page->gui, "action_area", page->data);
|
|
|
|
edje_object_signal_callback_add(page->data, "hide,finished",
|
2008-12-22 01:12:16 +00:00
|
|
|
"burn_data_page",
|
2009-02-27 01:05:10 +00:00
|
|
|
_page_hide_finished, page);
|
2009-02-05 04:11:22 +00:00
|
|
|
evas_object_show(page->data);
|
2009-02-17 19:16:38 +00:00
|
|
|
|
2009-02-05 04:11:22 +00:00
|
|
|
proj = ecdb_data_project_new();
|
|
|
|
bp = ECDB_PROJECT(proj);
|
|
|
|
bup = ECDB_BURN(proj);
|
|
|
|
evas_object_data_set(page->data, "proj", proj);
|
|
|
|
|
|
|
|
bp->ret = ecdb_button_add(page->data, "ecdb/burn_data/return");
|
|
|
|
ecdb_button_label_set(bp->ret, "Return to Main Page");
|
|
|
|
edje_object_signal_callback_add(page->data, "mouse,clicked,1",
|
|
|
|
"ecdb/burn_data/return", _button_cb_return, page);
|
|
|
|
evas_object_show(bp->ret);
|
|
|
|
ecdb_button_icon_set(bp->ret, "ecdb/burn_data/return");
|
|
|
|
|
|
|
|
bp->begin = ecdb_button_add(page->data, "ecdb/burn_data/begin");
|
|
|
|
ecdb_button_label_set(bp->begin, "Start Burn");
|
|
|
|
edje_object_signal_callback_add(page->data, "mouse,clicked,1",
|
|
|
|
"ecdb/burn_data/begin", _button_cb_begin, page);
|
|
|
|
evas_object_show(bp->begin);
|
|
|
|
ecdb_button_icon_set(bp->begin, "ecdb/burn_data/begin");
|
|
|
|
|
|
|
|
bp->drive_combo = ecdb_combo_add(page->data, "ecdb/burn_data/drive");
|
|
|
|
ecdb_combo_header_set(bp->drive_combo, "Drive");
|
|
|
|
ecdb_combo_header_create_set(bp->drive_combo,
|
2009-01-11 22:13:44 +00:00
|
|
|
ecdb_gui_combo_header_from_drive);
|
2009-02-05 04:11:22 +00:00
|
|
|
evas_object_show(bp->drive_combo);
|
2008-12-22 01:12:16 +00:00
|
|
|
|
2009-02-05 04:11:22 +00:00
|
|
|
bup->speed_combo = ecdb_combo_add(page->data, "ecdb/burn_data/speed");
|
|
|
|
ecdb_combo_header_create_set(bup->speed_combo,
|
2009-01-11 22:13:44 +00:00
|
|
|
ecdb_gui_combo_header_from_speeds);
|
2009-02-05 04:11:22 +00:00
|
|
|
ecdb_combo_header_set(bup->speed_combo, "Max Speed");
|
|
|
|
evas_object_show(bup->speed_combo);
|
2008-12-22 01:12:16 +00:00
|
|
|
|
|
|
|
EINA_LIST_FOREACH(em->drives, l, drive)
|
|
|
|
{
|
2009-02-05 04:11:22 +00:00
|
|
|
b = ecdb_combo_item_add(bp->drive_combo, NULL);
|
2008-12-24 18:59:22 +00:00
|
|
|
ecdb_combo_item_label_set(b, drive->product);
|
2009-01-11 22:13:44 +00:00
|
|
|
evas_object_smart_callback_add(b, "clicked", _combo_cb_clicked, proj);
|
2009-02-05 04:11:22 +00:00
|
|
|
ecdb_combo_append(bp->drive_combo, b);
|
2008-12-22 01:12:16 +00:00
|
|
|
evas_object_show(b);
|
|
|
|
}
|
|
|
|
|
|
|
|
embed = ewl_embed_new();
|
|
|
|
ewl_object_fill_policy_set(EWL_OBJECT(embed), EWL_FLAG_FILL_ALL);
|
2009-02-05 04:11:22 +00:00
|
|
|
proj->filelist_swallow = ewl_embed_canvas_set(EWL_EMBED(embed),
|
|
|
|
evas_object_evas_get(bp->drive_combo),
|
2008-12-22 01:12:16 +00:00
|
|
|
(void *)(long)ecore_evas_software_x11_window_get(em->main_win_ee));
|
|
|
|
ewl_embed_focus_set(EWL_EMBED(embed), TRUE);
|
|
|
|
ewl_widget_show(embed);
|
|
|
|
|
2009-02-05 04:11:22 +00:00
|
|
|
proj->filelist = ecdb_custom_filelist_new();
|
|
|
|
ewl_container_child_append(EWL_CONTAINER(embed), proj->filelist);
|
2009-02-22 00:21:31 +00:00
|
|
|
ewl_callback_append(proj->filelist, ECDB_FILELIST_SIZE_CHANGED,
|
|
|
|
_update_capacity, page);
|
2009-02-05 04:11:22 +00:00
|
|
|
ewl_widget_show(proj->filelist);
|
2008-12-22 01:12:16 +00:00
|
|
|
|
2009-02-06 04:03:13 +00:00
|
|
|
/* Add a delete callback so we can correctly free data that won't get
|
|
|
|
* handled automatically
|
|
|
|
*/
|
|
|
|
evas_object_event_callback_add(page->data, EVAS_CALLBACK_DEL, _page_del,
|
2009-02-27 01:05:10 +00:00
|
|
|
bup->files);
|
2009-02-05 04:11:22 +00:00
|
|
|
|
|
|
|
edje_object_part_geometry_get(page->data, "ecdb/burn_data/filelist",
|
|
|
|
&x, &y, &w, &h);
|
|
|
|
evas_object_move(proj->filelist_swallow, x, y);
|
|
|
|
evas_object_resize(proj->filelist_swallow, w, h);
|
2009-02-17 19:16:38 +00:00
|
|
|
edje_object_part_swallow(page->data, "ecdb/burn_data/filelist",
|
2009-02-05 04:11:22 +00:00
|
|
|
proj->filelist_swallow);
|
|
|
|
ecdb_widget_focus_callback_add(proj->filelist_swallow,
|
|
|
|
"ecdb/burn_data/filelist");
|
|
|
|
evas_object_show(proj->filelist_swallow);
|
|
|
|
|
|
|
|
proj->capacity = ecdb_capacity_add(page->data, "ecdb/burn_data/capacity");
|
2009-02-27 01:05:10 +00:00
|
|
|
evas_object_data_set(proj->capacity, "src", bup->files);
|
2009-01-11 22:13:44 +00:00
|
|
|
evas_object_show(proj->capacity);
|
2009-01-11 02:14:02 +00:00
|
|
|
|
2009-02-26 03:30:21 +00:00
|
|
|
t = ecdb_config_inwin_add(page->data, NULL);
|
2009-02-17 19:16:38 +00:00
|
|
|
|
2009-01-11 02:14:02 +00:00
|
|
|
b = ecdb_check_add(t, NULL);
|
|
|
|
ecdb_check_label_set(b, "Use Joliet");
|
2009-02-09 02:51:35 +00:00
|
|
|
edje_object_signal_callback_add(b, "ecdb,check,*checked", "ecdb",
|
|
|
|
_joliet_clicked, proj);
|
2009-01-11 22:13:44 +00:00
|
|
|
evas_object_smart_callback_add(b, "proj_config", _joliet_config, proj);
|
2009-01-11 02:14:02 +00:00
|
|
|
ecdb_config_inwin_child_add(t, b, 0, 0, 1, 1);
|
|
|
|
evas_object_show(b);
|
|
|
|
|
|
|
|
b = ecdb_check_add(t, NULL);
|
|
|
|
ecdb_check_label_set(b, "Use Rockridge");
|
2009-02-09 02:51:35 +00:00
|
|
|
edje_object_signal_callback_add(b, "ecdb,check,*checked", "ecdb",
|
|
|
|
_rockridge_clicked, proj);
|
2009-01-11 22:13:44 +00:00
|
|
|
evas_object_smart_callback_add(b, "proj_config", _rockridge_config, proj);
|
2009-01-11 02:14:02 +00:00
|
|
|
ecdb_config_inwin_child_add(t, b, 0, 1, 1, 1);
|
|
|
|
evas_object_show(b);
|
|
|
|
|
|
|
|
b = ecdb_check_add(t, NULL);
|
|
|
|
ecdb_check_label_set(b, "Follow Symlinks");
|
2009-02-09 02:51:35 +00:00
|
|
|
edje_object_signal_callback_add(b, "ecdb,check,*checked", "ecdb",
|
|
|
|
_symlinks_clicked, proj);
|
2009-01-11 22:13:44 +00:00
|
|
|
evas_object_smart_callback_add(b, "proj_config", _symlinks_config, proj);
|
2009-01-11 02:14:02 +00:00
|
|
|
ecdb_config_inwin_child_add(t, b, 0, 2, 1, 1);
|
|
|
|
evas_object_show(b);
|
|
|
|
|
|
|
|
b = ecdb_check_add(t, NULL);
|
|
|
|
ecdb_check_label_set(b, "Ignore Hidden Files");
|
2009-02-09 02:51:35 +00:00
|
|
|
edje_object_signal_callback_add(b, "ecdb,check,*checked", "ecdb",
|
|
|
|
_hidden_clicked, proj);
|
2009-01-11 22:13:44 +00:00
|
|
|
evas_object_smart_callback_add(b, "proj_config", _hidden_config, proj);
|
2009-01-11 02:14:02 +00:00
|
|
|
ecdb_config_inwin_child_add(t, b, 0, 3, 1, 1);
|
|
|
|
evas_object_show(b);
|
|
|
|
|
|
|
|
b = ecdb_check_add(t, NULL);
|
|
|
|
ecdb_check_label_set(b, "Multi-session");
|
2009-02-09 02:51:35 +00:00
|
|
|
edje_object_signal_callback_add(b, "ecdb,check,*checked", "ecdb",
|
|
|
|
_multi_clicked, proj);
|
|
|
|
evas_object_smart_callback_add(b, "proj_config", _multi_config, proj);
|
2009-01-11 02:14:02 +00:00
|
|
|
ecdb_config_inwin_child_add(t, b, 1, 0, 1, 1);
|
|
|
|
evas_object_show(b);
|
|
|
|
|
|
|
|
b = ecdb_check_add(t, NULL);
|
|
|
|
ecdb_check_label_set(b, "Simulate");
|
2009-02-09 02:51:35 +00:00
|
|
|
edje_object_signal_callback_add(b, "ecdb,check,*checked", "ecdb",
|
|
|
|
_sim_clicked, proj);
|
|
|
|
evas_object_smart_callback_add(b, "proj_config", _sim_config, proj);
|
2009-01-11 02:14:02 +00:00
|
|
|
ecdb_config_inwin_child_add(t, b, 1, 1, 1, 1);
|
|
|
|
evas_object_show(b);
|
|
|
|
|
|
|
|
b = ecdb_check_add(t, NULL);
|
|
|
|
ecdb_check_label_set(b, "Use Underrun Proof");
|
2009-02-09 02:51:35 +00:00
|
|
|
edje_object_signal_callback_add(b, "ecdb,check,*checked", "ecdb",
|
|
|
|
_underrun_clicked, proj);
|
|
|
|
evas_object_smart_callback_add(b, "proj_config", _underrun_config, proj);
|
2009-01-11 02:14:02 +00:00
|
|
|
ecdb_config_inwin_child_add(t, b, 1, 2, 1, 1);
|
|
|
|
evas_object_show(b);
|
|
|
|
|
|
|
|
b = ecdb_entry_add(t, NULL);
|
|
|
|
ecdb_entry_text_set(b, "Volume Name");
|
|
|
|
evas_object_event_callback_add(b, EVAS_CALLBACK_FOCUS_OUT,
|
2009-01-11 22:13:44 +00:00
|
|
|
_proj_name, proj);
|
|
|
|
evas_object_smart_callback_add(b, "proj_config", _proj_config, proj);
|
2009-01-11 02:14:02 +00:00
|
|
|
ecdb_config_inwin_child_add(t, b, 1, 3, 1, 1);
|
|
|
|
evas_object_show(b);
|
|
|
|
|
|
|
|
b = ecdb_button_add(t, NULL);
|
|
|
|
ecdb_button_label_set(b, "Apply");
|
2009-02-09 02:51:35 +00:00
|
|
|
edje_object_signal_callback_add(b, "mouse,down,1", "*", _apply_clicked,
|
|
|
|
t);
|
2009-01-11 02:14:02 +00:00
|
|
|
ecdb_config_inwin_child_add(t, b, 0, 4, 2, 1);
|
|
|
|
evas_object_show(b);
|
2009-02-17 19:16:38 +00:00
|
|
|
|
2009-01-11 02:14:02 +00:00
|
|
|
// At the end so t is a valid pointer
|
2009-02-05 04:11:22 +00:00
|
|
|
b = ecdb_button_add(page->data, "ecdb/burn_data/settings");
|
2009-01-27 04:00:34 +00:00
|
|
|
ecdb_button_label_set(b, "Settings");
|
2009-02-05 04:11:22 +00:00
|
|
|
edje_object_signal_callback_add(page->data, "mouse,clicked,1",
|
2009-01-30 03:59:48 +00:00
|
|
|
"ecdb/burn_data/settings", _settings_clicked, t);
|
2009-01-27 04:00:34 +00:00
|
|
|
evas_object_show(b);
|
2008-12-22 01:12:16 +00:00
|
|
|
}
|
2009-02-05 04:11:22 +00:00
|
|
|
else if (edje_object_part_swallow_get(page->gui, "action_area") !=
|
|
|
|
page->data)
|
2008-12-26 19:03:11 +00:00
|
|
|
{
|
2009-02-05 04:11:22 +00:00
|
|
|
edje_object_part_swallow(page->gui, "action_area", page->data);
|
|
|
|
evas_object_show(page->data);
|
2009-02-27 01:05:10 +00:00
|
|
|
ewl_widget_show(ECDB_DATA(evas_object_data_get(page->data, "proj"))
|
|
|
|
->filelist);
|
2008-12-26 19:03:11 +00:00
|
|
|
}
|
|
|
|
|
2009-02-05 04:11:22 +00:00
|
|
|
edje_object_signal_emit(page->gui, "ecdb,burn_data_page,visible", "ecdb");
|
|
|
|
edje_object_signal_emit(page->data, "ecdb,burn_data_page,visible", "ecdb");
|
2008-12-22 01:12:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2009-02-17 19:16:38 +00:00
|
|
|
ecdb_burn_data_cleanup(Ecdb_Page *page)
|
2008-12-22 01:12:16 +00:00
|
|
|
{
|
2008-12-24 19:45:56 +00:00
|
|
|
Ewl_Widget *filelist;
|
2009-02-27 01:05:10 +00:00
|
|
|
Ecdb_Source *src, *t;
|
2009-02-17 22:48:11 +00:00
|
|
|
Ecdb_Data_Project *proj;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
if (!page)
|
|
|
|
{
|
2009-02-23 01:22:02 +00:00
|
|
|
EINA_ERROR_PWARN("ecdb_burn_data_cleanup: NULL page!\n");
|
2009-02-17 22:48:11 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
proj = evas_object_data_get(page->data, "proj");
|
|
|
|
if (!proj)
|
|
|
|
{
|
2009-02-23 01:22:02 +00:00
|
|
|
EINA_ERROR_PWARN("ecdb_burn_data_cleanup: NULL proj!\n");
|
2009-02-17 22:48:11 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
Evas_Object *objs[] = {proj->capacity, proj->settings,
|
|
|
|
proj->filelist_swallow, ECDB_BURN(proj)->speed_combo,
|
|
|
|
ECDB_PROJECT(proj)->ret, ECDB_PROJECT(proj)->begin,
|
|
|
|
NULL};
|
2009-02-27 01:05:10 +00:00
|
|
|
for (i = 0; objs[i] != NULL; i++)
|
|
|
|
edje_object_signal_emit(objs[i], "ecdb,enable", "ecdb");
|
2009-02-17 22:48:11 +00:00
|
|
|
|
2009-02-17 19:16:38 +00:00
|
|
|
edje_object_signal_emit(page->data, "ecdb,burn_data,start", "ecdb");
|
|
|
|
edje_object_part_text_set(page->data, "progress_text", "Burn Complete!");
|
|
|
|
edje_object_signal_emit(page->data, "ecdb,burn_data,done", "ecdb");
|
|
|
|
|
|
|
|
filelist = proj->filelist;
|
2008-12-24 19:45:56 +00:00
|
|
|
src = ewl_widget_data_get(filelist, "source");
|
|
|
|
while (src->parent)
|
|
|
|
src = src->parent;
|
|
|
|
|
|
|
|
for (i = 0; i < src->num_children; i++)
|
|
|
|
{
|
2009-02-27 01:05:10 +00:00
|
|
|
t = src->children[i];
|
|
|
|
ecdb_source_child_remove(src, t);
|
|
|
|
ecdb_source_destroy(t);
|
2008-12-24 19:45:56 +00:00
|
|
|
}
|
2009-02-27 01:05:10 +00:00
|
|
|
|
|
|
|
/* Make sure, of course, to refresh the capacity and the filelist
|
|
|
|
* after finishing the burn
|
|
|
|
*/
|
|
|
|
ewl_mvc_dirty_set(EWL_MVC(EWL_FILELIST(proj->filelist)->controller), TRUE);
|
|
|
|
ewl_callback_call_with_event_data(proj->filelist, ECDB_FILELIST_SIZE_CHANGED,
|
|
|
|
src);
|
2008-12-22 01:12:16 +00:00
|
|
|
}
|
|
|
|
|