snprintf(filepath, 1024, "%s/%s", data_path, item_data[idx][1]);
if (EN_US_FEMALE == idx || KO_KR_FEMALE == idx || DE_DE_FEMALE == idx || FR_FR_FEMALE == idx || IT_IT_FEMALE == idx || ES_ES_FEMALE == idx) {
- return true;
+ return true;
} else {
if (0 != access(filepath, F_OK)) {
return false;
if (DOWNLOAD_STATE_COMPLETED == state) {
dlog_print(DLOG_INFO, LOG_TAG, "===== Download Completed");
ecore_main_loop_thread_safe_call_sync(__download_completed_cb, user_data);
+ download_destroy(download_id);
} else if (DOWNLOAD_STATE_FAILED == state) {
dlog_print(DLOG_INFO, LOG_TAG, "===== Download Failed");
ecore_main_loop_thread_safe_call_sync(__download_failed_cb, user_data);
+ download_destroy(download_id);
}
dlog_print(DLOG_INFO, LOG_TAG, "=====");
intptr_t pidx = (intptr_t)data;
int idx = (int)pidx;
dlog_print(DLOG_INFO, LOG_TAG, "[%d] item clicked", idx);
-
+
/* download */
if (false == __installed_lang(idx)) {
dlog_print(DLOG_INFO, LOG_TAG, ">> Download <<");
error = download_create(&download_id);
if (DOWNLOAD_ERROR_NONE != error) {
dlog_print(DLOG_ERROR, LOG_TAG, "[ERROR] create");
+ __show_progress_popup(true);
+ return;
}
error = download_set_state_changed_cb(download_id, __download_state_changed_cb, (void *)pidx);
if (DOWNLOAD_ERROR_NONE != error) {
dlog_print(DLOG_ERROR, LOG_TAG, "[ERROR] set state cb");
+ __show_progress_popup(true);
+ download_destroy(download_id);
+ return;
}
char url[1024] = {'\0',};
error = download_set_url(download_id, url);
if (DOWNLOAD_ERROR_NONE != error) {
dlog_print(DLOG_ERROR, LOG_TAG, "[ERROR] set url");
+ __show_progress_popup(true);
+ download_destroy(download_id);
+ return;
}
//char *data_path = app_get_data_path();
error = download_set_destination(download_id, data_path);
if (DOWNLOAD_ERROR_NONE != error) {
dlog_print(DLOG_ERROR, LOG_TAG, "[ERROR] set destination");
+ __show_progress_popup(true);
+ download_destroy(download_id);
+ return;
}
//free(data_path);
error = download_start(download_id);
if (DOWNLOAD_ERROR_NONE != error) {
dlog_print(DLOG_ERROR, LOG_TAG, "[ERROR] start");
+ __show_progress_popup(true);
+ download_destroy(download_id);
+ return;
}
-
+
__show_progress_popup(false);
dlog_print(DLOG_INFO, LOG_TAG, "<< End >>");
ad->genlist = elm_genlist_add(ad->naviframe);
elm_genlist_mode_set(ad->genlist, ELM_LIST_COMPRESS);
elm_genlist_homogeneous_set(ad->genlist, EINA_TRUE);
-
+
g_itc_group_title = elm_genlist_item_class_new();
if (NULL == g_itc_group_title) {
dlog_print(DLOG_ERROR, LOG_TAG, "Fail to item class new");
static bool app_create(void *data)
{
/* Hook to take necessary actions before main event loop starts
- Initialize UI resources and application's data
- If this function returns true, the main loop of application starts
- If this function returns false, the application is terminated */
+ Initialize UI resources and application's data
+ If this function returns true, the main loop of application starts
+ If this function returns false, the application is terminated */
appdata_s *ad = data;
create_base_gui(ad);