From 73fe1933517204fb24b891d38cdffb1ee8b8c39c Mon Sep 17 00:00:00 2001 From: Jaime Thomas Date: Mon, 23 Feb 2009 01:22:02 +0000 Subject: [PATCH] Use eina error logging, instead of plain printfs. --- experimental/ecdb/trunk/src/ecdb.c | 51 +++++--- experimental/ecdb/trunk/src/ecdb_about.c | 2 +- experimental/ecdb/trunk/src/ecdb_audio.c | 8 +- experimental/ecdb/trunk/src/ecdb_burn.c | 42 ++++--- .../ecdb/trunk/src/ecdb_burn_data_gui.c | 16 +-- .../ecdb/trunk/src/ecdb_burn_image_gui.c | 8 +- .../ecdb/trunk/src/ecdb_config_dialog.c | 6 +- experimental/ecdb/trunk/src/ecdb_drives.c | 14 +-- experimental/ecdb/trunk/src/ecdb_erase.c | 24 ++-- experimental/ecdb/trunk/src/ecdb_erase_gui.c | 10 +- .../ecdb/trunk/src/ecdb_filelist_custom.c | 2 +- experimental/ecdb/trunk/src/ecdb_gui.c | 4 +- experimental/ecdb/trunk/src/ecdb_image.c | 12 +- experimental/ecdb/trunk/src/ecdb_misc.c | 2 +- experimental/ecdb/trunk/src/ecdb_projects.c | 12 +- experimental/ecdb/trunk/src/ecdb_widgets.c | 118 +++++++++--------- 16 files changed, 173 insertions(+), 158 deletions(-) diff --git a/experimental/ecdb/trunk/src/ecdb.c b/experimental/ecdb/trunk/src/ecdb.c index ad58beb8..d59f2662 100644 --- a/experimental/ecdb/trunk/src/ecdb.c +++ b/experimental/ecdb/trunk/src/ecdb.c @@ -18,76 +18,84 @@ main(int argc, char **argv) if (!eina_init()) { - printf("Cannot initialize Eina!\n"); + fprintf(stderr, "Cannot initialize Eina!\n"); return 1; } + if (!eina_error_init()) + { + fprintf(stderr, "Cannot initialize Eina!\n"); + ret = 1; + goto SHUTDOWN; + } + /* Do I really need all of these? */ if (!ecore_init()) { - printf("Cannot initialize Ecore!\n"); - return 1; + fprintf(stderr, "Cannot initialize Ecore!\n"); + ret = 1; + goto SHUTDOWN; } if (!ecore_file_init()) { - printf("Cannot initialize Ecore_File!\n"); + fprintf(stderr, "Cannot initialize Ecore_File!\n"); ret = 1; goto SHUTDOWN; } if (ecore_config_init("ecdb") != ECORE_CONFIG_ERR_SUCC) { - printf("Cannot intialize Ecore_Config!\n"); + fprintf(stderr, "Cannot intialize Ecore_Config!\n"); ret = 1; goto SHUTDOWN; } if (!ecore_evas_init()) { - printf("Cannot initialize Ecore_Evas!\n"); + fprintf(stderr, "Cannot initialize Ecore_Evas!\n"); ret = 1; goto SHUTDOWN; } if (!edje_init()) { - printf("Cannot initialize Edje!\n"); + fprintf(stderr, "Cannot initialize Edje!\n"); ret = 1; goto SHUTDOWN; } if (!efreet_init()) { - printf("Cannot initialize Efreet!\n"); + fprintf(stderr, "Cannot initialize Efreet!\n"); ret = 1; goto SHUTDOWN; } if (!ewl_init(&argc, argv)) { - printf("Connot initialize Ewl!\n"); + fprintf(stderr, "Connot initialize Ewl!\n"); ret = 1; goto SHUTDOWN; } if (!ecdb_image_init()) { - printf("Cannot initialize libisofs!\n"); + fprintf(stderr, "Cannot initialize libisofs!\n"); ret = 1; goto SHUTDOWN; } if (!ecdb_burn_init()) { - printf("Cannot initialize libburn!\n"); + fprintf(stderr, "Cannot initialize libburn!\n"); ret = 1; goto SHUTDOWN; } if (!ecdb_setup()) { - printf("Setup failed\n"); + fprintf(stderr, "Setup failed\n"); ret = 1; goto SHUTDOWN; } @@ -96,7 +104,7 @@ main(int argc, char **argv) if (!ecdb_create_main_gui()) { - printf("Cannot create main window\n"); + fprintf(stderr, "Cannot create main window\n"); ret = 1; goto SHUTDOWN; } @@ -159,6 +167,7 @@ SHUTDOWN: ecore_shutdown(); efreet_shutdown(); ewl_shutdown(); + eina_error_shutdown(); eina_shutdown(); printf("Program Done\n"); @@ -187,15 +196,18 @@ ecdb_setup(void) ecore_event_handler_add(ECORE_X_EVENT_SELECTION_NOTIFY, ecdb_dnd_selection, em); + eina_error_log_level_set(EINA_ERROR_LEVEL_DBG); + eina_error_print_cb_set(eina_error_print_cb_file, stderr); + if (!ecdb_aquire_drive_info()) { - printf("Aquiring drives failed!\n"); + EINA_ERROR_PERR("Aquiring drives failed!\n"); return FALSE; } if (!ecdb_initialize_config()) { - printf("Initializing the configuration failed!\n"); + EINA_ERROR_PERR("Initializing the configuration failed!\n"); return FALSE; } @@ -243,19 +255,20 @@ ecdb_initialize_config(void) // Set up the theme path ecore_config_theme_search_path_append(PACKAGE_DATA_DIR"/themes"); - printf("Theme search path: %s\n", ecore_config_theme_search_path_get()); gui = ecore_config_theme_with_path_get("theme"); if ((!gui) || (!ecore_file_exists(gui)) || (!edje_file_group_exists(gui, "ecdb/window"))) { - printf("Invalid file specified, attempting to fall back to default!\n"); + EINA_ERROR_PWARN("Invalid file specified, attempting to fall back " + " to default!\n"); gui = ecore_config_theme_with_path_from_name_get("default"); ecore_config_theme_set("theme", "default"); if (!gui) { - printf("Default theme is missing! Please check your installation.\n"); + EINA_ERROR_PERR("Default theme is missing! Please check" + " your installation.\n"); return 0; } } @@ -267,7 +280,7 @@ ecdb_initialize_config(void) l = ecore_evas_engines_get(); if (!eina_list_count(l)) { - printf("There are no built engines!\n"); + EINA_ERROR_PERR("There are no built engines!\n"); return 0; } diff --git a/experimental/ecdb/trunk/src/ecdb_about.c b/experimental/ecdb/trunk/src/ecdb_about.c index 7f14f720..465871dd 100644 --- a/experimental/ecdb/trunk/src/ecdb_about.c +++ b/experimental/ecdb/trunk/src/ecdb_about.c @@ -37,7 +37,7 @@ ecdb_about_show(void) if (!win) { - printf("Cannot create the about window!\n"); + EINA_ERROR_PWARN("Cannot create the about window!\n"); return; } diff --git a/experimental/ecdb/trunk/src/ecdb_audio.c b/experimental/ecdb/trunk/src/ecdb_audio.c index ced4f2d2..fc08c924 100644 --- a/experimental/ecdb/trunk/src/ecdb_audio.c +++ b/experimental/ecdb/trunk/src/ecdb_audio.c @@ -35,21 +35,21 @@ transcode_data_cb(void *data, int type, void *event) rec = ev->data; proj->num_transcode_complete++; - printf("Message: %s\n", rec); + EINA_ERROR_PDBG("Message: %s\n", rec); if (!strcmp(rec, "EOS")) { - printf("Transcode complete\n"); + EINA_ERROR_PDBG("Transcode complete\n"); proj->num_transcode_complete++; } else { - printf("Error!\n"); // How to handle these? + EINA_ERROR_PWARN("Error!\n"); // How to handle these? } if (proj->num_tracks == proj->num_transcode_complete) { - printf("Hurrah, transcoding is done!\n"); + EINA_ERROR_PINFO("Hurrah, transcoding is done!\n"); /* Change to another event later */ ecore_event_add(ECORE_EVENT_SIGNAL_EXIT, NULL, NULL, NULL); diff --git a/experimental/ecdb/trunk/src/ecdb_burn.c b/experimental/ecdb/trunk/src/ecdb_burn.c index aa4b498b..04fbb1f2 100644 --- a/experimental/ecdb/trunk/src/ecdb_burn.c +++ b/experimental/ecdb/trunk/src/ecdb_burn.c @@ -34,7 +34,7 @@ ecdb_burn_project(Ecdb_Burn_Project *proj, Ecdb_Page *page) data = calloc(1, sizeof(Burn_Data)); if (!data) { - printf("Error: Cannot create burn data structure!\n"); + EINA_ERROR_PWARN("Error: Cannot create burn data structure!\n"); return FALSE; } data->proj = ECDB_PROJECT(proj); @@ -53,7 +53,7 @@ ecdb_burn_project(Ecdb_Burn_Project *proj, Ecdb_Page *page) source = ecdb_image_project(proj); if (!source) { - printf("Failed to add any files to burn disc!\n"); + EINA_ERROR_PWARN("Failed to add any files to burn disc!\n"); burn_session_free(data->session); burn_disc_free(data->disc); ecdb_sources_list_free(data->sources); @@ -64,7 +64,7 @@ ecdb_burn_project(Ecdb_Burn_Project *proj, Ecdb_Page *page) if (burn_track_set_source(track, source) != BURN_SOURCE_OK) { - printf("Error: Cannot attach source object to track object!\n"); + EINA_ERROR_PWARN("Error: Cannot attach source object to track object!\n"); burn_session_free(data->session); burn_disc_free(data->disc); ecdb_sources_list_free(data->sources); @@ -82,18 +82,19 @@ ecdb_burn_project(Ecdb_Burn_Project *proj, Ecdb_Page *page) burn_write_opts_set_multi(opts, proj->multi); if (proj->simulate) { - printf("Simulating Burn!\n"); + EINA_ERROR_PINFO("Simulating Burn!\n"); } burn_write_opts_set_simulate(opts, proj->simulate); burn_drive_set_speed(ECDB_PROJECT(proj)->drive->tangible->drive, 0, proj->speed); burn_write_opts_set_underrun_proof(opts, proj->underrun_proof); - printf("Searching for burn mode\n"); + EINA_ERROR_PDBG("Searching for burn mode\n"); if (burn_write_opts_auto_write_type(opts, data->disc, reasons, 0) == BURN_WRITE_NONE) { - printf("Error: Failed to find a suitable write mode for disc!\n"); + EINA_ERROR_PWARN("Error: Failed to find a suitable write mode" + " for disc!\n"); burn_session_free(data->session); burn_disc_free(data->disc); burn_write_opts_free(opts); @@ -106,7 +107,7 @@ ecdb_burn_project(Ecdb_Burn_Project *proj, Ecdb_Page *page) burn_disc_write(opts, data->disc); burn_write_opts_free(opts); - printf("Disc now burning\n"); + EINA_ERROR_PINFO("Disc now burning\n"); ECDB_PROJECT(proj)->pipe = ecore_pipe_add(ecdb_burn_progress_handler, data); pthread_create(&progress_update, NULL, ecdb_drive_progress_update, proj); pthread_detach(progress_update); @@ -128,13 +129,13 @@ ecdb_drive_progress_update(void *data) if (!proj->drive->tangible) { - printf("No tangible drive!\n"); + EINA_ERROR_PWARN("No tangible drive!\n"); ecore_pipe_del(proj->pipe); pthread_exit(NULL); } drive = proj->drive->tangible[0].drive; - printf("Progress update active\n"); + EINA_ERROR_PDBG("Progress update active\n"); while (burn_drive_get_status(drive, NULL) == BURN_DRIVE_SPAWNING) { usleep(100000); @@ -149,7 +150,7 @@ ecdb_drive_progress_update(void *data) usleep(100000); } - printf("Closing pipe\n"); + EINA_ERROR_PDBG("Closing pipe\n"); ecore_pipe_write(proj->pipe, proj->pipe, sizeof(Ecore_Pipe)); pthread_exit(NULL); } @@ -168,7 +169,7 @@ ecdb_burn_progress_handler(void *data, void *buffer, unsigned int nbyte) if (nbyte != sizeof(BurnProgress)) { ecore_event_add(ECDB_DRIVE_ACTION_FINISHED, NULL, NULL, NULL); - printf("Adding event to queue.\n"); + EINA_ERROR_PDBG("Adding event to queue.\n"); last_sector = 0; return; } @@ -194,13 +195,13 @@ ecdb_burn_progress_handler(void *data, void *buffer, unsigned int nbyte) bdata = data; if (!bdata) { - printf("ecdb_burn_progress_handler: NULL bdata!\n"); + EINA_ERROR_PWARN("ecdb_burn_progress_handler: NULL bdata!\n"); return; } if ((!bdata->page) || (!bdata->proj)) { - printf("ecdb_burn_progress_handler: NULL page or proj!\n"); + EINA_ERROR_PWARN("ecdb_burn_progress_handler: NULL page or proj!\n"); return; } @@ -219,7 +220,8 @@ ecdb_burn_progress_handler(void *data, void *buffer, unsigned int nbyte) break; default: - printf("ecdb_burn_progress_handler: Unrecognized project type!\n"); + EINA_ERROR_PWARN("ecdb_burn_progress_handler: Unrecognized " + "project type!\n"); return; } @@ -249,18 +251,18 @@ ecdb_burn_finished(void *data, int type, void *event) proj = data; - printf("Freeing source and tracks\n"); + EINA_ERROR_PDBG("Freeing source and tracks\n"); ecdb_sources_list_free(proj->sources); ecdb_tracks_list_free(proj->tracks); - printf("Freeing session and disc\n"); + EINA_ERROR_PDBG("Freeing session and disc\n"); burn_session_free(proj->session); burn_disc_free(proj->disc); - printf("Releasing drive\n"); + EINA_ERROR_PDBG("Releasing drive\n"); burn_drive_release(proj->proj->drive->tangible[0].drive, 1); burn_drive_info_free(proj->proj->drive->tangible); - printf("Burn Complete\n"); + EINA_ERROR_PINFO("Burn Complete\n"); ecore_event_handler_del(proj->proj->ev_handler); proj->proj->ev_handler = NULL; @@ -270,7 +272,7 @@ ecdb_burn_finished(void *data, int type, void *event) switch (proj->proj->type) { case ECDB_AUDIO_PROJECT: - printf("How in the world did you get here?\n"); + EINA_ERROR_PWARN("How in the world did you get here?\n"); //ecdb_burn_audio_cleanup(proj->page); break; @@ -283,7 +285,7 @@ ecdb_burn_finished(void *data, int type, void *event) break; default: - printf("ecdb_burn_finished: unknown project type!\n"); + EINA_ERROR_PWARN("ecdb_burn_finished: unknown project type!\n"); } FREE(proj); diff --git a/experimental/ecdb/trunk/src/ecdb_burn_data_gui.c b/experimental/ecdb/trunk/src/ecdb_burn_data_gui.c index 57665ec2..b0f4687e 100644 --- a/experimental/ecdb/trunk/src/ecdb_burn_data_gui.c +++ b/experimental/ecdb/trunk/src/ecdb_burn_data_gui.c @@ -97,7 +97,7 @@ _update_capacity(Ewl_Widget *w, void *ev_info, void *data) if ((base_proj->drive) && (base_proj->drive->capacity > 0)) { - printf("drive capacity: %lld, src->size: %lld\n", + EINA_ERROR_PDBG("drive capacity: %lld, src->size: %lld\n", base_proj->drive->capacity, src->size); val = (float)src->size / (float)base_proj->drive->capacity; } @@ -108,12 +108,12 @@ _update_capacity(Ewl_Widget *w, void *ev_info, void *data) } if (val > 1.0) { - printf("OVER SIZE LIMIT!\n"); + EINA_ERROR_PDBG("OVER SIZE LIMIT!\n"); edje_object_signal_emit(proj->capacity, "ecdb,capacity,exceeded", "ecdb"); edje_object_signal_emit(page->data, "ecdb,capacity, exceeded", "ecdb"); } ecdb_capacity_float_set(proj->capacity, val); - printf("%lld\n", src->size); + EINA_ERROR_PDBG("%lld\n", src->size); } static void @@ -148,7 +148,7 @@ _button_cb_begin(void *data, Evas_Object *obj __UNUSED__, drive = ecdb_combo_selected_get(ECDB_PROJECT(proj)->drive_combo); if (drive < 0) { - printf("Choose a drive!\n"); + EINA_ERROR_PINFO("Choose a drive!\n"); edje_object_part_text_set(page->data, "progress_text", "Choose a Drive!"); return; } @@ -167,7 +167,7 @@ _button_cb_begin(void *data, Evas_Object *obj __UNUSED__, edje_object_part_text_set(page->data, "progress_text", buf); if (!ecdb_aquire_drive(ECDB_PROJECT(proj), drive)) { - printf("Couldn't grab drive!\n"); + EINA_ERROR_PWARN("Couldn't grab drive!\n"); edje_object_part_text_set(page->data, "progress_text", "Couldn't grab the drive!"); return; @@ -485,7 +485,7 @@ _settings_clicked(void *data, Evas_Object *obj __UNUSED__, if (!it) { - printf("_settings_clicked: NULL iterator!\n"); + EINA_ERROR_PWARN("_settings_clicked: NULL iterator!\n"); return; } @@ -700,14 +700,14 @@ ecdb_burn_data_cleanup(Ecdb_Page *page) if (!page) { - printf("ecdb_burn_data_cleanup: NULL page!\n"); + EINA_ERROR_PWARN("ecdb_burn_data_cleanup: NULL page!\n"); return; } proj = evas_object_data_get(page->data, "proj"); if (!proj) { - printf("ecdb_burn_data_cleanup: NULL proj!\n"); + EINA_ERROR_PWARN("ecdb_burn_data_cleanup: NULL proj!\n"); return; } diff --git a/experimental/ecdb/trunk/src/ecdb_burn_image_gui.c b/experimental/ecdb/trunk/src/ecdb_burn_image_gui.c index 9f24ed8e..e2a0a2cf 100644 --- a/experimental/ecdb/trunk/src/ecdb_burn_image_gui.c +++ b/experimental/ecdb/trunk/src/ecdb_burn_image_gui.c @@ -85,7 +85,7 @@ _button_cb_begin(void *data, Evas_Object *obj __UNUSED__, drive = ecdb_combo_selected_get(ECDB_PROJECT(proj)->drive_combo); if (drive < 0) { - printf("Choose a drive!\n"); + EINA_ERROR_PDBG("Choose a drive!\n"); edje_object_part_text_set(page->image, "progress_text", "Choose a Drive!"); return; @@ -102,7 +102,7 @@ _button_cb_begin(void *data, Evas_Object *obj __UNUSED__, edje_object_part_text_set(page->image, "progress_text", buf); if (!ecdb_aquire_drive(ECDB_PROJECT(proj), drive)) { - printf("Couldn't grab drive!\n"); + EINA_ERROR_PWARN("Couldn't grab drive!\n"); edje_object_part_text_set(page->image, "progress_text", "Couldn't grab the drive!"); return; @@ -286,14 +286,14 @@ ecdb_burn_image_cleanup(Ecdb_Page *page) if (!page) { - printf("ecdb_burn_image_cleanup: NULL page!\n"); + EINA_ERROR_PWARN("ecdb_burn_image_cleanup: NULL page!\n"); return; } proj = evas_object_data_get(page->image, "proj"); if (!proj) { - printf("ecdb_burn_image_cleanup: NULL proj!\n"); + EINA_ERROR_PWARN("ecdb_burn_image_cleanup: NULL proj!\n"); return; } diff --git a/experimental/ecdb/trunk/src/ecdb_config_dialog.c b/experimental/ecdb/trunk/src/ecdb_config_dialog.c index a598a828..37248680 100644 --- a/experimental/ecdb/trunk/src/ecdb_config_dialog.c +++ b/experimental/ecdb/trunk/src/ecdb_config_dialog.c @@ -226,7 +226,7 @@ conf_clicked_cb(Ewl_Widget *w, void *event __UNUSED__, void *data) if ((response == EWL_STOCK_OK) || (response == EWL_STOCK_APPLY)) { if (ecore_config_save() != ECORE_CONFIG_ERR_SUCC) - printf("Failure to save configuration!\n"); + EINA_ERROR_PWARN("Failure to save configuration!\n"); } if ((response == EWL_STOCK_OK) || (response == EWL_STOCK_CANCEL)) @@ -314,7 +314,7 @@ theme_data_init(void) if (!dirs_array) { - printf("No possible theme paths!\n"); + EINA_ERROR_PWARN("No possible theme paths!\n"); return NULL; } @@ -339,7 +339,7 @@ theme_data_init(void) if (!ret) { - printf("No themes available!\n"); + EINA_ERROR_PWARN("No themes available!\n"); return NULL; } diff --git a/experimental/ecdb/trunk/src/ecdb_drives.c b/experimental/ecdb/trunk/src/ecdb_drives.c index cafb189d..b3123a22 100644 --- a/experimental/ecdb/trunk/src/ecdb_drives.c +++ b/experimental/ecdb/trunk/src/ecdb_drives.c @@ -116,21 +116,21 @@ ecdb_print_drive_info(void) em->drives = eina_list_nth_list(em->drives, 0); EINA_LIST_FOREACH(em->drives, l, drive) { - printf("Vendor: %s, Product: %s, Revision: %s, " + EINA_ERROR_PINFO("Vendor: %s, Product: %s, Revision: %s, " "Location: %s\n", drive->vendor, drive->product, drive->revision, drive->location); - printf("Profile name: %s, Loaded: %d\n", + EINA_ERROR_PINFO("Profile name: %s, Loaded: %d\n", drive->profile_name, drive->profile_loaded); - printf("Read DVDRAM: %d, Read DVDR: %d, Read DVDROM: %d, " + EINA_ERROR_PINFO("Read DVDRAM: %d, Read DVDR: %d, Read DVDROM: %d, " "Read CDR: %d, Read CDRW: %d\n", drive->read_dvdram, drive->read_dvdr, drive->read_dvdrom, drive->read_cdr, drive->read_cdrw); - printf("Write DVDRAM: %d, Write DVDR: %d, Write CDR: %d, " + EINA_ERROR_PINFO("Write DVDRAM: %d, Write DVDR: %d, Write CDR: %d, " "Write Simulate: %d\n", drive->write_dvdram, drive->write_dvdr, @@ -143,11 +143,11 @@ ecdb_print_drive_info(void) { if ((h = drive->write_speeds[i])) { - printf("Write: %d\n", h); + EINA_ERROR_PINFO("Write: %d\n", h); } if ((h = drive->read_speeds[i])) { - printf("Read: %d\n", h); + EINA_ERROR_PINFO("Read: %d\n", h); } } } @@ -162,7 +162,7 @@ ecdb_aquire_drive(Ecdb_Project *proj, unsigned int idx) info = eina_list_nth(em->drives, idx); if (burn_drive_convert_fs_adr(info->location, adr) <= 0) { - printf("Error: Address doesn't provide cd burner!\n"); + EINA_ERROR_PWARN("Error: Address doesn't provide cd burner!\n"); return FALSE; } diff --git a/experimental/ecdb/trunk/src/ecdb_erase.c b/experimental/ecdb/trunk/src/ecdb_erase.c index f981e73d..ec31b023 100644 --- a/experimental/ecdb/trunk/src/ecdb_erase.c +++ b/experimental/ecdb/trunk/src/ecdb_erase.c @@ -23,7 +23,7 @@ ecdb_erase_disc(Ecdb_Erase_Project *proj, Ecdb_Page *page) data = calloc(1, sizeof(Erase_Data)); if (!data) { - printf("ecdb_erase_disc: NULL data!\n"); + EINA_ERROR_PWARN("ecdb_erase_disc: NULL data!\n"); return FALSE; } data->proj = ECDB_PROJECT(proj); @@ -33,23 +33,23 @@ ecdb_erase_disc(Ecdb_Erase_Project *proj, Ecdb_Page *page) tangible[0].drive); if (disc_state == BURN_DISC_BLANK) { - printf("Disc is already blank!\n"); + EINA_ERROR_PINFO("Disc is already blank!\n"); return FALSE; } else if (disc_state == BURN_DISC_EMPTY) { - printf("No disc!\n"); + EINA_ERROR_PINFO("No disc!\n"); return FALSE; } else if (!burn_disc_erasable(ECDB_PROJECT(proj)->drive-> tangible[0].drive)) { - printf("Not able to erase!\n"); + EINA_ERROR_PINFO("Not able to erase!\n"); return FALSE; } else if (disc_state == BURN_DISC_FULL || BURN_DISC_APPENDABLE) { - printf("Beginning to erase disc!\n"); + EINA_ERROR_PINFO("Beginning to erase disc!\n"); ECDB_PROJECT(proj)->pipe = ecore_pipe_add(ecdb_erase_progress_handler, data); burn_disc_erase(ECDB_PROJECT(proj)->drive->tangible[0].drive, @@ -62,7 +62,7 @@ ecdb_erase_disc(Ecdb_Erase_Project *proj, Ecdb_Page *page) } else { - printf("Not of erasable type\n"); + EINA_ERROR_PINFO("Not of erasable type\n"); return FALSE; } } @@ -76,11 +76,12 @@ ecdb_erase_progress_handler(void *data, void *buffer, unsigned int nbyte) static int last_sector = 0; Edje_Message_Int_Set *progress_msg; - printf("In progress handler, %d, %d\n", sizeof(BurnProgress), nbyte); + EINA_ERROR_PDBG("In progress handler, %d, %d\n", sizeof(BurnProgress), + nbyte); if (nbyte != sizeof(BurnProgress)) { ecore_event_add(ECDB_DRIVE_ACTION_FINISHED, NULL, NULL, NULL); - printf("Adding event to queue.\n"); + EINA_ERROR_PDBG("Adding event to queue.\n"); last_sector = 0; return; } @@ -106,13 +107,13 @@ ecdb_erase_progress_handler(void *data, void *buffer, unsigned int nbyte) edata = data; if (!edata) { - printf("ecdb_erase_progress_handler: NULL edata!\n"); + EINA_ERROR_PWARN("ecdb_erase_progress_handler: NULL edata!\n"); return; } if ((!edata->page) || (!edata->proj)) { - printf("ecdb_erase_progress_handler: NULL page or proj!\n"); + EINA_ERROR_PWARN("ecdb_erase_progress_handler: NULL page or proj!\n"); return; } @@ -123,7 +124,8 @@ ecdb_erase_progress_handler(void *data, void *buffer, unsigned int nbyte) break; default: - printf("ecdb_erase_progress_handler: Unrecognized project type!\n"); + EINA_ERROR_PWARN("ecdb_erase_progress_handler: " + "Unrecognized project type!\n"); return; } diff --git a/experimental/ecdb/trunk/src/ecdb_erase_gui.c b/experimental/ecdb/trunk/src/ecdb_erase_gui.c index af970a3c..f4bcda60 100644 --- a/experimental/ecdb/trunk/src/ecdb_erase_gui.c +++ b/experimental/ecdb/trunk/src/ecdb_erase_gui.c @@ -65,7 +65,7 @@ _button_cb_begin(void *data, Evas_Object *o __UNUSED__, idx = ecdb_combo_selected_get(ECDB_PROJECT(proj)->drive_combo); if (idx < 0) { - printf("Choose a drive!\n"); + EINA_ERROR_PDBG("Choose a drive!\n"); edje_object_part_text_set(page->erase, "progress_text", "Choose a Drive!"); return; @@ -73,7 +73,7 @@ _button_cb_begin(void *data, Evas_Object *o __UNUSED__, if (!ecdb_aquire_drive(ECDB_PROJECT(proj), idx)) { - printf("Couldn't grab drive!\n"); + EINA_ERROR_PDBG("Couldn't grab drive!\n"); edje_object_part_text_set(page->erase, "progress_text", "Couldn't grab the drive!"); return; @@ -83,7 +83,7 @@ _button_cb_begin(void *data, Evas_Object *o __UNUSED__, // TODO: Error Messages here if (!ecdb_erase_disc(proj, page)) { - printf("Disc not erasable!\n"); + EINA_ERROR_PINFO("Disc not erasable!\n"); snprintf(buf, sizeof(buf), "Disc not erasable!"); edje_object_part_text_set(page->erase, "progress_text", buf); burn_drive_release(ECDB_PROJECT(proj)->drive->tangible[0].drive, 0); @@ -182,14 +182,14 @@ ecdb_erase_cleanup(Ecdb_Page *page) if (!page) { - printf("ecdb_erase_cleanup: NULL page!\n"); + EINA_ERROR_PWARN("ecdb_erase_cleanup: NULL page!\n"); return; } proj = evas_object_data_get(page->erase, "proj"); if (!proj) { - printf("ecdb_erase_cleanup: NULL proj!\n"); + EINA_ERROR_PWARN("ecdb_erase_cleanup: NULL proj!\n"); return; } diff --git a/experimental/ecdb/trunk/src/ecdb_filelist_custom.c b/experimental/ecdb/trunk/src/ecdb_filelist_custom.c index 9aceabc3..5ad7925b 100644 --- a/experimental/ecdb/trunk/src/ecdb_filelist_custom.c +++ b/experimental/ecdb/trunk/src/ecdb_filelist_custom.c @@ -29,7 +29,7 @@ ecdb_custom_filelist_new(void) ret = ewl_filelist_new(); if (!ret) { - printf("ecdb_custom_filelist_new: NULL return!\n"); + EINA_ERROR_PWARN("ecdb_custom_filelist_new: NULL return!\n"); return NULL; } diff --git a/experimental/ecdb/trunk/src/ecdb_gui.c b/experimental/ecdb/trunk/src/ecdb_gui.c index 926ce4bc..5faa1313 100644 --- a/experimental/ecdb/trunk/src/ecdb_gui.c +++ b/experimental/ecdb/trunk/src/ecdb_gui.c @@ -213,7 +213,7 @@ ecdb_create_main_gui(void) if (!em->main_win_ee) { - printf("Cannot create main window!\n"); + EINA_ERROR_PWARN("Cannot create main window!\n"); return FALSE; } @@ -387,7 +387,7 @@ ecdb_cb_welcome_page_buttons_clicked(void *data, Evas_Object *o, edje_object_signal_emit(page->gui, "ecdb,filelist,hide", "ecdb"); } - printf("Action: %s\n", source); + EINA_ERROR_PDBG("Action: %s\n", source); } void diff --git a/experimental/ecdb/trunk/src/ecdb_image.c b/experimental/ecdb/trunk/src/ecdb_image.c index 4648f3c5..13a25b32 100644 --- a/experimental/ecdb/trunk/src/ecdb_image.c +++ b/experimental/ecdb/trunk/src/ecdb_image.c @@ -110,7 +110,7 @@ ecdb_source_child_append(Ecdb_Source *src, Ecdb_Source *child) if (src == child) { - printf("Trying to make a parent of itself!\n"); + EINA_ERROR_PWARN("Trying to make a parent of itself!\n"); return; } @@ -145,7 +145,7 @@ ecdb_source_child_remove(Ecdb_Source *src, Ecdb_Source *child) if (src == child) { - printf("Trying to remove oneself\n"); + EINA_ERROR_PWARN("Trying to remove oneself\n"); return; } @@ -248,7 +248,7 @@ ecdb_image_project(Ecdb_Burn_Project *bp) } else if (ECDB_PROJECT(bp)->type == ECDB_IMAGE_PROJECT) { - printf("Supplied file is not an image!\n"); + EINA_ERROR_PWARN("Supplied file is not an image!\n"); efreet_mime_shutdown(); return NULL; } @@ -261,14 +261,14 @@ ecdb_image_project(Ecdb_Burn_Project *bp) } else { - printf("Incorrect project type!\n"); + EINA_ERROR_PWARN("Incorrect project type!\n"); return NULL; } /* Otherwise we have a bunch of files */ if (!iso_image_new(proj->volume_id, &image)) { - printf("Failed to create image!\n"); + EINA_ERROR_PWARN("Failed to create image!\n"); return NULL; } @@ -304,7 +304,7 @@ ecdb_image_project(Ecdb_Burn_Project *bp) if (!iso_write_opts_new(&opts, 2)) { - printf("Failed to create writing options!\n"); + EINA_ERROR_PWARN("Failed to create writing options!\n"); iso_image_unref(image); return NULL; } diff --git a/experimental/ecdb/trunk/src/ecdb_misc.c b/experimental/ecdb/trunk/src/ecdb_misc.c index 1b0de95b..52fe5276 100644 --- a/experimental/ecdb/trunk/src/ecdb_misc.c +++ b/experimental/ecdb/trunk/src/ecdb_misc.c @@ -26,7 +26,7 @@ ecdb_shutdown(void *data, int type, void *event) if (!ecore_file_recursive_rm("/tmp/ecdb")) { - printf("Removal of temporary directory failed!\n"); + EINA_ERROR_PWARN("Removal of temporary directory failed!\n"); } ecore_main_loop_quit(); diff --git a/experimental/ecdb/trunk/src/ecdb_projects.c b/experimental/ecdb/trunk/src/ecdb_projects.c index 893bf0ef..6021d3dd 100644 --- a/experimental/ecdb/trunk/src/ecdb_projects.c +++ b/experimental/ecdb/trunk/src/ecdb_projects.c @@ -38,7 +38,7 @@ ecdb_project_destroy(Ecdb_Project *proj) { if (proj->ev_handler) ecore_event_handler_del(proj->ev_handler); if (proj->pipe) ecore_pipe_del(proj->pipe); - printf("base\n"); + EINA_ERROR_PINFO("base\n"); } void @@ -86,7 +86,7 @@ ecdb_burn_project_init(Ecdb_Burn_Project *proj) void ecdb_burn_project_destroy(Ecdb_Burn_Project *proj) { - printf("burn --> "); + EINA_ERROR_PINFO("burn\n"); if (proj->files) ecdb_source_destroy(proj->files); ecdb_project_destroy(ECDB_PROJECT(proj)); } @@ -130,7 +130,7 @@ ecdb_erase_project_init(Ecdb_Erase_Project *proj) void ecdb_erase_project_destroy(Ecdb_Erase_Project *proj) { - printf("Destroying: erase --> "); + EINA_ERROR_PINFO("Destroying: erase\n"); ecdb_project_destroy(ECDB_PROJECT(proj)); FREE(proj); } @@ -170,7 +170,7 @@ ecdb_audio_project_init(Ecdb_Audio_Project *proj) void ecdb_audio_project_destroy(Ecdb_Audio_Project *proj) { - printf("Destroying: audio --> "); + EINA_ERROR_PINFO("Destroying: audio\n"); ecdb_burn_project_destroy(ECDB_BURN(proj)); FREE(proj); } @@ -213,7 +213,7 @@ ecdb_data_project_init(Ecdb_Data_Project *proj) void ecdb_data_project_destroy(Ecdb_Data_Project *proj) { - printf("Destroying: data --> "); + EINA_ERROR_PINFO("Destroying: data\n"); FREE(proj->volume_id); FREE(proj->publisher_id); FREE(proj->data_preparer_id); @@ -259,7 +259,7 @@ ecdb_image_project_init(Ecdb_Image_Project *proj) void ecdb_image_project_destroy(Ecdb_Image_Project *proj) { - printf("Destroying: image --> "); + EINA_ERROR_PINFO("Destroying: image\n"); ecdb_burn_project_destroy(ECDB_BURN(proj)); FREE(proj); } diff --git a/experimental/ecdb/trunk/src/ecdb_widgets.c b/experimental/ecdb/trunk/src/ecdb_widgets.c index a0cdab39..5ba5fb81 100644 --- a/experimental/ecdb/trunk/src/ecdb_widgets.c +++ b/experimental/ecdb/trunk/src/ecdb_widgets.c @@ -48,7 +48,7 @@ ecdb_widget_add(Evas_Object *parent, const char *name) o = edje_object_add(evas_object_evas_get(parent)); if (!o) { - printf("ecdb_widget_add: NULL return!\n"); + EINA_ERROR_PWARN("NULL return!\n"); return NULL; } @@ -83,7 +83,7 @@ ecdb_button_add(Evas_Object *parent, const char *name) b = ecdb_widget_add(parent, name); if (!b) { - printf("ecdb_button_add: NULL return!\n"); + EINA_ERROR_PWARN("NULL return!\n"); return NULL; } @@ -99,7 +99,7 @@ ecdb_button_label_set(Evas_Object *b, const char *label) { if (!b) { - printf("ecdb_button_label_set: NULL object!\n"); + EINA_ERROR_PWARN("NULL object!\n"); return; } edje_object_part_text_set(b, "ecdb.label", label); @@ -112,14 +112,14 @@ ecdb_button_icon_set(Evas_Object *b, const char *group) if (!b) { - printf("ecdb_button_icon_set: NULL object!\n"); + EINA_ERROR_PWARN("NULL object!\n"); return; } icon = ecdb_widget_add(b, "ecdb.swallow.icon"); if (!icon) { - printf("ecdb_button_icon_set: NULL icon!\n"); + EINA_ERROR_PWARN("NULL icon!\n"); return; } if (edje_object_file_set(icon, em->theme_path, group)) @@ -132,7 +132,7 @@ ecdb_button_label_get(Evas_Object *b) { if (!b) { - printf("ecdb_button_label_get: NULL object!\n"); + EINA_ERROR_PWARN("NULL object!\n"); return NULL; } return edje_object_part_text_get(b, "ecdb.label"); @@ -154,7 +154,7 @@ ecdb_combo_item_add(Evas_Object *parent, const char *name) ci = ecdb_widget_add(parent, name); if (!ci) { - printf("ecdb_combo_item_add: NULL return!\n"); + EINA_ERROR_PWARN("NULL return!\n"); return NULL; } edje_object_file_set(ci, em->theme_path, "ecdb/combo_item"); @@ -169,7 +169,7 @@ ecdb_combo_item_label_set(Evas_Object *ci, const char *label) { if (!ci) { - printf("ecdb_combo_label_set: NULL ci!\n"); + EINA_ERROR_PWARN("NULL ci!\n"); return; } edje_object_part_text_set(ci, "ecdb.label", label); @@ -182,14 +182,14 @@ ecdb_combo_item_icon_set(Evas_Object *ci, const char *group) if (!ci) { - printf("ecdb_combo_item_icon_set: NULL object!\n"); + EINA_ERROR_PWARN("NULL object!\n"); return; } icon = ecdb_widget_add(ci, "ecdb.swallow.icon"); if (!icon) { - printf("ecdb_combo_item_icon_set: NULL icon!\n"); + EINA_ERROR_PWARN("NULL icon!\n"); return; } edje_object_file_set(icon, em->theme_path, group); @@ -246,7 +246,7 @@ ecdb_check_add(Evas_Object *parent, const char *name) c = ecdb_widget_add(parent, name); if (!c) { - printf("ecdb_check_add: NULL return!\n"); + EINA_ERROR_PWARN("NULL return!\n"); return NULL; } @@ -258,7 +258,7 @@ ecdb_check_add(Evas_Object *parent, const char *name) cd = calloc(1, sizeof(Check_Data)); if (!cd) { - printf("ecdb_check_add: NULL data!\n"); + EINA_ERROR_PWARN("NULL data!\n"); return NULL; } evas_object_data_set(c, "cd", cd); @@ -271,7 +271,7 @@ ecdb_check_label_set(Evas_Object *c, const char *label) { if (!c) { - printf("ecdb_check_label_set: NULL object!\n"); + EINA_ERROR_PWARN("NULL object!\n"); return; } @@ -283,7 +283,7 @@ ecdb_check_states_set(Evas_Object *c, const char *ystate, const char *nstate) { if (!c) { - printf("ecdb_check_states_set: NULL object!\n"); + EINA_ERROR_PWARN("NULL object!\n"); return; } @@ -298,14 +298,14 @@ ecdb_check_checked_set(Evas_Object *c, int state) if (!c) { - printf("ecdb_check_checked_set: NULL object!\n"); + EINA_ERROR_PWARN("NULL object!\n"); return; } cd = evas_object_data_get(c, "cd"); if (!cd) { - printf("ecdb_check_checked_set: NULL data!\n"); + EINA_ERROR_PWARN("NULL data!\n"); return; } @@ -331,14 +331,14 @@ ecdb_check_checked_get(Evas_Object *c) if (!c) { - printf("ecdb_check_checked_get: NULL object!\n"); + EINA_ERROR_PWARN("NULL object!\n"); return 0; } cd = evas_object_data_get(c, "cd"); if (!cd) { - printf("ecdb_check_checked_get: NULL data!\n"); + EINA_ERROR_PWARN("NULL data!\n"); return 0; } @@ -521,7 +521,7 @@ ecdb_entry_add(Evas_Object *parent, const char *name) e = ecdb_widget_add(parent, name); if (!e) { - printf("ecdb_entry_add: NULL return!\n"); + EINA_ERROR_PWARN("NULL return!\n"); return NULL; } edje_object_file_set(e, em->theme_path, "ecdb/entry"); @@ -657,7 +657,7 @@ _combo_clicked(void *data, Evas_Object *obj, void *event_info) "ecdb.box")); if (!it) { - printf("_combo_clicked: NULL iterator!\n"); + EINA_ERROR_PWARN("NULL iterator!\n"); return; } @@ -728,7 +728,7 @@ ecdb_combo_add(Evas_Object *parent, const char *name) if (!c) { - printf("ecdb_combo_add: NULL return!\n"); + EINA_ERROR_PWARN("NULL return!\n"); return NULL; } edje_object_file_set(c, em->theme_path, "ecdb/combo"); @@ -742,7 +742,7 @@ ecdb_combo_add(Evas_Object *parent, const char *name) cd = calloc(1, sizeof(Combo_Data)); if (!cd) { - printf("ecdb_combo_add: NULL data!\n"); + EINA_ERROR_PWARN("NULL data!\n"); return NULL; } @@ -776,14 +776,14 @@ ecdb_combo_header_set(Evas_Object *c, const char *text) if (!c) { - printf("ecdb_combo_header_set: NULL object!\n"); + EINA_ERROR_PWARN("NULL object!\n"); return; } cd = evas_object_data_get(c, "cd"); if (!cd) { - printf("ecdb_combo_header_set: NULL data!\n"); + EINA_ERROR_PWARN("NULL data!\n"); return; } @@ -799,14 +799,14 @@ ecdb_combo_append(Evas_Object *c, Evas_Object *o) if (!c) { - printf("ecdb_combo_append: NULL object!\n"); + EINA_ERROR_PWARN("NULL object!\n"); return; } cd = evas_object_data_get(c, "cd"); if (!cd) { - printf("ecdb_combo_append: NULL data!\n"); + EINA_ERROR_PWARN("NULL data!\n"); return; } cd->count++; @@ -828,14 +828,14 @@ ecdb_combo_expand(Evas_Object *c) if (!c) { - printf("ecdb_combo_expand: NULL object!\n"); + EINA_ERROR_PWARN("NULL object!\n"); return; } cd = evas_object_data_get(c, "cd"); if (!cd) { - printf("ecdb_combo_expand: NULL data!\n"); + EINA_ERROR_PWARN("NULL data!\n"); return; } @@ -863,7 +863,7 @@ ecdb_combo_expand(Evas_Object *c) "ecdb.box")); if (!it) { - printf("ecdb_combo_expand: NULL iterator!\n"); + EINA_ERROR_PWARN("NULL iterator!\n"); return; } @@ -876,7 +876,7 @@ ecdb_combo_expand(Evas_Object *c) } else { - printf("THEME ERROR! MISSING REQUIRED MINIMUM DATA VALUE\n"); + EINA_ERROR_PWARN("THEME ERROR! MISSING REQUIRED MINIMUM DATA VALUE\n"); } h2 += padding; } @@ -910,14 +910,14 @@ ecdb_combo_collapse(Evas_Object *c) if (!c) { - printf("ecdb_combo_collapse: NULL object!\n"); + EINA_ERROR_PWARN("NULL object!\n"); return; } cd = evas_object_data_get(c, "cd"); if (!cd) { - printf("ecdb_combo_collapse: NULL data!\n"); + EINA_ERROR_PWARN("NULL data!\n"); return; } @@ -934,7 +934,7 @@ ecdb_combo_collapse(Evas_Object *c) "ecdb.box")); if (!it) { - printf("ecdb_combo_collapse: NULL iterator!\n"); + EINA_ERROR_PWARN("NULL iterator!\n"); return; } @@ -954,14 +954,14 @@ ecdb_combo_header_create_set(Evas_Object *c, void (*func) if (!c) { - printf("ecdb_combo_header_create_set: NULL object!\n"); + EINA_ERROR_PWARN("NULL object!\n"); return; } cd = evas_object_data_get(c, "cd"); if (!cd) { - printf("ecdb_combo_header_create_set: NULL data!\n"); + EINA_ERROR_PWARN("NULL data!\n"); return; } @@ -975,14 +975,14 @@ ecdb_combo_selected_get(Evas_Object *c) if (!c) { - printf("ecdb_combo_selected_get: NULL object!\n"); + EINA_ERROR_PWARN("NULL object!\n"); return -1; } cd = evas_object_data_get(c, "cd"); if (!cd) { - printf("ecdb_combo_selected_get: NULL data!\n"); + EINA_ERROR_PWARN("NULL data!\n"); return -1; } @@ -996,14 +996,14 @@ ecdb_combo_data_set(Evas_Object *c, void *data) if (!c) { - printf("ecdb_combo_data_set: NULL object!\n"); + EINA_ERROR_PWARN("NULL object!\n"); return; } cd = evas_object_data_get(c, "cd"); if (!cd) { - printf("ecdb_combo_data_set: NULL data!\n"); + EINA_ERROR_PWARN("NULL data!\n"); return; } cd->data = data; @@ -1016,14 +1016,14 @@ ecdb_combo_data_get(Evas_Object *c) if (!c) { - printf("ecdb_combo_data_get: NULL object!\n"); + EINA_ERROR_PWARN("NULL object!\n"); return NULL; } cd = evas_object_data_get(c, "cd"); if (!cd) { - printf("ecdb_combo_data_set: NULL data!\n"); + EINA_ERROR_PWARN("NULL data!\n"); return NULL; } @@ -1037,7 +1037,7 @@ ecdb_combo_clear(Evas_Object *c) if (!c) { - printf("ecdb_combo_clear: NULL object!"); + EINA_ERROR_PWARN("NULL object!"); return; } @@ -1057,7 +1057,7 @@ ecdb_label_add(Evas_Object *parent, const char *name) l = ecdb_widget_add(parent, name); if (!l) { - printf("ecdb_label_add: NULL return!\n"); + EINA_ERROR_PWARN("NULL return!\n"); return NULL; } edje_object_file_set(l, em->theme_path, "ecdb/label"); @@ -1070,7 +1070,7 @@ ecdb_label_text_set(Evas_Object *l, const char *text) { if (!l) { - printf("ecdb_label_text_set: NULL object!\n"); + EINA_ERROR_PWARN("NULL object!\n"); return; } edje_object_part_text_set(l, "ecdb.label", text); @@ -1130,12 +1130,10 @@ _config_inwin_del(void *data, Evas *e, Evas_Object *obj, void *event_info) iwd = data; if (!evas_object_event_callback_del(iwd->follow, EVAS_CALLBACK_HIDE, _config_inwin_hide)) - printf("_config_inwin_del: EVAS_CALLBACK_HIDE callback removal " - "failure!\n"); + EINA_ERROR_PWARN("EVAS_CALLBACK_HIDE callback removal failure!\n"); if (!evas_object_event_callback_del(iwd->follow, EVAS_CALLBACK_RESIZE, _config_inwin_resize)) - printf("_config_inwin_del: EVAS_CALLBACK_RESIZE callback removal " - "failure!\n"); + EINA_ERROR_PWARN("EVAS_CALLBACK_RESIZE callback removal failure!\n"); FREE(iwd); } @@ -1151,13 +1149,13 @@ ecdb_config_inwin_follow_set(Evas_Object *inwin, Evas_Object *follow) if (!inwin ) { - printf("ecdb_config_inwin_resize_follow: NULL inwin!\n"); + EINA_ERROR_PWARN("NULL inwin!\n"); return; } if (!follow) { - printf("ecdb_config_inwin_resize_follow: NULL follow!\n"); + EINA_ERROR_PWARN("NULL follow!\n"); return; } @@ -1178,14 +1176,14 @@ ecdb_config_inwin_add(Evas_Object *parent, const char *name) iwd = calloc(1, sizeof(Config_Inwin_Data)); if (!iwd) { - printf("ecdb_combo_add: NULL data!\n"); + EINA_ERROR_PWARN("NULL data!\n"); return NULL; } iwd->popup = edje_object_add(evas_object_evas_get(parent)); if (!iwd->popup) { - printf("ecdb_config_inwin_add: NULL return!\n"); + EINA_ERROR_PWARN("NULL return!\n"); return NULL; } edje_object_file_set(iwd->popup, em->theme_path, "ecdb/config_inwin/popup"); @@ -1215,7 +1213,7 @@ ecdb_config_inwin_show(Evas_Object *inwin) if (!inwin) { - printf("ecdb_config_inwin_show: NULL object!\n"); + EINA_ERROR_PWARN("NULL object!\n"); return; } @@ -1223,7 +1221,7 @@ ecdb_config_inwin_show(Evas_Object *inwin) if (!iwd) { - printf("ecdb_config_inwin_show: NULL data!\n"); + EINA_ERROR_PWARN("NULL data!\n"); return; } @@ -1246,7 +1244,7 @@ ecdb_config_inwin_hide(Evas_Object *inwin) if (!inwin) { - printf("ecdb_config_inwin_hide: NULL object!\n"); + EINA_ERROR_PWARN("NULL object!\n"); return; } @@ -1254,7 +1252,7 @@ ecdb_config_inwin_hide(Evas_Object *inwin) if (!iwd) { - printf("ecdb_config_inwin_hide: NULL data!\n"); + EINA_ERROR_PWARN("NULL data!\n"); return; } @@ -1273,7 +1271,7 @@ ecdb_config_inwin_child_add(Evas_Object *inwin, Evas_Object *child, { if (!inwin) { - printf("ecdb_config_inwin_child_add: NULL object!\n"); + EINA_ERROR_PWARN("NULL object!\n"); return; } if (!child) @@ -1281,7 +1279,7 @@ ecdb_config_inwin_child_add(Evas_Object *inwin, Evas_Object *child, if (!edje_object_part_table_pack(inwin, "ecdb.table", child, c, r, cs, rs)) { - printf("ecdb_config_inwin_child_add: Couldn't append to table!\n"); + EINA_ERROR_PWARN("Couldn't append to table!\n"); } } @@ -1295,7 +1293,7 @@ ecdb_capacity_add(Evas_Object *parent, const char *name) ret = ecdb_widget_add(parent, "ecdb/burn_data/capacity"); if (!ret) { - printf("ecdb_capacity_add: NULL return!\n"); + EINA_ERROR_PWARN("NULL return!\n"); return NULL; } @@ -1311,7 +1309,7 @@ ecdb_capacity_float_set(Evas_Object *cap, float val) if (!cap) { - printf("ecdb_capacity_float_set: NULL object!\n"); + EINA_ERROR_PWARN("NULL object!\n"); return; }