if ((strcmp(dir->d_name, ".")) && (strcmp(dir->d_name, ".."))) {
filemanager_utils_get_file_category(dir->d_name, &(ad->type));
- if(file_type!=NULL){
- if(ad->type == file_type){
- //DBG("FILES: %s",dir->d_name);
- *file_list = eina_list_append(*file_list, dir->d_name);
+ if(file_type)
+ {
+ if(ad->type == file_type)
+ {
+ DBG("FILES: %s",dir->d_name);
+ *file_list = eina_list_append(*file_list, strdup(dir->d_name));
}
}
- else if(ad->type == FILE_TYPE_IMAGE || ad->type == FILE_TYPE_MUSIC || ad->type == FILE_TYPE_VIDEO){
- *file_list = eina_list_append(*file_list, dir->d_name);
+ else if(ad->type == FILE_TYPE_IMAGE || ad->type == FILE_TYPE_MUSIC || ad->type == FILE_TYPE_VIDEO)
+ {
+ *file_list = eina_list_append(*file_list, strdup(dir->d_name));
}
}
static void win_delete_request_cb(void *data, Evas_Object *obj, void *event_info)
{
+ DBG("win_delete_request_cb");
ui_app_exit();
}
static void layout_back_cb(void *data, Evas_Object *obj, void *event_info)
{
+ DBG("layout_back_cb");
appdata_s *ad = data;
/* Let window go to hide state. */
if(!strcmp(ad->mime, "video/3gpp") ||
destroy_sound_player(ad->sound_player_data);
}
elm_win_lower(ad->win);
+ ui_app_exit();
}
static void app_get_resource(const char *edj_file_in, char *edj_path_out, int edj_path_max)
Eina_List* file_list = NULL;
char *app_id;
char *shared_res_path;
- app_control_get_caller (ad->app_control, &app_id);
- //DBG("app_id%s", app_id);
+ //app_control_get_caller (ad->app_control, &app_id);
+ app_control_get_extra_data(ad->app_control, "app_id", &app_id);
+ DBG("app_id: %s", app_id);
app_manager_get_shared_resource_path(app_id, &shared_res_path);
//DBG("shared_path%s", shared_res_path);
//strcat(shared_res_path, "images/");
Eina_List* file_list = NULL;
char *app_id;
char *shared_res_path;
- app_control_get_caller (ad->app_control, &app_id);
+// app_control_get_caller (ad->app_control, &app_id);
+ app_control_get_extra_data(ad->app_control, "app_id", &app_id);
//DBG("app_id%s", app_id);
app_manager_get_shared_resource_path(app_id, &shared_res_path);
//DBG("shared_path%s", shared_res_path);
Eina_List* get_all_dir_file_list(void* data)
{
- DBG("get_audio_dir_audio_file_list");
+ DBG("get_all_dir_file_list");
appdata_s *ad =(appdata_s*) data;
Eina_List* file_list = NULL;
char *app_id;
char *shared_res_path;
- app_control_get_caller (ad->app_control, &app_id);
+// app_control_get_caller (ad->app_control, &app_id);
+ app_control_get_extra_data(ad->app_control, "app_id", &app_id);
//DBG("app_id%s", app_id);
app_manager_get_shared_resource_path(app_id, &shared_res_path);
//DBG("shared_path%s", shared_res_path);
Eina_List* file_list = NULL;
char *app_id;
char *shared_res_path;
- app_control_get_caller (ad->app_control, &app_id);
+// app_control_get_caller (ad->app_control, &app_id);
+ app_control_get_extra_data(ad->app_control, "app_id", &app_id);
DBG("app_id%s", app_id);
app_manager_get_shared_resource_path(app_id, &shared_res_path);
DBG("shared_path%s", shared_res_path);
DBG("show_url.....");
appdata_s *this = (appdata_s*) data;
- Evas_Object *web_view = ewk_view_add (evas_object_evas_get(this->layout));
+ //Evas_Object *web_view = ewk_view_add (evas_object_evas_get(this->layout));
- ewk_view_url_set(web_view, "http://www.google.com"); //TODO: this url will change according to data
+ //ewk_view_url_set(web_view, "http://www.google.com"); //TODO: this url will change according to data
- evas_object_show(web_view);
- elm_object_part_content_set(this->layout, "data_view", web_view);
+ //evas_object_show(web_view);
+ //elm_object_part_content_set(this->layout, "data_view", web_view);
}
}
ret = app_control_set_uri(this->service, _view_it->uri);
RETM_IF(APP_CONTROL_ERROR_NONE != ret, "app_control_set_uri failed :%s", get_app_control_error(ret));
+
+
+
ret = app_control_send_launch_request(this->service , app_control_view_cb, this);
RETM_IF(APP_CONTROL_ERROR_NONE != ret, "app_control_send_launch_request failed :%s", get_app_control_error(ret));
}
ret = app_control_set_mime(this-> service, _view_it->mime);
RETM_IF(APP_CONTROL_ERROR_NONE != ret, "app_control_set_mime failed :%s", get_app_control_error(ret));
}
+
+ char* app_id;
+ app_get_id(&app_id);
+ DBG("app_id: %s", app_id);
+
+ ret = app_control_add_extra_data(this->service, "app_id", app_id);
+ RETM_IF(APP_CONTROL_ERROR_NONE != ret, "app_control_add_extra_data failed :%s", get_app_control_error(ret));
+
ret = app_control_send_launch_request(this->service , app_control_view_cb, this);
RETM_IF(APP_CONTROL_ERROR_NONE != ret, "app_control_send_launch_request failed :%s", get_app_control_error(ret));