-static Evas_Object *_create_predict_item(Evas_Object *parent, const char *city, const char *nation)
-{
- Evas_Object *predict_item = NULL;
-
- char *path = NULL;
- char full_path[PATH_LEN] = {0, };
- char city_name[PATH_LEN] = {0, };
-
- retv_if(!parent, NULL);
-
- path = app_get_resource_path();
- retv_if(!path, NULL);
-
- snprintf(full_path, sizeof(full_path), "%s/edje/%s", path, PREDICT_ITEM_EDJE);
- free(path);
-
- predict_item = elm_layout_add(parent);
- retv_if(!predict_item, NULL);
-
- elm_layout_file_set(predict_item, full_path, "main");
- evas_object_size_hint_weight_set(predict_item, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(predict_item, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_show(predict_item);
-
- snprintf(city_name, sizeof(city_name), "%s, %s", city, nation);
- elm_object_part_text_set(predict_item, "city", city_name);
-
- return predict_item;
-}
-
-static void _destroy_predict_item(Evas_Object *predict_item)
-{
- ret_if(!predict_item);
- evas_object_del(predict_item);
-}
-