typedef void *tag_handle;
typedef bool (*ivug_db_cb)(media_handle media, void *user_data);
+typedef bool (*ivug_db_path_cb)(media_handle media, const char *path, void *user_data);
#define IVUG_MAX_CONDITION_LEN (1024)
+typedef struct _Ivug_DB_h
+{
+ ivug_db_path_cb callback;
+ media_handle *m_handle;
+ void *data;
+ int key;
+}Ivug_DB_h;
+
bool ivug_db_create(void);
bool ivug_db_destroy(void);
bool ivug_db_get_file_size(media_handle media, unsigned long long *size);
+Ivug_DB_h * ivug_db_create_thumbnail(media_handle media, ivug_db_path_cb callback, void *data);
+bool ivug_db_cancel_thumbnail(Ivug_DB_h *db_h);
+
#ifdef __cplusplus
}
#endif
long int ivug_atox(const char *number);
-char * ivug_generate_file_name(const char *filepath, const char *extension);
+char * ivug_generate_file_name(const char *filepath, const char *extension, const char *dest_dir);
/*
Removes leading and trailing whitespace from string
*/
char * ivug_get_icu_date(time_t mtime);
+bool ivug_validate_file_name(const char *fname);
#ifdef __cplusplus
}
#define LOG_LVL DBG_MSG_LVL_HIGH
#define LOG_CAT "IV-DB"
+#define DB_KEY (0x12341234)
+
typedef struct _Ivug_DB
{
ivug_db_cb callback;
}
}
+static void _ivug_thumb_cb(media_content_error_e error,
+ const char *path, void *data)
+{
+ Ivug_DB_h *db_h = (Ivug_DB_h *)data;
+
+ MSG_HIGH("_ivug_thumb_cb, path =%s", path);
+
+ if(db_h->callback == NULL || db_h->key != DB_KEY)
+ {
+ MSG_WARN("handle was freed");
+ return;
+ }
+
+ if(path == NULL)
+ {
+ MSG_ERROR("thumbnail path is NULL");
+ db_h->callback(db_h->m_handle, NULL, db_h->data);
+ return;
+ }
+
+ db_h->callback(db_h->m_handle, path, db_h->data);
+}
+
bool ivug_db_create(void)
{
int ret = MEDIA_CONTENT_ERROR_NONE;
int ret = MEDIA_CONTENT_ERROR_NONE;
if (ivug_is_web_uri(filepath) == true)
- return false;
+ return NULL;
media_handle m_handle = NULL;
return true;
}
+Ivug_DB_h * ivug_db_create_thumbnail(media_handle media, ivug_db_path_cb callback, void *data)
+{
+ media_info_h item = (media_info_h)media;
+
+ Ivug_DB_h *db_h = (Ivug_DB_h *)calloc(1, sizeof(Ivug_DB_h));
+ db_h->m_handle = media;
+ db_h->callback = callback;
+ db_h->data = data;
+ db_h->key = DB_KEY;
+
+ int ret = media_info_create_thumbnail(item, _ivug_thumb_cb, db_h);
+ if(ret != MEDIA_CONTENT_ERROR_NONE)
+ {
+ MSG_ERROR("media_info_get_size, err = %s", _strerror_db(ret));
+ free(db_h);
+ return NULL;
+ }
+
+ return db_h;
+}
+
+bool ivug_db_cancel_thumbnail(Ivug_DB_h *db_h)
+{
+ media_info_h item = (media_info_h)db_h->m_handle;
+
+ int ret = media_info_cancel_thumbnail(item);
+ if(ret != MEDIA_CONTENT_ERROR_NONE)
+ {
+ MSG_ERROR("media_info_cancel_thumbnail, err = %s", _strerror_db(ret));
+ return false;
+ }
+
+ db_h->m_handle = NULL;
+ db_h->callback = NULL;
+ db_h->data = NULL;
+ db_h->key = 0;
+
+ free(db_h);
+
+ return true;
+}
+
return val;
}
-char * ivug_generate_file_name(const char *filepath, const char *extension)
+char * ivug_generate_file_name(const char *filepath, const char *extension, const char *dest_dir)
{
IV_ASSERT(filepath != NULL);
char tempname[IVUG_MAX_FILE_PATH_LEN+1] = {0,};
char *ext = NULL;
char *filename = ecore_file_strip_ext(ecore_file_file_get(filepath));
- char *dir = ecore_file_dir_get(filepath);
+ char *dir = NULL;
if(extension)
{
ext = ivug_fileinfo_get_file_extension(filepath);
}
+ if(dest_dir)
+ {
+ dir = strdup(dest_dir);
+ }
+ else
+ {
+ dir = ecore_file_dir_get(filepath);
+ }
+
int i = 0;
for(i=1; i<IVUG_MAX_FILE_PATH_LEN; i++)
{
free(filename);
}
+ if(dir)
+ {
+ free(dir);
+ }
if(ext)
{
free(ext);
#define USE_CUSTOM_STYLE
+#define IVUG_INVALID_INDEX (0) // index was not set
+
/*
Time analysis data will be stored as file
*/
#define PROGRESSBAR_WIDTH 100
#define PROGRESSBAR_HEIGHT 100
+#define NOTIFY_HEIGHT 35
+
collections {
group {
name: "crop_view";
}
}
+ part { name: "crop.contents";
+ type: RECT;
+ scale: 1;
+ repeat_events: 0;
+ description { state: "default" 0.0;
+ color: 0 0 0 100;
+ align: 0.0 0.0;
+ rel1.relative: 0.0 0.0;
+ rel1.to_x: "bg";
+ rel1.to_y: "bg";
+ rel1.offset: 0 -10;
+ rel2.relative: 1.0 0.0;
+ rel2.to_x: "bg";
+ rel2.to_y: "toolbar_bg";
+ rel2.offset: 0 -NOTIFY_HEIGHT; //for notify
+ visible: 1;
+ }
+ }
+
+ part { name: "crop.contents.swallow";
+ type: SWALLOW;
+ scale: 1;
+ repeat_events: 0;
+ description { state: "default" 0.0;
+ rel1 { relative: 0 0; to:crop.contents; }
+ rel2 { relative: 1 1; to:crop.contents; }
+ visible: 1;
+ }
+ }
+
+ part { name: "crop.contents.swallow.notify";
+ type: RECT;
+ scale: 1;
+ repeat_events: 0;
+ description { state: "default" 0.0;
+ rel1 { relative: 0 0; to:crop.contents; }
+ rel2 { relative: 1 1; to:crop.contents; offset: 0 NOTIFY_HEIGHT;}
+ visible: 1;
+ }
+ }
+
part{
name: "photocam";
type: SWALLOW;
description {
state: "default" 0.0;
visible: 1;
- rel1 { relative: 0 0; to:bg; }
- rel2 { relative: 1 1; to:bg; }
+ rel1 { relative: 0 0; to:crop.contents; }
+ rel2 { relative: 1 1; to:crop.contents; }
}
}
state: "default" 0.0;
align: 0.5 0.5;
visible: 1;
- rel1 { relative: 0 0; to:bg; }
- rel2 { relative: 1 1; to:bg; }
+ rel1 { relative: 0 0; to:crop.contents; }
+ rel2 { relative: 1 1; to:crop.contents; }
}
}
description {
state: "default" 0.0;
visible: 1;
- rel1 { relative: 0 0; to:bg; }
- rel2 { relative: 1 1; to:bg; }
- }
- }
-
- part { name: "crop.contents";
- type: SWALLOW;
- scale: 1;
- repeat_events: 0;
- description { state: "default" 0.0;
- color: 255 0 0 100;
- align: 0.0 0.0;
- rel1.relative: 0.0 0.0;
- rel1.to_x: "bg";
- rel1.to_y: "bg";
- rel1.offset: 0 -10;
- rel2.relative: 1.0 0.0;
- rel2.to_x: "bg";
- rel2.to_y: "toolbar_bg";
- visible: 1;
+ rel1 { relative: 0 0; to:crop.contents; }
+ rel2 { relative: 1 1; to:crop.contents; }
}
}
}
}
-collections {
-#define BTN_SET_CALLER_IMAGE_WIDTH 86
-#define BTN_SET_CALLER_IMAGE_HEIGHT 86
-#if 1
- group {
- name: "crop_view_btn";
-
- images {
- image: "00_winset_control_toolbar_bg.png" COMP;
- }
-
- parts{
- part {
- name: "base";
- type: RECT;
- scale:1;
- mouse_events: 1;
- repeat_events: 1;
- description {
- state: "default" 0.0;
- color: 0 0 0 0;
- rel1.relative: 0.0 0.0;
- rel2.relative: 1.0 1.0;
- }
- }
- part { name: "controlbar_bg";
- scale: 1;
- description { state: "default" 0.0;
- min: 0 CONTROLBAR_SMALL_HEIGHT_INC;
- max: 999999 CONTROLBAR_SMALL_HEIGHT_INC;
- fixed: 0 1;
- align: 0.0 1.0;
- visible: 1;
- rel1 { to: "base"; }
- rel2 { to: "base"; }
- //image.normal: "00_winset_control_toolbar_bg.png";
- }
- description { state: "hide" 0.0;
- inherit: "default" 0.0;
- visible: 0;
- }
- }
- part { name: "controlbar_clip";
- type: RECT;
- mouse_events: 0;
- description { state: "default" 0.0;
- rel1.to: "controlbar_bg";
- rel2.to: "controlbar_bg";
- visible: 1;
- }
- description { state: "hide" 0.0;
- inherit: "default" 0.0;
- visible: 0;
- }
- }
- part { name: "elm.prev_btn_bg";
- type: RECT;
- scale: 1;
- clip_to: "controlbar_clip";
- description { state: "default" 0.0;
- min: 0 0;
- fixed: 1 0;
- align: 1.0 0.0;
- rel1 { relative: 1.0 0.0; to: "controlbar_bg"; }
- rel2.to: "controlbar_bg";
- visible: 0;
- }
- description { state: "visible" 0.0;
- inherit: "default" 0.0;
- min: NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 0;
- }
- }
- part { name: "elm.swallow.prev_btn";
- type: SWALLOW;
- scale: 1;
- clip_to: "controlbar_clip";
- description { state: "default" 0.0;
- fixed: 1 1;
- align: 0.5 0.5;
- rel1.to: "elm.prev_btn_bg";
- rel2.to: "elm.prev_btn_bg";
- }
- }
- part { name: "controlbar";
- type: SWALLOW;
- scale: 1;
- clip_to: "controlbar_clip";
- description { state: "default" 0.0;
- fixed: 1 1;
- rel1.to: "controlbar_bg";
- rel2 { relative: 0.0 1.0; to: "elm.prev_btn_bg"; }
- visible: 1;
- }
- }
-
- part {
- name: "selectioninfo";
- type: SWALLOW;
- description { state: "default" 0.0;
- fixed: 0 1;
- align: 0.5 1.0;
- rel1 {
- relative: 0.0 0.0; to:"controlbar_bg";
- }
- rel2 {
- relative: 1.0 0.0; to:"controlbar_bg";
- }
- }
- description { state: "hide" 0.0;
- inherit: "default" 0.0;
- visible: 0;
- }
- }
- }
-
- programs {
-
- program {
- name: "hide_menu";
- signal: "elm,state,hide";
- source: "event";
- action: STATE_SET "hide" 0.0;
- target: "controlbar_clip";
- target: "controlbar_bg";
- target: "selectioninfo";
- }
-
- program {
- name: "show_menu";
- signal: "elm,state,show";
- source: "event";
- action: STATE_SET "default" 0.0;
- target: "controlbar_clip";
- target: "controlbar_bg";
- target: "selectioninfo";
- }
- }
- }
-}
-
#include "ivug-debug.h"
#include "ivug-string.h"
#include "ivug-context.h"
+#include "ivug-db.h"
+
+#include "ivug-setas-view.h"
#undef LOG_LVL
#define LOG_LVL DBG_MSG_LVL_MED
evas_object_smart_callback_del(obj, "ok,clicked", _ivug_crop_view_ok_clicked_cb);
+ media_handle m_handle = NULL;
+
+ m_handle = ivug_db_insert_file_to_DB(path);
+ if(m_handle == NULL)
+ {
+ MSG_ERROR("ivug_db_insert_file_to_DB failed %s", path);
+ }
+ else
+ {
+ ivug_db_destroy_file_handle(m_handle);
+ }
+
_send_result(gGetUGHandle(), "crop_image_path", path, NULL, NULL);
MSG_HIGH("Start destroy ug");
ug_destroy_me(gGetUGHandle());
}
+static void _ivug_setas_crop_view_ok_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ char *path = (char *)event_info;
+
+ MSG_MAIN_HIGH("_ivug_setas_view_ok_clicked_cb path = %d", path);
+
+ evas_object_smart_callback_del(obj, "ok,clicked", _ivug_setas_crop_view_ok_clicked_cb);
+
+ // do not insert to db
+
+ int setas_data = (int)evas_object_data_get(obj, "setas_type");
+ ivug_set_screen_type type = (ivug_set_screen_type)setas_data;
+
+ int setas_mode = (int)evas_object_data_get(obj, "setas_mode");
+ ivug_setas_mode mode = (ivug_setas_mode)setas_mode;
+
+ const char* homescreen_path = IVUG_HOME_SCREEN_PATH;
+ const char* lockscreen_path = IVUG_LOCK_SCREEN_PATH;
+ const char* appsvc_home_path = IVUG_APPSVC_HOME_SCREEN_PATH;
+
+ if(mode == IVUG_SETAS_CROP)
+ {
+ ivug_copy_file(path, appsvc_home_path);
+ _send_result(gGetUGHandle(), "crop_image_path", appsvc_home_path, NULL, NULL);
+ }
+ else
+ {
+ if(type == IVUG_CTRLBAR_SET_SCREEN_HOME)
+ {
+ ivug_copy_file(path, homescreen_path);
+ ivug_config_set_homescreen_image(homescreen_path);
+ _send_result(gGetUGHandle(), "homescreen_path", homescreen_path, NULL, NULL);
+ }
+ else if(type == IVUG_CTRLBAR_SET_SCREEN_LOCK)
+ {
+ ivug_copy_file(path, lockscreen_path);
+ ivug_config_set_lockscreen_image(lockscreen_path);
+ _send_result(gGetUGHandle(), "lockscreen_path", lockscreen_path, NULL, NULL);
+ }
+ else if(type == IVUG_CTRLBAR_SET_SCREEN_BOTH)
+ {
+ ivug_copy_file(path, homescreen_path);
+ ivug_config_set_homescreen_image(homescreen_path);
+ ivug_copy_file(path, lockscreen_path);
+ ivug_config_set_lockscreen_image(lockscreen_path);
+ _send_result(gGetUGHandle(), "homescreen_path", homescreen_path, "lockscreen_path", lockscreen_path);
+ }
+ }
+
+ MSG_HIGH("Start destroy ug");
+ ug_destroy_me(gGetUGHandle());
+}
+
+
static void _ivug_crop_view_cancel_clicked_cb(void *data, Evas_Object *obj, void *event_info)
{
//ivug_crop_ug_destroy((IvugCropUG *)data);
{
IvugCropUG *crop_ug = (IvugCropUG *)data;
+ ivug_crop_view_destroy(crop_ug->crop_view);
+
crop_ug->crop_view = NULL;
}
return crop_ug;
}
+IvugCropUG * ivug_setas_crop_ug_create(Evas_Object *parent, const char *filepath, ivug_setas_mode mode, ivug_set_screen_type type)
+{
+ IvugCropUG *crop_ug = (IvugCropUG *)calloc(1, sizeof(IvugCropUG));
+ if(crop_ug == NULL)
+ {
+ MSG_ERROR("crop_ug calloc error");
+ return NULL;
+ }
+
+ IvugCropView *crop_view = NULL;
+ Evas_Object *layout = NULL;
+
+ crop_view = ivug_crop_view_create(parent);
+ if(crop_view == NULL)
+ {
+ MSG_ERROR("ivug_crop_view_create error");
+ free(crop_ug);
+ return NULL;
+ }
+
+ layout = ivug_crop_view_get_object(crop_view);
+
+ evas_object_smart_callback_add(layout, "ok,clicked", _ivug_setas_crop_view_ok_clicked_cb, crop_ug);
+ evas_object_smart_callback_add(layout, "cancel,clicked", _ivug_crop_view_cancel_clicked_cb, crop_ug);
+ evas_object_smart_callback_add(layout, "destroyed", _ivug_crop_view_destroyed_cb, crop_ug);
+ evas_object_smart_callback_add(layout, "download,failed", _on_msg_load_failed, crop_ug);
+ //evas_object_smart_callback_add(layout, "clicked", _ivug_crop_view_clicked_cb, crop_ug);
+
+ evas_object_data_set(layout, "setas_type", (void *)type);
+ evas_object_data_set(layout, "setas_mode", (void *)mode);
+
+ crop_ug->crop_view = crop_view;
+ crop_ug->layout = layout;
+ crop_ug->parent = parent;
+ crop_ug->filepath = strdup(filepath);
+
+ crop_ug->navi_bar = elm_naviframe_add(parent);
+
+#ifdef USE_CUSTOM_STYLE
+ elm_object_theme_set(crop_ug->navi_bar, gGetSystemTheme() );
+#endif
+ const char *profile = elm_config_profile_get();
+ if (!strcmp(profile,"mobile"))
+ {
+ elm_object_style_set(crop_ug->navi_bar, "ivug-main/default");
+ }
+ else if (!strcmp(profile,"desktop"))
+ {
+ elm_object_style_set(crop_ug->navi_bar, "ivug-main/noindicator");
+ }
+ else
+ {
+ MSG_MAIN_ERROR("Unknown profile : %s", profile);
+ }
+
+ evas_object_name_set(crop_ug->navi_bar, "Crop ug naviframe");
+
+// Layout life cycle is controlled by application explictily.
+ elm_naviframe_content_preserve_on_pop_set(crop_ug->navi_bar, EINA_TRUE);
+
+ Evas_Object *back_btn = ivug_button_add(crop_ug->navi_bar, "naviframe/end_btn/default",
+ IDS_BACK, NULL, on_crop_view_btn_back_clicked, crop_ug);
+
+ crop_ug->navi_it = elm_naviframe_item_push(crop_ug->navi_bar, IDS_LOADING, back_btn, NULL, crop_ug->layout, NULL);
+ elm_naviframe_item_title_visible_set(crop_ug->navi_it, EINA_FALSE);
+
+ int lcd_x = 0;
+ int lcd_y = 0;
+ int lcd_w = 0;
+ int lcd_h = 0;
+ int rot = 0;
+
+ ivug_crop_view_create_menu(crop_view, crop_ug->navi_bar);
+
+ ivug_crop_view_destination_set(crop_view, DATA_PATH, ".iv_setas.jpg");
+
+ evas_object_geometry_get((Evas_Object *)ug_get_window(), &lcd_x, &lcd_y, &lcd_w, &lcd_h);
+ rot = gGetRotationDegree();
+ if(rot == 90 || rot == 270)
+ {
+ int temp = lcd_w;
+ lcd_w = lcd_h;
+ lcd_h = temp;
+ }
+
+ ivug_crop_view_box_size_set(crop_view, lcd_w, lcd_h);
+
+ ivug_crop_view_box_ratio_fix(crop_view, true);
+
+ return crop_ug;
+}
+
Evas_Object * ivug_crop_ug_get_layout(IvugCropUG * crop_ug)
{
IV_ASSERT(crop_ug != NULL);
#define __IVUG_CROP_UG_H__
#include "ivug-crop-view.h"
+#include "ivug-setas-view.h"
typedef struct {
IvugCropView *crop_view;
IvugCropUG * ivug_crop_ug_create(Evas_Object *parent, int w, int h, bool bRatioFix, const char *filepath);
+IvugCropUG * ivug_setas_crop_ug_create(Evas_Object *parent, const char *filepath,
+ ivug_setas_mode mode, ivug_set_screen_type type);
+
Evas_Object * ivug_crop_ug_get_layout(IvugCropUG * crop_ug);
bool ivug_crop_ug_destroy(IvugCropUG * crop_ug);
}
else
{
+ if(data->view_by == IVUG_VIEW_BY_FOLDER)
+ {
+ MSG_IVUG_WARN("IVUG_VIEW_BY_FOLDER but index was not set");
+ data->start_index = IVUG_INVALID_INDEX;
+ }
+ else
+ {
data->start_index = IVUG_DEFAULT_INDEX;
+ }
MSG_IVUG_WARN("Slide Index is not set. Set as default : %d", data->start_index);
}
#define MENUBAR_TIMEOUT_SEC (5.0f) // 5sec
+/*
+ Final image path
+*/
+#define IVUG_HOME_SCREEN_PATH DATA_PATH"/.homescreen.jpg";
+#define IVUG_LOCK_SCREEN_PATH DATA_PATH"/.lockscreen.jpg";
+
+/*
+ Screen path for APPSVC
+*/
+#define IVUG_APPSVC_HOME_SCREEN_PATH DATA_PATH"/.iv_homescreen.jpg";
+
#endif /* __IVUG_COMMON_H__ */
Evas_Object *btn_back;
Evas_Object *contents_area;
+ Evas_Object *notify_area;
Evas_Object *btn_ok;
bool bShowMenu;
char *file_path;
char *result_path;
+ char *dest_dir;
+ char *dest_name;
+
int w;
int h;
bool ivug_crop_view_file_set(IvugCropView *pCropView, const char *file);
+bool ivug_crop_view_destination_set(IvugCropView *pCropView, const char *dir, const char *name);
+
void ivug_crop_view_destroy(IvugCropView *pCropView);
Evas_Object *ivug_crop_view_get_object(IvugCropView *pCropView);
direction = SLIDE_SHIFT_TO_LEFT;
}
- ivug_medialist_delete_item(sd->media_list, sd->slide[CENTER_SLIDE]->mitem); //delete data.
+ Media_Item *mitem = sd->slide[CENTER_SLIDE]->mitem;
+
ivug_slider_item_data_set(sd->slide[CENTER_SLIDE], NULL);
+ ivug_medialist_delete_item(sd->media_list, mitem); //delete data.
Media_Item* item = NULL;
else if(ugd->ivug_param->setas_type == IVUG_SET_AS_UG_TYPE_WALLPAPER)
{
type = IVUG_CTRLBAR_SET_SCREEN_HOME;
- ugd->setas_view = ivug_setas_view_screen_create(ugd->base, setas_mode, type);
+ ugd->crop_ug = ivug_setas_crop_ug_create(ugd->base, ugd->ivug_param->filepath,
+ setas_mode, type);
}
else if(ugd->ivug_param->setas_type == IVUG_SET_AS_UG_TYPE_LOCKSCREEN)
{
type = IVUG_CTRLBAR_SET_SCREEN_LOCK;
- ugd->setas_view = ivug_setas_view_screen_create(ugd->base, setas_mode, type);
+ ugd->crop_ug = ivug_setas_crop_ug_create(ugd->base, ugd->ivug_param->filepath,
+ setas_mode, type);
}
else if(ugd->ivug_param->setas_type == IVUG_SET_AS_UG_TYPE_WALLPAPER_N_LOCKSCREEN)
{
type = IVUG_CTRLBAR_SET_SCREEN_BOTH;
- ugd->setas_view = ivug_setas_view_screen_create(ugd->base, setas_mode, type);
+ ugd->crop_ug = ivug_setas_crop_ug_create(ugd->base, ugd->ivug_param->filepath,
+ setas_mode, type);
}
else if(ugd->ivug_param->setas_type == IVUG_SET_AS_UG_TYPE_WALLPAPER_CROP)
{
type = IVUG_CTRLBAR_SET_SCREEN_HOME;
setas_mode = IVUG_SETAS_CROP;
- ugd->setas_view = ivug_setas_view_screen_create(ugd->base, setas_mode, type);
+ ugd->crop_ug = ivug_setas_crop_ug_create(ugd->base, ugd->ivug_param->filepath,
+ setas_mode, type);
}
else if(ugd->ivug_param->setas_type == IVUG_SET_AS_UG_TYPE_CROP)
{
int lcd_x, lcd_y, lcd_w, lcd_h;
- evas_object_geometry_get(obj, &lcd_x, &lcd_y, &lcd_w, &lcd_h);
+ evas_object_geometry_get(pCropView->contents_area, &lcd_x, &lcd_y, &lcd_w, &lcd_h);
MSG_MED("lcd_x=%d, lcd_y=%d, lcd_w=%d, lcd_h=%d", lcd_x, lcd_y, lcd_w, lcd_h);
int ph, pw;
sx = (ext_w-img_w*zoom)/2 + dx;
sy = (ext_h-img_h*zoom)/2 + dy;
- ivug_scissorbox_boundary_set(pCropView->cropbox, (ext_w-img_w*zoom)/2, (ext_h-img_h*zoom)/2, img_w*zoom, img_h*zoom);
+ ivug_scissorbox_boundary_set(pCropView->cropbox, lcd_x+(ext_w-img_w*zoom)/2, lcd_y+(ext_h-img_h*zoom)/2, img_w*zoom, img_h*zoom);
///////////////////////////////////////////////////////////////////
evas_object_del(object);
}
- pCropView->notify = ivug_notify_static_create(pCropView->contents_area, IDS_CROP_NOTIFY, NOTIFY_ALIGN_BOTTOM);
+ pCropView->notify_area = const_cast<Evas_Object *>(edje_object_part_object_get(_EDJ(pCropView->layout),
+ "crop.contents.swallow.notify"));
+
+ pCropView->notify = ivug_notify_static_create(pCropView->notify_area, IDS_CROP_NOTIFY, NOTIFY_ALIGN_BOTTOM);
elm_object_disabled_set(pCropView->btn_ok, EINA_FALSE);
evas_object_hide(obj); // popup
evas_object_del(obj);
+ evas_object_smart_callback_call(pCropView->layout, "ok,clicked", pCropView->result_path);
+
// Remove view.
evas_object_smart_callback_call(pCropView->layout, "destroyed", NULL);
- evas_object_smart_callback_call(pCropView->layout, "ok,clicked", pCropView->result_path);
-
//ivug_crop_view_destroy(pCropView);
}
return style1_popup;
}
+static char * _ivug_crop_create_name(IvugCropView *pCropView)
+{
+ char tempname[IVUG_MAX_FILE_PATH_LEN+1] = {0,};
+ char *save_file = NULL;
+ char *name = NULL;
+
+ //evas encoder support jpg, png only
+ if(pCropView->dest_name)
+ {
+ char *dir = NULL;
+ if(pCropView->dest_dir)
+ {
+ dir = strdup(pCropView->dest_dir);
+ }
+ else
+ {
+ dir = ecore_file_dir_get(pCropView->file_path);
+ }
+ snprintf(tempname, sizeof(tempname), "%s/%s.jpg", dir, pCropView->dest_name);
+ free(dir);
+ save_file = strdup(tempname);
+ }
+ else
+ {
+ save_file = ivug_generate_file_name(pCropView->file_path, "jpg", pCropView->dest_dir);
+ }
+
+ return save_file;
+}
+
static void _on_btn_save(void *data, Evas_Object *obj, void *event_info)
{
IV_ASSERT(data != NULL);
int rx, ry, rw, rh;
Evas_Object *ret_image = NULL;
- media_handle m_handle = NULL;
-
- char* save_file = ivug_generate_file_name(pCropView->file_path, "jpg"); //evas encoder support jpg, png only
+ char* save_file = _ivug_crop_create_name(pCropView);
if(save_file == NULL)
{
}
}
- m_handle = ivug_db_insert_file_to_DB(save_file);
- if(m_handle == NULL)
- {
- MSG_ERROR("ivug_db_insert_file_to_DB failed %s", save_file);
- goto SAVE_FAILED;
- }
- else
- {
- ivug_db_destroy_file_handle(m_handle);
- }
-
pCropView->result_path = strdup(save_file);
_show_exit_popup(pCropView->layout, IDS_CROP, IDS_SUCCESS, (void *)pCropView);
return;
}
+static void _on_btn_cancel(void *data, Evas_Object *obj, void *event_info)
+{
+ IV_ASSERT(data != NULL);
+
+ IvugCropView *pCropView = static_cast<IvugCropView *>(data);
+
+ MSG_HIGH("Cancel clicked");
+
+ evas_object_smart_callback_call(pCropView->layout, "destroyed", NULL);
+
+ evas_object_smart_callback_call(pCropView->layout, "cancel,clicked", NULL);
+
+ ivug_crop_view_destroy(pCropView);
+}
+
static Evas_Event_Flags _finger_tap_end(void *data , void *event_info)
{
Elm_Gesture_Taps_Info *p = (Elm_Gesture_Taps_Info *) event_info;
MSG_SETAS_ERROR("Cannot create contets_area.");
}
- elm_object_part_content_set(pCropView->layout, "crop.contents", pCropView->contents_area);
+ elm_object_part_content_set(pCropView->layout, "crop.contents.swallow", pCropView->contents_area);
return pCropView;
}
return true;
}
+bool ivug_crop_view_destination_set(IvugCropView *pCropView, const char *dir, const char *name)
+{
+ MSG_HIGH("ivug_crop_view_destination_set, to %s", dir);
+ if(dir == NULL)
+ {
+ return false;
+ }
+
+ pCropView->dest_dir = strdup(dir);
+ pCropView->dest_name = strdup(name);
+
+ return true;
+}
+
void ivug_crop_view_destroy(IvugCropView *pCropView)
{
IV_ASSERT(pCropView != NULL);
pCropView->result_path = NULL;
}
+ if ( pCropView->dest_dir)
+ {
+ free(pCropView->dest_dir);
+ pCropView->dest_dir = NULL;
+ }
+
+ if ( pCropView->dest_name)
+ {
+ free(pCropView->dest_name);
+ pCropView->dest_name = NULL;
+ }
+
if ( pCropView->cropbox)
{
evas_object_del(pCropView->cropbox);
ivug_main_view_set_hide_timer(pMainView);
}
+static void
+_on_setasview_deleted(void *data, Evas *e , Evas_Object *obj , void *event_info )
+{
+ ivug_retm_if(!data, "data is NULL");
+ Ivug_MainView *pMainView = (Ivug_MainView *)data;
+ MSG_MAIN_HIGH("SetAS View is destroyed");
+
+ pMainView->pSetAsView = NULL;
+
+ ivug_main_view_set_hide_timer(pMainView);
+}
+
static void _on_setas_view_destroyed(void *data, Evas_Object *obj, void *event_info)
{
IV_ASSERT(data != NULL);
evas_object_del(obj);
}
+static void _ivug_crop_view_destroyed_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+ ivug_main_view_set_hide_timer(pMainView);
+
+ elm_naviframe_item_pop(pMainView->navi_bar);
+ pMainView->navi_it = elm_naviframe_top_item_get(pMainView->navi_bar);
+
+ ivug_crop_view_destroy(pMainView->pCropView);
+
+ pMainView->pCropView = NULL;
+
+ elm_naviframe_item_title_visible_set(pMainView->navi_it, EINA_TRUE);
+}
+
+#if 0
static void _create_setas_view(Ivug_MainView *pMainView, const char *filepath, ivug_set_screen_type type)
{
- pMainView->pSetAsView = ivug_setas_view_screen_create(pMainView->layout, IVUG_SETAS_NORMAL, type);
+ pMainView->pSetAsView = ivug_setas_view_screen_create(pMainView->layout, filepath,
+ IVUG_SETAS_NORMAL, type);
Evas_Object *setasOjbect = ivug_setas_view_object_get(pMainView->pSetAsView);
+ //evas_object_event_callback_add(setasOjbect, EVAS_CALLBACK_DEL, _on_setasview_deleted, pMainView);
evas_object_smart_callback_add(setasOjbect, "destroy", _on_setas_view_destroyed, pMainView);
Evas_Object *back_btn = ivug_button_add(pMainView->navi_bar, "naviframe/end_btn/default",
NULL, back_btn, NULL, setasOjbect, NULL);
ivug_setas_view_create_menu(pMainView->pSetAsView, pMainView->navi_bar, type);
+}
+#else
+
+static void _ivug_crop_view_ok_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ char *path = (char *)event_info;
+ media_handle m_handle = NULL;
+
+ MSG_MAIN_HIGH("_ivug_crop_view_ok_clicked_cb path = %d", path);
+
+ evas_object_smart_callback_del(obj, "ok,clicked", _ivug_crop_view_ok_clicked_cb);
- ivug_setas_view_load_file(pMainView->pSetAsView, filepath, type);
+ m_handle = ivug_db_insert_file_to_DB(path);
+ if(m_handle == NULL)
+ {
+ MSG_MAIN_ERROR("ivug_db_insert_file_to_DB failed %s", path);
+ }
+ else
+ {
+ ivug_db_destroy_file_handle(m_handle);
+}
}
+static void _ivug_setas_view_ok_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ char *path = (char *)event_info;
+
+ MSG_MAIN_HIGH("_ivug_setas_view_ok_clicked_cb path = %d", path);
+
+ evas_object_smart_callback_del(obj, "ok,clicked", _ivug_crop_view_ok_clicked_cb);
+
+ // do not insert to db
+
+ int setas_data = (int)evas_object_data_get(obj, "setas_type");
+ ivug_set_screen_type type = (ivug_set_screen_type)setas_data;
+
+ const char* homescreen_path = IVUG_HOME_SCREEN_PATH;
+ const char* lockscreen_path = IVUG_LOCK_SCREEN_PATH;
+
+ if(type == IVUG_CTRLBAR_SET_SCREEN_HOME)
+ {
+ ivug_copy_file(path, homescreen_path);
+ ivug_config_set_homescreen_image(homescreen_path);
+ }
+ else if(type == IVUG_CTRLBAR_SET_SCREEN_LOCK)
+ {
+ ivug_copy_file(path, lockscreen_path);
+ ivug_config_set_lockscreen_image(lockscreen_path);
+ }
+ else if(type == IVUG_CTRLBAR_SET_SCREEN_BOTH)
+ {
+ ivug_copy_file(path, homescreen_path);
+ ivug_config_set_homescreen_image(homescreen_path);
+ ivug_copy_file(path, lockscreen_path);
+ ivug_config_set_lockscreen_image(lockscreen_path);
+ }
+}
+
+static void _create_setas_view(Ivug_MainView *pMainView, const char *filepath, ivug_set_screen_type type)
+{
+ IvugCropView *pCropView = ivug_crop_view_create(pMainView->layout);
+ int lcd_x = 0;
+ int lcd_y = 0;
+ int lcd_w = 0;
+ int lcd_h = 0;
+ int rot = 0;
+
+ Evas_Object *layout = ivug_crop_view_get_object(pCropView);
+
+ evas_object_smart_callback_add(layout, "ok,clicked", _ivug_setas_view_ok_clicked_cb, pMainView);
+ evas_object_smart_callback_add(layout, "destroyed", _ivug_crop_view_destroyed_cb, pMainView);
+
+ evas_object_data_set(layout, "setas_type", (void *)type);
+
+ Evas_Object *btn_back = ivug_button_add(layout, "naviframe/end_btn/default",
+ IDS_BACK, NULL, _ivug_crop_view_destroyed_cb, pMainView);
+
+ pMainView->navi_it = elm_naviframe_item_push(pMainView->navi_bar, NULL, btn_back, NULL, pCropView->layout, NULL);
+
+ ivug_crop_view_create_menu(pCropView, pMainView->navi_bar);
+
+ ivug_crop_view_file_set(pCropView, filepath);
+
+ ivug_crop_view_destination_set(pCropView, DATA_PATH, ".iv_setas.jpg");
+
+ evas_object_geometry_get((Evas_Object *)ug_get_window(), &lcd_x, &lcd_y, &lcd_w, &lcd_h);
+ rot = gGetRotationDegree();
+ if(rot == 90 || rot == 270)
+ {
+ int temp = lcd_w;
+ lcd_w = lcd_h;
+ lcd_h = temp;
+ }
+
+ ivug_crop_view_box_size_set(pCropView, lcd_w, lcd_h);
+
+ ivug_crop_view_box_ratio_fix(pCropView, true);
+
+ pMainView->pCropView = pCropView;
+
+ elm_naviframe_item_title_visible_set(pMainView->navi_it, EINA_FALSE);
+}
+#endif
+
void _on_setas_selected(void *data, Evas_Object *obj, void *event_info)
{
IV_ASSERT(data != NULL);
if(ecore_file_exists(dest_file))
{
MSG_MAIN_WARN("file already exist");
- temp_filename = ivug_generate_file_name(dest_file, NULL);
+ temp_filename = ivug_generate_file_name(dest_file, NULL, NULL);
snprintf(dest_file, IVUG_MAX_FILE_PATH_LEN, "%s/%s", DEFAULT_DOWNLOADS_FOLDER, ecore_file_file_get(temp_filename));
free(temp_filename);
}
}
}
-static void _ivug_crop_view_destroyed_cb(void *data, Evas_Object *obj, void *event_info)
-{
- Ivug_MainView *pMainView = (Ivug_MainView *)data;
-
- ivug_main_view_set_hide_timer(pMainView);
-
- elm_naviframe_item_pop(pMainView->navi_bar);
- pMainView->navi_it = elm_naviframe_top_item_get(pMainView->navi_bar);
-
- ivug_crop_view_destroy(pMainView->pCropView);
-
- pMainView->pCropView = NULL;
-}
-
static void
_on_crop_selected(void *data, Evas_Object *obj)
{
Evas_Object *layout = ivug_crop_view_get_object(pCropView);
+ evas_object_smart_callback_add(layout, "ok,clicked", _ivug_crop_view_ok_clicked_cb, pMainView);
evas_object_smart_callback_add(layout, "destroyed", _ivug_crop_view_destroyed_cb, pMainView);
Evas_Object *btn_back = ivug_button_add(layout, "naviframe/end_btn/default",
ivug_crop_view_file_set(pCropView, mdata->filepath);
pMainView->pCropView = pCropView;
+
+ elm_naviframe_item_title_visible_set(pMainView->navi_it, EINA_FALSE);
}
#include <Ecore_File.h>
NULL, NULL, on_btn_more_clicked, pMainView);
elm_object_item_part_content_set(pMainView->navi_it, "toolbar_more_btn", btn_more);
- pMainView->btn_share = ivug_button_add(pMainView->navi_bar, "naviframe/toolbar/default",
+ pMainView->btn_share = ivug_button_add(pMainView->navi_bar, "naviframe/toolbar/left",
IDS_SHARE, NULL, on_btn_share_clicked, pMainView);
elm_object_item_part_content_set(pMainView->navi_it, "toolbar_button1", pMainView->btn_share);
- Evas_Object *btn_del = ivug_button_add(pMainView->navi_bar, "naviframe/toolbar/default",
+ Evas_Object *btn_del = ivug_button_add(pMainView->navi_bar, "naviframe/toolbar/right",
IDS_DELETE, NULL, on_btn_delete_clicked, pMainView);
elm_object_item_part_content_set(pMainView->navi_it, "toolbar_button2", btn_del);
}
}
static void
+_on_invalid_name_timeout_response(void *data, Evas_Object *obj, void *event_info)
+{
+ IV_ASSERT(data != NULL);
+
+ Ivug_NameView *pNameView = (Ivug_NameView *)data;
+
+ ecore_imf_context_input_panel_show(elm_entry_imf_context_get(pNameView->entry));
+}
+
+static void
_ivug_rename_view_enter_click_cb(void *data, Evas_Object *obj, void *event_info)
{
MSG_IMAGEVIEW_HIGH("inside ...");
elm_object_part_text_set(pNameView->editfield, "elm.guidetext", IDS_ENTER_NAME);
//elm_object_disabled_set(pNameView->btn_done, EINA_TRUE);
}
+ else if(ivug_validate_file_name(content) == false)
+ {
+ MSG_IMAGEVIEW_HIGH("invalid char ISF : %s", content);
+ char *new_str = strdup(content);
+ if (new_str) {
+ if (strlen(content) > 0)
+ new_str[strlen(content) - 1] = '\0';
+ elm_entry_entry_set(pNameView->entry, new_str);
+ elm_entry_cursor_end_set(pNameView->entry);
+ free(new_str);
+ new_str = NULL;
+ }
+ ecore_imf_context_input_panel_hide(elm_entry_imf_context_get(pNameView->entry));
+ ivug_timeout_popup_show(pNameView->layout, _on_invalid_name_timeout_response,
+ pNameView, NULL, IDS_INVALID_NAME);
+ }
else
{
MSG_IMAGEVIEW_HIGH("ISF : %s", content);
MSG_IMAGEVIEW_HIGH("Entry changed by user");
}
+static void _ivug_name_view_on_entry_preedit_changed(void *data, Evas_Object *obj, void *event_info)
+{
+ MSG_IMAGEVIEW_HIGH("_ivug_name_view_on_entry_preedit_changed");
+}
+
static void _ivug_name_view_on_entry_focused(void *data, Evas_Object *obj, void *event_info)
{
MSG_IMAGEVIEW_HIGH("_ivug_name_view_on_entry_focused");
evas_object_smart_callback_add(entry, "activated", _ivug_rename_view_enter_click_cb, pNameView);
evas_object_smart_callback_add(entry, "changed", _ivug_name_view_on_entry_changed, pNameView);
+ evas_object_smart_callback_add(entry, "preedit,changed", _ivug_name_view_on_entry_preedit_changed, pNameView);
evas_object_smart_callback_add(entry, "changed,user", _ivug_name_view_on_entry_changed_user, pNameView);
evas_object_smart_callback_add(entry, "focused", _ivug_name_view_on_entry_focused, editfield);
evas_object_smart_callback_add(entry, "unfocused", _ivug_name_view_on_entry_unfocused, editfield);
Evas_Object *cancel_button, *done_button;
- cancel_button = ivug_button_add(navi_bar, "naviframe/title/icon/previous", NULL, NULL, _ivug_name_view_cancel_cb, pNameView );
+ cancel_button = ivug_button_add(navi_bar, "naviframe/end_btn/default", NULL, NULL, _ivug_name_view_cancel_cb, pNameView );
- done_button = ivug_button_add(navi_bar, "naviframe/title/icon/plus", NULL, NULL, _ivug_name_view_done_cb, pNameView );
+ done_button = ivug_button_add(navi_bar, "naviframe/toolbar/default", IDS_DONE, NULL, _ivug_name_view_done_cb, pNameView );
pNameView->btn_done = done_button;
//ivug_name_view_set_focus(pNameView);
- elm_object_item_part_content_set(navi_it, "title_left_btn", done_button);
- elm_object_item_part_content_set(navi_it, "title_right_btn", cancel_button);
+ elm_object_item_part_content_set(navi_it, "title_toolbar_button1", done_button);
+ elm_object_item_part_content_set(navi_it, "title_prev_btn", cancel_button);
+ elm_object_item_signal_emit(navi_it, "elm,state,sip,shown", "");
return pNameView;
}
#define IVUG_RESULT_BUNDLE_KEY_ERROR "Error"
#define IVUG_RESULT_BUNDLE_VALUE_NOT_SUPPORTED "not_supported_file_type"
-
-/*
- Final image path
-*/
-#define IVUG_HOME_SCREEN_PATH DATA_PATH"/.homescreen.jpg";
-#define IVUG_LOCK_SCREEN_PATH DATA_PATH"/.lockscreen.jpg";
-
-/*
- Screen path for APPSVC
-*/
-#define IVUG_APPSVC_HOME_SCREEN_PATH DATA_PATH"/.iv_homescreen.jpg";
-
-
/*
Caller ID image
*/
Evas_Coord_Rectangle box_rect;
evas_object_geometry_get(pSetAsView->content, &(box_rect.x), &(box_rect.y), &(box_rect.w), &(box_rect.h) );
- MSG_SETAS_HIGH("Rect XYWH(%d,%d,%d,%d)", box_rect.x, box_rect.y, box_rect.w , box_rect.h);
+ MSG_SETAS_HIGH("Conetent area XYWH(%d,%d,%d,%d)", box_rect.x, box_rect.y, box_rect.w , box_rect.h);
// LCD Image
Evas_Object *image = NULL;
char* fileurl; // file url.
char* filepath; // file path in local file system.
char* drm_filepath;
+
+ Ivug_DB_h *thumb_handle;
} Media_Data;
/* Opaque pointer for media list. */
typedef void Media_List;
+typedef bool (*ivug_medialist_cb)(Media_List *mList, void *data);
+
#ifdef __cplusplus
extern "C" {
#endif
Media_List * ivug_medialist_create();
-Media_Item *ivug_medialist_load(Media_List *mList, const Filter_struct *filter);
+bool ivug_medialist_set_callback(Media_List *mList, ivug_medialist_cb callback, void *data);
+Media_Item *ivug_medialist_load(Media_List *mList, const Filter_struct *filter);
void ivug_medialist_del(Media_List *mList);
}
}
+static void _ivug_mediadata_thumbnail_cb(media_handle media, const char *path, void *data)
+{
+ MSG_SDATA_ERROR("_ivug_mediadata_thumbnail_cb, path = %s", path);
+
+ Media_Data *mdata = (Media_Data *)data;
+
+ mdata->thumbnail_path = strdup(path);
+
+ ivug_db_cancel_thumbnail(mdata->thumb_handle);
+
+ mdata->thumb_handle = NULL;
+}
+
Media_Data *ivug_alloc_mediadata_from_media_handle(media_handle media)
{
IV_ASSERT(media != NULL);
MSG_SDATA_ERROR("media_info_foreach_media_from_db is failed, err = %s", _strerror_db(ret));
goto ALLOC_MHANDLE_ERROR;
}
+ if(mdata->thumbnail_path == NULL)
+ {
+ MSG_SDATA_ERROR("thumbnail is NULL, request to DB");
+ mdata->thumb_handle = ivug_db_create_thumbnail(mdata->m_handle, _ivug_mediadata_thumbnail_cb, mdata);
+ }
#if 0
// Useless codes because media_info_get_thumbnail_path() never failed.
IV_ASSERT(mdata != NULL);
#ifdef USE_NEW_DB_API
+ if (mdata->thumb_handle)
+ {
+ ivug_db_cancel_thumbnail(mdata->thumb_handle);
+ mdata->thumb_handle = NULL;
+ }
+
if(mdata->m_handle)
{
media_info_destroy(mdata->m_handle);
Eina_List *shufflelist; // Shuffle liste
+ Ecore_Job *callback_job;
+ ivug_medialist_cb cb; // loaded callback
+ void *data;
} _Media_List;
return (index / LOAD_BLOCK_COUNT);
}
-static Eina_List *_load_block(const Filter_struct *filter, int block_num)
+static Eina_List *_load_partial(const Filter_struct *filter, int stp, int endp)
{
- int stp = block_num * LOAD_BLOCK_COUNT;
- int endp = ((block_num + 1) * LOAD_BLOCK_COUNT) - 1;
-
Eina_List *header = NULL;
#ifdef UT_USE_DB
}
#endif
+ MSG_SDATA_HIGH("Loaded : %d ~ %d", stp, endp);
+
+ return header;
+}
+
+static Eina_List *_load_block(const Filter_struct *filter, int block_num)
+{
+ int stp = block_num * LOAD_BLOCK_COUNT;
+ int endp = ((block_num + 1) * LOAD_BLOCK_COUNT) - 1;
+
+ Eina_List *header = _load_partial(filter, stp, endp);
+
MSG_SDATA_HIGH("Loaded block : %d", block_num);
return header;
}
+static void _job_send_cb(void *data)
+{
+ IV_ASSERT(data != NULL);
+
+ _Media_List *_mList = (_Media_List *)data;
+ if(_mList->cb)
+ {
+ _mList->cb(_mList, _mList->data);
+ }
+}
+
+static void _call_loaded_callback(_Media_List *_mList)
+{
+ IV_ASSERT(_mList != NULL);
+
+ if(_mList->callback_job)
+ ecore_job_del(_mList->callback_job);
+
+ _mList->callback_job = ecore_job_add(_job_send_cb, _mList);
+}
static void _doLoad(Ecore_Thread *thread, _Media_List *_mList, const Filter_struct *filter, int center, int max_block)
{
PERF_CHECK_END(LVL3, "Deffered loading");
ivug_data_filter_delete(pParam->filter_str);
+
+ _call_loaded_callback(pParam->_mList);
}
static void loader_cancel(void *data, Ecore_Thread *thread)
}
#endif
+static void _create_shuffle_list(_Media_List *_mList)
+{
+ int i;
+ _mList->shufflelist = NULL;
+ for ( i = 0; i < _mList->count; i++)
+ {
+ _mList->shufflelist = eina_list_append(_mList->shufflelist, (void *)i);
+ }
+
+ _mList->shufflelist = eina_list_sort(_mList->shufflelist, eina_list_count(_mList->shufflelist), _sort_cb);
+}
Media_List *ivug_medialist_create()
{
return (Media_List *)_mList;
}
+bool ivug_medialist_set_callback(Media_List *mList, ivug_medialist_cb callback, void *data)
+{
+ IV_ASSERT(mList != NULL);
+
+ _Media_List *_mList = (_Media_List *)mList;
+ _mList->cb = callback;
+ _mList->data = data;
+
+ return true;
+}
+
Media_Item * ivug_medialist_find_item_by_filename(Media_List *mList, const char* filepath)
{
IV_ASSERT(mList != NULL);
PERF_CHECK_BEGIN(LVL3, "MediaList - shuffle");
- int i;
- _mList->shufflelist = NULL;
- for ( i = 0; i < _mList->count; i++)
- {
- _mList->shufflelist = eina_list_append(_mList->shufflelist, (void *)i);
- }
-
- _mList->shufflelist = eina_list_sort(_mList->shufflelist, eina_list_count(_mList->shufflelist), _sort_cb);
+ _create_shuffle_list(_mList);
PERF_CHECK_END(LVL3, "MediaList - shuffle");
if ( block_max == 0 && eina_list_count(_mList->header) < LOAD_BLOCK_COUNT )
{
MSG_SDATA_HIGH("Deffered loading is not needed. BolckMax=%d FirstBlockCount=%d", block_max, eina_list_count(_mList->header));
+ _call_loaded_callback(_mList);
return (Media_Item *)current;
}
MSG_SDATA_HIGH("Removing all media data");
+ if(_mList->callback_job)
+ {
+ ecore_job_del(_mList->callback_job);
+ }
+
if ( _mList->thread )
{
MSG_SDATA_HIGH("1. Thread cancel");
#define IDS_ADD_NAME _("Add name")
#define IDS_SET_AS_CALLER_ID _("Set as caller ID")
-#define IDS_LIVE_BOX _("Live Box")
#define IDS_MMS _("MMS")
-#define IDS_NO_FACE_DETECTED _("No face detected")
+#define IDS_INVALID_NAME _("Invalid name")
#define IDS_ORIENTATION _("Orientation")
#define IDS_MANUFACTURE _("Manufacture")