Use eina error logging, instead of plain printfs.
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user