#include "gallery-efl.h"
/**< Evas smart objects' "smart callback" function signature */
-typedef void (*But_Smart_Cb) (void *data, Evas_Object *obj, void *event_info);
+typedef void (*But_Smart_Cb)(void *data, Evas_Object *obj, void *event_info);
Evas_Object *_ge_but_create_but(Evas_Object *parent, Elm_Theme *theme,
- const char *icon, const char *text,
- const char *style, But_Smart_Cb cb_func,
- const void *data);
+ const char *icon, const char *text,
+ const char *style, But_Smart_Cb cb_func,
+ const void *data);
Evas_Object *_ge_but_create_image_but(Evas_Object *parent, const char *icon,
- const char *text, const char *style,
- Evas_Smart_Cb cb_func, void *data,
- Eina_Bool flag_propagate);
+ const char *text, const char *style,
+ Evas_Smart_Cb cb_func, void *data,
+ Eina_Bool flag_propagate);
#endif /* _GE_BUTTON_H_ */
#define GE_TYPE_MEDIA (0x55553)
#define GE_TYPE_WEB_MEDIA (0x55554)
-typedef enum
-{
+typedef enum {
GE_PHONE,/**< Stored only in phone */
GE_MMC, /**< Stored only in MMC */
GE_ALL, /**< Stored in ALL albums */
GE_ALBUM_LIST_ALL, /**< Get all albums except Camera and Downloads */
} ge_album_list_e;
-typedef enum
-{
+typedef enum {
GE_ALBUM_SNS_NONE,
GE_ALBUM_SNS_PICASA,
GE_ALBUM_SNS_FACEBOOK,
bool _ge_db_update_reg_cb(ge_ugdata *ugd);
bool _ge_db_update_finalize(ge_ugdata *ugd);
int _ge_db_update_get_info(void *data,
- media_content_db_update_item_type_e *update_item,
- media_content_db_update_type_e *update_type);
+ media_content_db_update_item_type_e *update_item,
+ media_content_db_update_type_e *update_type);
#endif //_GE_DB_UPDATE_H_
#endif
#define ge_warn_if(expr, fmt, arg...) do { \
- if (expr) { \
- ge_dbg("(%s) -> "fmt, #expr, ##arg); \
- } \
- } while (0)
+ if (expr) { \
+ ge_dbg("(%s) -> "fmt, #expr, ##arg); \
+ } \
+ } while (0)
#define ge_ret_if(expr) do { \
- if (expr) { \
- ge_dbgE("(%s) -> %s() return", #expr, __FUNCTION__); \
- return; \
- } \
- } while (0)
+ if (expr) { \
+ ge_dbgE("(%s) -> %s() return", #expr, __FUNCTION__); \
+ return; \
+ } \
+ } while (0)
#define ge_retv_if(expr, val) do { \
- if (expr) { \
- ge_dbgE("(%s) -> %s() return", #expr, __FUNCTION__); \
- return (val); \
- } \
- } while (0)
+ if (expr) { \
+ ge_dbgE("(%s) -> %s() return", #expr, __FUNCTION__); \
+ return (val); \
+ } \
+ } while (0)
#define ge_retm_if(expr, fmt, arg...) do { \
- if (expr) { \
- ge_dbgE(fmt, ##arg); \
- ge_dbgE("(%s) -> %s() return", #expr, __FUNCTION__); \
- return; \
- } \
- } while (0)
+ if (expr) { \
+ ge_dbgE(fmt, ##arg); \
+ ge_dbgE("(%s) -> %s() return", #expr, __FUNCTION__); \
+ return; \
+ } \
+ } while (0)
#define ge_retvm_if(expr, val, fmt, arg...) do { \
- if (expr) { \
- ge_dbgE(fmt, ##arg); \
- ge_dbgE("(%s) -> %s() return", #expr, __FUNCTION__); \
- return (val); \
- } \
- } while (0)
+ if (expr) { \
+ ge_dbgE(fmt, ##arg); \
+ ge_dbgE("(%s) -> %s() return", #expr, __FUNCTION__); \
+ return (val); \
+ } \
+ } while (0)
#define GE_CHECK_VAL(expr, val) ge_retvm_if(!(expr), val, "Invalid parameter, return ERROR code!")
int _ge_local_data_get_album_by_path(char *path, ge_album_s **album);
int _ge_local_data_get_album_list(ge_filter_s *condition, Eina_List **elilst);
int _ge_local_data_get_media_count(const char *cluster_id, ge_filter_s *filter,
- int *item_cnt);
+ int *item_cnt);
int _ge_local_data_get_all_media_count(ge_filter_s *filter, int *item_cnt);
int _ge_local_data_get_media(const char *media_id, ge_media_s **mitem);
int _ge_local_data_get_album_cover(char *album_id, ge_filter_s *condition,
- Eina_List **elist);
+ Eina_List **elist);
int _ge_local_data_get_all_albums_cover(ge_filter_s *condition,
- Eina_List **elist);
+ Eina_List **elist);
int _ge_local_data_get_album_media_list(char *album_id, ge_filter_s *condition,
- Eina_List **elist);
+ Eina_List **elist);
int _ge_local_data_get_all_albums_media_list(ge_filter_s *condition,
- Eina_List **elist);
+ Eina_List **elist);
int _ge_local_data_get_album_by_id(char *album_id, ge_album_s **cluster);
int _ge_local_data_get_media_by_id(char *media_id, ge_media_s **mitem);
int _ge_local_data_get_duration(media_info_h media, int *duration);
#include "ge-ugdata.h"
-typedef enum _ge_ctrl_tab_mode
-{
+typedef enum _ge_ctrl_tab_mode {
GE_CTRL_TAB_ALBUMS,
GE_CTRL_TAB_CNT,
} ge_ctrl_tab_mode;
GE_TILE_TYPE_PEOPLE, /* People album */
} ge_tile_type;
-typedef enum
-{
+typedef enum {
GE_ICON_NORMAL,
GE_ICON_CORRUPTED_FILE
-}ge_icon_type;
+} ge_icon_type;
typedef ge_icon_type (*bg_file_set_cb)(Evas_Object *bg, void *data);
Evas_Object *_ge_tile_show_part_icon(Evas_Object *obj, const char *part,
- int length, bg_file_set_cb func,
- void *data);
+ int length, bg_file_set_cb func,
+ void *data);
int _ge_tile_update_item_size(ge_ugdata *ugd, Evas_Object *grid,
- int rotate_mode, bool b_update);
+ int rotate_mode, bool b_update);
Evas_Object *_ge_tile_show_part_type_icon(Evas_Object *obj, int type);
#endif //_GE_TILE_H_
#define _EDJ(o) elm_layout_edje_get(o)
#define _GE_GET_ICON(_path) \
- ((1 == ge_file_exists(_path) && (ge_file_size(_path) > 0)) ? _path : GE_ICON_NO_THUMBNAIL)
+ ((1 == ge_file_exists(_path) && (ge_file_size(_path) > 0)) ? _path : GE_ICON_NO_THUMBNAIL)
#define _GE_GET_APP_ICON(_path) \
- ((1 == ge_file_exists(_path) && (ge_file_size(_path) > 0)) ? _path : GE_DEFAULT_APP_ICON)
+ ((1 == ge_file_exists(_path) && (ge_file_size(_path) > 0)) ? _path : GE_DEFAULT_APP_ICON)
typedef enum {
GE_POPUP_NOBUT,
(path && (1 == ge_file_exists(path)) && (ge_file_size(path) > 0))
#define GE_ICON_SET_FILE(icon, img) \
- elm_image_file_set(icon, GE_IMAGES_EDJ_FILE, img)
+ elm_image_file_set(icon, GE_IMAGES_EDJ_FILE, img)
void _ge_set_current_item(ge_item* gitem);
ge_view_mode _ge_get_view_mode(ge_ugdata *ugd);
int _ge_set_view_mode(ge_ugdata *ugd, ge_view_mode mode);
double _ge_get_win_factor(Evas_Object *win, bool b_hide_indicator, int *width,
- int *height);
+ int *height);
int _ge_addhome_image(ge_ugdata *ugd, char *path);
int _ge_send_result(ge_ugdata *ugd);
int _ge_atoi(const char *number);
ge_media_s *item = NULL;
Eina_List *tmp_list = *list;
EINA_LIST_FREE(tmp_list, item) {
- if (item)
+ if (item) {
__ge_data_type_free_media(&item);
+ }
}
*list = NULL;
return 0;
ge_album_s *item = NULL;
Eina_List *tmp_list = *list;
EINA_LIST_FREE(tmp_list, item) {
- if (item)
+ if (item) {
__ge_data_type_free_album(&item);
+ }
}
*list = NULL;
return 0;
GE_CHECK_VAL(*item, -1);
int ret = -1;
- if (((ge_album_s *)*item)->gtype == GE_TYPE_ALBUM)
+ if (((ge_album_s *)*item)->gtype == GE_TYPE_ALBUM) {
ret = __ge_data_type_free_album((ge_album_s **)item);
- else if (((ge_media_s *)*item)->gtype == GE_TYPE_MEDIA ||
- ((ge_media_s *)*item)->gtype == GE_TYPE_WEB_MEDIA)
+ } else if (((ge_media_s *)*item)->gtype == GE_TYPE_MEDIA ||
+ ((ge_media_s *)*item)->gtype == GE_TYPE_WEB_MEDIA) {
ret = __ge_data_type_free_media((ge_media_s **)item);
+ }
- if (ret < 0)
+ if (ret < 0) {
return -1;
- else
+ } else {
return 0;
+ }
}
ge_cluster_list *_ge_data_util_calloc_clusters_list(void)
{
ge_cluster_list* clus_list = (ge_cluster_list*)calloc(1,
- sizeof(ge_cluster_list));
+ sizeof(ge_cluster_list));
GE_CHECK_NULL(clus_list);
return clus_list;
}
if (cond && strlen(cond) > 0) {
ret = media_filter_set_condition(_filter, cond,
- MEDIA_CONTENT_COLLATE_NOCASE);
+ MEDIA_CONTENT_COLLATE_NOCASE);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
ge_dbgE("Fail to set condition!");
goto GE_DATA_UTIL_FAILED;
if (keyword && strlen(keyword) > 0) {
media_content_order_e order_type = MEDIA_CONTENT_ORDER_DESC;
- if (!g_strcmp0(MEDIA_DISPLAY_NAME, keyword))
+ if (!g_strcmp0(MEDIA_DISPLAY_NAME, keyword)) {
order_type = MEDIA_CONTENT_ORDER_ASC;
+ }
ret = media_filter_set_order(_filter, order_type, keyword,
- MEDIA_CONTENT_COLLATE_NOCASE);
+ MEDIA_CONTENT_COLLATE_NOCASE);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
ge_dbgE("Fail to set order!");
goto GE_DATA_UTIL_FAILED;
*filter = _filter;
return 0;
- GE_DATA_UTIL_FAILED:
+GE_DATA_UTIL_FAILED:
if (_filter) {
media_filter_destroy(_filter);
if (strlen(condition->cond) > 0) {
ret = media_filter_set_condition(tmp_filter, condition->cond,
- condition->collate_type);
+ condition->collate_type);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
ge_dbgE("Fail to set condition!");
goto GE_DATA_UTIL_FAILED;
if (strlen(condition->sort_keyword) > 0) {
ret = media_filter_set_order(tmp_filter, condition->sort_type,
- condition->sort_keyword,
- condition->collate_type);
+ condition->sort_keyword,
+ condition->collate_type);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
ge_dbgE("Fail to set order!");
goto GE_DATA_UTIL_FAILED;
ge_dbg("offset: %d, count: %d", condition->offset, condition->count);
if (condition->offset != -1) {
ret = media_filter_set_offset(tmp_filter, condition->offset,
- condition->count);
+ condition->count);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
ge_dbgE("Fail to set offset!");
goto GE_DATA_UTIL_FAILED;
*filter = tmp_filter;
return 0;
- GE_DATA_UTIL_FAILED:
+GE_DATA_UTIL_FAILED:
if (tmp_filter) {
media_filter_destroy(tmp_filter);
}
bool _ge_data_util_clone_media(media_info_h media, ge_media_s **pitem,
- bool b_meta)
+ bool b_meta)
{
GE_CHECK_FALSE(pitem);
ge_media_s *item = NULL;
ge_dbgE("Get storage type failed!");
goto GE_DATA_UTIL_FAILED;
}
- if (storage_type == MEDIA_CONTENT_STORAGE_INTERNAL) /* The device's internal storage */
+ if (storage_type == MEDIA_CONTENT_STORAGE_INTERNAL) { /* The device's internal storage */
item->storage_type = GE_PHONE;
- else if (storage_type == MEDIA_CONTENT_STORAGE_EXTERNAL) /* The device's external storage */
+ } else if (storage_type == MEDIA_CONTENT_STORAGE_EXTERNAL) { /* The device's external storage */
item->storage_type = GE_MMC;
- else
+ } else {
ge_dbgE("Undefined mode[%d]!", storage_type);
+ }
*pitem = item;
return true;
- GE_DATA_UTIL_FAILED:
+GE_DATA_UTIL_FAILED:
_ge_data_type_free_geitem((void **)(&item));
return false;
/** @cond is allocated by caller, maybe it's an array */
int _ge_data_util_get_geo_cond(char *cond, double longmin, double longmax,
- double latmin, double latmax)
+ double latmin, double latmax)
{
GE_CHECK_VAL(cond, -1);
int ret = -1;
if (long_max == NULL || long_min == NULL || lat_max == NULL ||
- lat_min == NULL) {
+ lat_min == NULL) {
ge_dbgE("Failed to malloc memory!");
goto GE_DATA_UTIL_FAILED;
}
ge_sdbg("Double, Region: LongMax %f, LongMin %f, LatMax %f, LatMin %f",
- longmax, longmin, latmax, latmin);
+ longmax, longmin, latmax, latmin);
/* 2013.04.23
* The format %lf in snprintf has a bug:
* The longitude should be 127.05998, but the result after snprintf is 127,05998.
g_ascii_dtostr(lat_min, G_ASCII_DTOSTR_BUF_SIZE, latmin);
g_ascii_dtostr(lat_max, G_ASCII_DTOSTR_BUF_SIZE, latmax);
ge_sdbg("String, Region: LongMax %s, LongMin %s, LatMax %s, LatMin %s",
- long_max, long_min, lat_max, lat_min);
+ long_max, long_min, lat_max, lat_min);
g_snprintf(cond, CONDITION_LENGTH,
- "(%s>=%s AND %s<=%s) AND (%s>=%s AND %s<=%s)",
- MEDIA_LONGITUDE, long_min, MEDIA_LONGITUDE, long_max,
- MEDIA_LATITUDE, lat_min, MEDIA_LATITUDE, lat_max);
+ "(%s>=%s AND %s<=%s) AND (%s>=%s AND %s<=%s)",
+ MEDIA_LONGITUDE, long_min, MEDIA_LONGITUDE, long_max,
+ MEDIA_LATITUDE, lat_min, MEDIA_LATITUDE, lat_max);
ge_sdbg("g_snprintf, %s", cond);
ret = 0;
- GE_DATA_UTIL_FAILED:
+GE_DATA_UTIL_FAILED:
GE_GFREEIF(long_max);
GE_GFREEIF(long_min);
int _ge_data_util_get_type_cond(char *cond, int file_t)
{
- if (file_t == GE_FILE_T_IMAGE)
+ if (file_t == GE_FILE_T_IMAGE) {
g_strlcpy(cond, GE_CONDITION_IMAGE, CONDITION_LENGTH);
- else if (file_t == GE_FILE_T_VIDEO)
+ } else if (file_t == GE_FILE_T_VIDEO) {
g_strlcpy(cond, GE_CONDITION_VIDEO, CONDITION_LENGTH);
- else
+ } else {
g_strlcpy(cond, GE_CONDITION_IMAGE_VIDEO, CONDITION_LENGTH);
+ }
return 0;
}
if (album->elist) {
ge_sel_item_s *sit = NULL;
EINA_LIST_FREE(album->elist, sit) {
- if (sit)
+ if (sit) {
_ge_data_util_free_sel_item(sit);
+ }
}
}
GE_FREEIF(album->uuid);
/* Remove album */
int _ge_data_remove_sel_album(ge_ugdata *ugd, ge_sel_album_s *salbum)
{
- if (ugd == NULL || ugd->selected_elist == NULL || salbum == NULL)
+ if (ugd == NULL || ugd->selected_elist == NULL || salbum == NULL) {
return 0;
+ }
/* Check album is created or not */
ugd->selected_elist = eina_list_remove(ugd->selected_elist, salbum);
/* Get count of selected items */
int _ge_data_get_sel_cnt(ge_ugdata *ugd)
{
- if (ugd == NULL || ugd->selected_elist == NULL)
+ if (ugd == NULL || ugd->selected_elist == NULL) {
return 0;
+ }
/* Check album is created or not */
ge_sel_album_s *salbum = NULL;
int cnt = 0;
Eina_List *l = NULL;
EINA_LIST_FOREACH(ugd->selected_elist, l, salbum) {
- if (salbum == NULL || salbum->elist == NULL)
+ if (salbum == NULL || salbum->elist == NULL) {
continue;
+ }
cnt += eina_list_count(salbum->elist);
salbum = NULL;
}
EINA_LIST_FOREACH(ugd->selected_elist, l, sit) {
g_string_append(selected_path, sit->file_url);
- g_string_append_c(selected_path, ';');
- path_list = eina_list_append(path_list, sit);
- _cnt++;
- sit = NULL;
- }
+ g_string_append_c(selected_path, ';');
+ path_list = eina_list_append(path_list, sit);
+ _cnt++;
+ sit = NULL;
+ }
/* copy path from path_list to path_array */
int idx = 0;
g_string_truncate(selected_path, str_len - 1);
*filepath = g_string_free(selected_path, false);
- if (cnt)
+ if (cnt) {
*cnt = _cnt;
+ }
return 0;
}
Eina_List *l = NULL;
EINA_LIST_FOREACH(ugd->selected_elist, l, salbum) {
if (salbum == NULL || salbum->elist == NULL ||
- salbum->uuid == NULL) {
+ salbum->uuid == NULL) {
ge_dbgW("Empty salbum!");
continue;
}
Eina_List *l2 = NULL;
ge_sel_item_s *sit = NULL;
EINA_LIST_FOREACH(ugd->selected_elist, l, salbum) {
- if (salbum == NULL || salbum->uuid == NULL)
+ if (salbum == NULL || salbum->uuid == NULL) {
continue;
+ }
EINA_LIST_FOREACH(salbum->elist, l2, sit) {
- if (sit == NULL)
+ if (sit == NULL) {
continue;
+ }
if (sit->uuid == NULL || sit->file_url == NULL)
salbum->elist = eina_list_remove(salbum->elist,
- sit);
+ sit);
sit = NULL;
}
salbum = NULL;
/* Remove sel albums */
int _ge_data_free_sel_albums(ge_ugdata *ugd)
{
- if (ugd == NULL || ugd->selected_elist == NULL)
+ if (ugd == NULL || ugd->selected_elist == NULL) {
return 0;
+ }
/* Check album is created or not */
ge_sel_album_s *salbum = NULL;
EINA_LIST_FREE(ugd->selected_elist, salbum) {
- if (salbum == NULL || salbum->elist == NULL)
+ if (salbum == NULL || salbum->elist == NULL) {
continue;
+ }
_ge_data_free_sel_album(salbum);
salbum = NULL;
}
if (eina_list_count(sel_id_list) == 0) {
ge_dbgE("sel_id_list is empty!");
- return false;
+ return false;
}
EINA_LIST_FOREACH(sel_id_list, tmp_elist, sit) {
continue;
}
- sit->valid = 1;
- return true;
+ sit->valid = 1;
+ return true;
}
return false;
}
g_strlcpy(filter.cond, GE_CONDITION_IMAGE_VIDEO, CONDITION_LENGTH);
filter.with_meta = false;
- if (ugd->file_type_mode == GE_FILE_T_IMAGE)
+ if (ugd->file_type_mode == GE_FILE_T_IMAGE) {
g_strlcpy(filter.cond, GE_CONDITION_IMAGE, CONDITION_LENGTH);
- else if (ugd->file_type_mode == GE_FILE_T_VIDEO)
+ } else if (ugd->file_type_mode == GE_FILE_T_VIDEO) {
g_strlcpy(filter.cond, GE_CONDITION_VIDEO, CONDITION_LENGTH);
+ }
if (g_strcmp0(album->cluster->uuid, GE_ALBUM_ALL_ID)) {
err = _ge_local_data_get_media_count(album->cluster->uuid,
- &filter, &item_count);
+ &filter, &item_count);
} else {
/* "All albums" album */
ge_dbg("all media count");
ge_dbg("Clear clusters");
ge_cluster *album = NULL;
EINA_LIST_FREE(ugd->cluster_list->clist, album) {
- if (album)
+ if (album) {
_ge_data_util_free_cluster(album);
+ }
album = NULL;
}
}
GE_CHECK_VAL(ugd->cluster_list, -1);
- GE_DATA_AGAIN:
+GE_DATA_AGAIN:
/* Get local albums for first time and local albums is more than 9 */
if (type == GE_ALBUM_DATA_NONE || type == GE_ALBUM_DATA_LOCAL) {
/* Get real albums */
memset(&filter, 0x00, sizeof(ge_filter_s));
g_strlcpy(filter.cond, GE_CONDITION_IMAGE_VIDEO,
- CONDITION_LENGTH);
+ CONDITION_LENGTH);
filter.collate_type = MEDIA_CONTENT_COLLATE_NOCASE;
filter.sort_type = MEDIA_CONTENT_ORDER_ASC;
g_strlcpy(filter.sort_keyword, FOLDER_NAME, KEYWORD_LENGTH);
if (type == GE_ALBUM_DATA_NONE) {
_ge_local_data_get_album_by_path(GE_CAMERA_PATH_PHONE,
- &camera_album);
- if (camera_album)
+ &camera_album);
+ if (camera_album) {
list = eina_list_append(list, camera_album);
+ }
camera_album = NULL;
_ge_local_data_get_album_by_path(GE_CAMERA_PATH_MMC,
- &camera_album);
- if (camera_album)
+ &camera_album);
+ if (camera_album) {
list = eina_list_append(list, camera_album);
+ }
_ge_local_data_get_album_by_path(GE_DOWNLOADS_PATH,
- &downloads_album);
- if (downloads_album)
+ &downloads_album);
+ if (downloads_album) {
list = eina_list_append(list, downloads_album);
+ }
filter.count = GE_ALBUMS_FIRST_COUNT;
filter.list_type = GE_ALBUM_LIST_FIRST;
err = _ge_local_data_get_album_list(&filter, &list);
if (err != 0) {
ge_dbgW("No record");
- if (list)
+ if (list) {
_ge_data_util_free_mtype_items(&list);
+ }
} else {
memset(&filter, 0x00, sizeof(ge_filter_s));
if (ugd->file_type_mode == GE_FILE_T_IMAGE)
g_strlcpy(filter.cond, GE_CONDITION_IMAGE,
- CONDITION_LENGTH);
+ CONDITION_LENGTH);
else if (ugd->file_type_mode == GE_FILE_T_VIDEO)
g_strlcpy(filter.cond, GE_CONDITION_VIDEO,
- CONDITION_LENGTH);
+ CONDITION_LENGTH);
else
g_strlcpy(filter.cond, GE_CONDITION_IMAGE_VIDEO,
- CONDITION_LENGTH);
+ CONDITION_LENGTH);
filter.sort_type = MEDIA_CONTENT_ORDER_DESC;
g_strlcpy(filter.sort_keyword, MEDIA_DISPLAY_NAME,
- KEYWORD_LENGTH);
+ KEYWORD_LENGTH);
filter.offset = GE_GET_ALL_RECORDS;
filter.count = GE_GET_ALL_RECORDS;
filter.with_meta = false;
ge_sdbg("Cluster ID: %s.", album->uuid);
err = _ge_local_data_get_media_count(album->uuid,
- &filter,
- &medias_cnt);
+ &filter,
+ &medias_cnt);
if (err == 0 && medias_cnt > 0) {
album->count = medias_cnt;
all_local_cnt += medias_cnt;
camera_cluster = gcluster;
}
} else {
- if (ugd->cluster_list->append_cb)
+ if (ugd->cluster_list->append_cb) {
ugd->cluster_list->append_cb(ugd, gcluster);
+ }
}
ugd->cluster_list->clist = clist;
}
gcluster = _ge_data_util_new_cluster_all(ugd, all_local_cnt);
GE_CHECK_VAL(gcluster, -1);
- if (camera_cluster)
+ if (camera_cluster) {
clist = eina_list_append_relative(clist, gcluster,
- camera_cluster);
- else
- clist= eina_list_prepend(clist, gcluster);
+ camera_cluster);
+ } else {
+ clist = eina_list_prepend(clist, gcluster);
+ }
ugd->cluster_list->clist = clist;
ge_dbg("<All albums> added!");
} else {
ge_album_s *mcluster = NULL;
ret = _ge_local_data_get_album_by_id(ugd->slideshow_album_id,
- &mcluster);
+ &mcluster);
if (ret < 0 || mcluster == NULL) {
- if (mcluster)
+ if (mcluster) {
_ge_data_type_free_geitem((void **)&mcluster);
+ }
return -1;
}
/* Clear items list */
int _ge_data_free_medias(Eina_List **elist)
{
- if (elist == NULL || *elist == NULL)
+ if (elist == NULL || *elist == NULL) {
return -1;
+ }
ge_item *gitem = NULL;
ge_dbg("Clear medias");
EINA_LIST_FREE(*elist, gitem) {
}
int _ge_data_get_medias(ge_ugdata *ugd, char *uuid, int type, int start_pos,
- int end_pos, Eina_List **pmedias_elist,
- ge_restore_selected_cb restore_cb, Eina_List *sel_id)
+ int end_pos, Eina_List **pmedias_elist,
+ ge_restore_selected_cb restore_cb, Eina_List *sel_id)
{
GE_CHECK_VAL(pmedias_elist, -1);
GE_CHECK_VAL(ugd, -1);
g_strlcpy(filter.cond, GE_CONDITION_VIDEO, CONDITION_LENGTH);
} else {
g_strlcpy(filter.cond, GE_CONDITION_IMAGE_VIDEO,
- CONDITION_LENGTH);
+ CONDITION_LENGTH);
}
filter.collate_type = MEDIA_CONTENT_COLLATE_NOCASE;
ge_dbg("--Album All--");
err = _ge_local_data_get_all_albums_media_list(&filter,
- &itemlist);
+ &itemlist);
if ((err == 0) && (itemlist != NULL)) {
ge_media_s *item = NULL;
gitem->ugd = ugd;
gitem->store_type = type;
*pmedias_elist = eina_list_append(*pmedias_elist,
- gitem);
+ gitem);
- if (restore_cb && sel_id)
+ if (restore_cb && sel_id) {
restore_cb(sel_id, gitem);
+ }
item = NULL;
gitem = NULL;
}
} else {
/* Free Mitems */
- if (itemlist)
+ if (itemlist) {
_ge_data_util_free_mtype_items(&itemlist);
+ }
}
ge_dbg("medias_elist=%p", *pmedias_elist);
return err;
/* Update items list, especially used in thumbnails edit view */
int _ge_data_update_medias(ge_ugdata *ugd, char *uuid, int type,
- Eina_List **pmedias_elist,
- ge_restore_selected_cb restore_cb,
- Eina_List *sel_id)
+ Eina_List **pmedias_elist,
+ ge_restore_selected_cb restore_cb,
+ Eina_List *sel_id)
{
GE_CHECK_VAL(pmedias_elist, -1);
GE_CHECK_VAL(uuid, -1);
g_strlcpy(filter.cond, GE_CONDITION_VIDEO, CONDITION_LENGTH);
} else {
g_strlcpy(filter.cond, GE_CONDITION_IMAGE_VIDEO,
- CONDITION_LENGTH);
+ CONDITION_LENGTH);
}
filter.collate_type = MEDIA_CONTENT_COLLATE_NOCASE;
if (g_strcmp0(uuid, GE_ALBUM_ALL_ID)) {
err = _ge_local_data_get_album_media_list(uuid, &filter,
- &itemlist);
+ &itemlist);
} else {
err = _ge_local_data_get_all_albums_media_list(&filter,
- &itemlist);
+ &itemlist);
}
if ((err != 0) || (itemlist == NULL)) {
ge_dbgE("(err != 0) || (itemlist == NULL)");
/* Free Mitems */
- if (itemlist)
+ if (itemlist) {
_ge_data_util_free_mtype_items(&itemlist);
+ }
return err;
}
gitem->store_type = type;
*pmedias_elist = eina_list_append(*pmedias_elist, gitem);
- if (restore_cb && sel_id)
+ if (restore_cb && sel_id) {
restore_cb(sel_id, gitem);
+ }
item = NULL;
gitem = NULL;
}
int _ge_data_get_album_cover(ge_ugdata *ugd, ge_cluster *album,
- ge_item **pgitem, media_content_order_e sort_type)
+ ge_item **pgitem, media_content_order_e sort_type)
{
GE_CHECK_VAL(pgitem, -1);
GE_CHECK_VAL(album, -1);
g_strlcpy(filter.cond, GE_CONDITION_VIDEO, CONDITION_LENGTH);
} else {
g_strlcpy(filter.cond, GE_CONDITION_IMAGE_VIDEO,
- CONDITION_LENGTH);
+ CONDITION_LENGTH);
}
filter.collate_type = MEDIA_CONTENT_COLLATE_NOCASE;
if (g_strcmp0(album->cluster->uuid, GE_ALBUM_ALL_ID)) {
/*real album */
err = _ge_local_data_get_album_cover(album->cluster->uuid,
- &filter, &item_list);
+ &filter, &item_list);
if (err != 0 || item_list == NULL) {
ge_dbgE("Get albums media list failed[%d]!", err);
goto DB_FAILED;
gitem->store_type = album->cluster->type;
/* Update flag */
if (ugd->cluster_list->b_updated &&
- !g_strcmp0(album->cluster->uuid, GE_ALBUM_ALL_ID)) {
+ !g_strcmp0(album->cluster->uuid, GE_ALBUM_ALL_ID)) {
ge_dbgW("Update flag: last mtime!");
ugd->cluster_list->b_updated = false;
ugd->cluster_list->last_mtime = item->mtime;
ge_sdbg("First items of [%s]", album->cluster->display_name);
return 0;
- DB_FAILED:
+DB_FAILED:
/* Free Mitems */
- if (item_list)
+ if (item_list) {
_ge_data_util_free_mtype_items(&item_list);
+ }
return -1;
}
int _ge_data_get_item_cnt(ge_ugdata *ugd, const char *cluster_id,
- int album_type, int *item_cnt)
+ int album_type, int *item_cnt)
{
GE_CHECK_VAL(item_cnt, -1);
GE_CHECK_VAL(ugd, -1);
int err = -1;
ge_filter_s filter;
- memset(&filter,0x00,sizeof(ge_filter_s));
+ memset(&filter, 0x00, sizeof(ge_filter_s));
ge_sdbg("cluster_id: %s", cluster_id);
filter.sort_type = MEDIA_CONTENT_ORDER_DESC;
g_strlcpy(filter.cond, GE_CONDITION_VIDEO, CONDITION_LENGTH);
} else {
g_strlcpy(filter.cond, GE_CONDITION_IMAGE_VIDEO,
- CONDITION_LENGTH);
+ CONDITION_LENGTH);
}
GE_CHECK_VAL(cluster_id, -1);
if (album_type == GE_PHONE || album_type == GE_MMC) {
/*It's normal album*/
err = _ge_local_data_get_media_count(cluster_id, &filter,
- item_cnt);
+ item_cnt);
} else if (album_type == GE_ALL) {
/* All albums */
ge_dbg("All albums media count");
filter.with_meta = false;
filter.offset = GE_FIRST_VIEW_START_POS;
filter.count = GE_GET_ONE_RECORD;
- if (ugd->file_type_mode == GE_FILE_T_IMAGE)
+ if (ugd->file_type_mode == GE_FILE_T_IMAGE) {
g_strlcpy(filter.cond, GE_CONDITION_IMAGE, CONDITION_LENGTH);
- else if (ugd->file_type_mode == GE_FILE_T_VIDEO)
+ } else if (ugd->file_type_mode == GE_FILE_T_VIDEO) {
g_strlcpy(filter.cond, GE_CONDITION_VIDEO, CONDITION_LENGTH);
- else
+ } else
g_strlcpy(filter.cond, GE_CONDITION_IMAGE_VIDEO,
- CONDITION_LENGTH);
+ CONDITION_LENGTH);
/* Get latest item */
err = _ge_local_data_get_all_albums_media_list(&filter, &item_list);
- if (err != 0 || item_list == NULL)
+ if (err != 0 || item_list == NULL) {
goto DB_NEED_UPDATE;
+ }
mitem = eina_list_nth(item_list, 0);
/* Compare modified time */
- if (mitem == NULL || mitem->mtime != ugd->cluster_list->last_mtime)
+ if (mitem == NULL || mitem->mtime != ugd->cluster_list->last_mtime) {
goto DB_NEED_UPDATE;
+ }
/* Get all medias count */
err = _ge_data_get_item_cnt(ugd, GE_ALBUM_ALL_ID, GE_ALL, &cnt);
- if (err != 0)
+ if (err != 0) {
goto DB_NEED_UPDATE;
+ }
/* Compare medias count */
- if (cnt != ugd->cluster_list->all_medias_cnt)
+ if (cnt != ugd->cluster_list->all_medias_cnt) {
goto DB_NEED_UPDATE;
+ }
_ge_data_type_free_geitem((void **)&mitem);
mitem = NULL;
return false;
- DB_NEED_UPDATE:
+DB_NEED_UPDATE:
_ge_data_type_free_geitem((void **)&mitem);
mitem = NULL;
if (elist && *elist) {
ge_item* gitem = NULL;
EINA_LIST_FREE(*elist, gitem) {
- if (gitem)
+ if (gitem) {
gitem->checked = false;
+ }
}
*elist = NULL;
}
/* Name is 'Camera' folder locates in Phone */
if (!g_strcmp0(mcluster->display_name, GE_ALBUM_CAMERA_NAME)) {
const char *root = NULL;
- if (mcluster->type == GE_PHONE)
+ if (mcluster->type == GE_PHONE) {
root = GE_ROOT_PATH_PHONE;
- else
+ } else {
root = GE_ROOT_PATH_MMC;
+ }
ge_dbg("Full path: %s", mcluster->path);
char *parent_path = ge_file_dir_get(mcluster->path);
bool _ge_data_check_root_type(const char *path, const char *root)
{
- if (path == NULL || root == NULL)
+ if (path == NULL || root == NULL) {
return false;
+ }
if (!strncmp(root, path, strlen(root))) {
ge_dbg("Root path: %s", path);
GE_CHECK_FALSE(path);
if (!g_strcmp0(GE_ROOT_PATH_PHONE, path) ||
- !g_strcmp0(GE_ROOT_PATH_MMC, path)) {
+ !g_strcmp0(GE_ROOT_PATH_MMC, path)) {
ge_dbg("Root path: %s", path);
return true;
}
/* Creates a thumbnail image for given the media, asynchronously */
int _ge_data_create_thumb(ge_media_s *item,
- media_thumbnail_completed_cb callback, void *data)
+ media_thumbnail_completed_cb callback, void *data)
{
GE_CHECK_VAL(item, -1);
GE_CHECK_VAL(item->media_h, -1);
if (sel_ids) {
bool b_selected = false;
b_selected = _ge_data_check_selected_id(sel_ids,
- gitem->item->uuid);
+ gitem->item->uuid);
if (b_selected) {
ge_dbg("b_selected");
b_selected = false;
#include "ge-debug.h"
static bool __ge_local_data_clone_album(media_folder_h folder, bool b_path,
- ge_album_s **palbum)
+ ge_album_s **palbum)
{
GE_CHECK_FALSE(folder);
GE_CHECK_FALSE(palbum);
*palbum = album;
return true;
- GE_LOCAL_FAILED:
+GE_LOCAL_FAILED:
_ge_data_type_free_geitem((void **)(&album));
*palbum = NULL;
}
static bool __ge_local_data_get_album_list_cb(media_folder_h folder,
- void *data)
+ void *data)
{
GE_CHECK_FALSE(data);
ge_transfer_data_s *tmp_data = (ge_transfer_data_s *)data;
if (tmp_data->list_type != GE_ALBUM_LIST_PATH) {
if (!g_strcmp0(GE_CAMERA_PATH_PHONE, path) ||
- !g_strcmp0(GE_CAMERA_PATH_MMC, path) ||
- !g_strcmp0(GE_DOWNLOADS_PATH, path)) {
+ !g_strcmp0(GE_CAMERA_PATH_MMC, path) ||
+ !g_strcmp0(GE_DOWNLOADS_PATH, path)) {
ge_dbgW("Camera or Downloads!");
GE_FREE(path);
return true;
*elist = eina_list_append(*elist, item);
return true;
- GE_LOCAL_FAILED:
+GE_LOCAL_FAILED:
_ge_data_type_free_geitem((void **)(&item));
return false;
ret = media_info_get_media_from_db(media_id, &media_h);
if (ret != MEDIA_CONTENT_ERROR_NONE || media_h == NULL) {
ge_dbgE("Failed to get media handle[%d]!", ret);
- if (media_h)
+ if (media_h) {
media_info_destroy(media_h);
+ }
return -1;
}
ge_album_s *_item = NULL;
int i = 0;
- if (strlen(path) <=0) {
+ if (strlen(path) <= 0) {
ge_dbgE("Invalid path!");
return -1;
}
condition.list_type = GE_ALBUM_LIST_PATH;
snprintf(condition.cond, CONDITION_LENGTH, "%s AND %s=\'%s\'",
- GE_CONDITION_IMAGE_VIDEO, FOLDER_PATH, path);
+ GE_CONDITION_IMAGE_VIDEO, FOLDER_PATH, path);
ret = _ge_local_data_get_album_list(&condition, &list);
if (ret != 0 || NULL == list) {
ge_dbg("Get folders--start");
ret = media_folder_foreach_folder_from_db(filter,
- __ge_local_data_get_album_list_cb,
- &tran_data);
+ __ge_local_data_get_album_list_cb,
+ &tran_data);
ge_dbg("Get folders--over");
_ge_data_util_destroy_filter(filter);
}
int _ge_local_data_get_media_count(const char *cluster_id, ge_filter_s *condition,
- int *item_cnt)
+ int *item_cnt)
{
GE_CHECK_VAL(cluster_id, -1);
GE_CHECK_VAL(condition, -1);
ge_dbg("Get media count--start");
ret = media_folder_get_media_count_from_db(cluster_id, filter,
- item_cnt);
+ item_cnt);
ge_dbg("Get media count--over");
_ge_data_util_destroy_filter(filter);
ret = media_info_get_media_from_db(media_id, &media_h);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
ge_dbgE("Get media handle failed[%d]!", ret);
- if (media_h)
+ if (media_h) {
media_info_destroy(media_h);
+ }
return -1;
}
}
int _ge_local_data_get_album_cover(char *album_id, ge_filter_s *condition,
- Eina_List **elist)
+ Eina_List **elist)
{
GE_CHECK_VAL(elist, -1);
GE_CHECK_VAL(album_id, -1);
ge_dbg("Get medias--start");
ret = media_folder_foreach_media_from_db(album_id, filter,
- __ge_local_data_get_cover_cb,
- elist);
+ __ge_local_data_get_cover_cb,
+ elist);
ge_dbg("Get medias--over");
_ge_data_util_destroy_filter(filter);
}
int _ge_local_data_get_all_albums_cover(ge_filter_s *condition,
- Eina_List **elist)
+ Eina_List **elist)
{
GE_CHECK_VAL(elist, -1);
GE_CHECK_VAL(condition, -1);
ge_dbg("Get all medias--start");
ret = media_info_foreach_media_from_db(filter,
- __ge_local_data_get_cover_cb,
- elist);
+ __ge_local_data_get_cover_cb,
+ elist);
ge_dbg("Get all medias--over");
_ge_data_util_destroy_filter(filter);
- if (ret != MEDIA_CONTENT_ERROR_NONE) {
- ge_dbgE("Get all medias failed[d]!", ret);
- return -1;
- }
+ if (ret != MEDIA_CONTENT_ERROR_NONE) {
+ ge_dbgE("Get all medias failed[d]!", ret);
+ return -1;
+ }
- return 0;
+ return 0;
}
int _ge_local_data_get_album_media_list(char *album_id, ge_filter_s *condition,
- Eina_List **elist)
+ Eina_List **elist)
{
GE_CHECK_VAL(elist, -1);
GE_CHECK_VAL(album_id, -1);
ge_dbg("Get medias--start");
ret = media_folder_foreach_media_from_db(album_id, filter,
- __ge_local_data_get_media_list_cb,
- &tran_data);
+ __ge_local_data_get_media_list_cb,
+ &tran_data);
ge_dbg("Get medias--over");
_ge_data_util_destroy_filter(filter);
}
int _ge_local_data_get_all_albums_media_list(ge_filter_s *condition,
- Eina_List **elist)
+ Eina_List **elist)
{
GE_CHECK_VAL(elist, -1);
GE_CHECK_VAL(condition, -1);
ge_dbg("Get all medias--start");
ret = media_info_foreach_media_from_db(filter,
- __ge_local_data_get_media_list_cb,
- &tran_data);
+ __ge_local_data_get_media_list_cb,
+ &tran_data);
ge_dbg("Get all medias--over");
_ge_data_util_destroy_filter(filter);
- if (ret != MEDIA_CONTENT_ERROR_NONE) {
- ge_dbgE("Get all medias failed[d]!", ret);
- return -1;
- }
+ if (ret != MEDIA_CONTENT_ERROR_NONE) {
+ ge_dbgE("Get all medias failed[d]!", ret);
+ return -1;
+ }
- return 0;
+ return 0;
}
int _ge_local_data_get_album_by_id(char *album_id, ge_album_s **cluster)
if (media_folder_get_folder_from_db(album_id, &folder_h) != MEDIA_CONTENT_ERROR_NONE) {
ge_sdbgE("Failed to get album[%s]!", album_id);
- if (folder_h)
+ if (folder_h) {
media_folder_destroy(folder_h);
+ }
return -1;
}
- if (folder_h == NULL)
+ if (folder_h == NULL) {
return -1;
+ }
if (!__ge_local_data_clone_album(folder_h, true, cluster)) {
ge_sdbgE("Failed to clone album[%s]!", album_id);
media_folder_destroy(folder_h);
GE_CHECK_VAL(ugd, -1);
GE_CHECK_VAL(ugd->naviframe, -1);
- if (ugd->file_select_mode == GE_FILE_SELECT_T_SLIDESHOW)
- {
+ if (ugd->file_select_mode == GE_FILE_SELECT_T_SLIDESHOW) {
ge_dbgE("file select mode is slideshow>>>>>>> grid view");
_ge_grid_create_main_view(ugd);
- }
- else {
+ } else {
ge_dbgE("no slide show mode>>>>>>>>>");
_ge_main_create_view(ugd);
/* Show special color of background */
bg = evas_object_rectangle_add(evas_object_evas_get(parent));
evas_object_color_set(bg, GE_BG_COLOR_DEFAULT, GE_BG_COLOR_DEFAULT,
- GE_BG_COLOR_DEFAULT, GE_BG_COLOR_A);
+ GE_BG_COLOR_DEFAULT, GE_BG_COLOR_A);
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(bg, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(bg);
}
ge_dbg("New angle: %d, old angle: %d", evt, ugd->rotate_mode);
- if (evt == ugd->rotate_mode)
+ if (evt == ugd->rotate_mode) {
return;
- else
+ } else {
ugd->rotate_mode = evt;
+ }
/* Update rotate mode and view */
int len = eina_list_count(ugd->rotate_cbs);
- ugd->nf_it = elm_naviframe_item_push(ugd->naviframe,"first naviframe bg", NULL, NULL, ugd->bg, NULL );
+ ugd->nf_it = elm_naviframe_item_push(ugd->naviframe, "first naviframe bg", NULL, NULL, ugd->bg, NULL);
if (ugd->nf_it != NULL) {
ge_dbgE("base view is push successfully in the nf");
- }
- else
+ } else {
ge_dbgE("base view failed to push in nf ");
+ }
/* Albums view and its layout */
ugd->th = elm_theme_new();
GE_CHECK_VAL(ugd->th, -1);
elm_theme_ref_set(ugd->th, NULL);
- elm_theme_set(ugd->th, "tizen-HD-dark" );
+ elm_theme_set(ugd->th, "tizen-HD-dark");
elm_theme_extension_add(ugd->th, GE_EDJ_FILE);
if (_ge_init_view(ugd) != 0) {
GE_IF_DEL_TIMER(ugd->del_timer)
/* Remove win rotation callback */
evas_object_smart_callback_del(ugd->win, "wm,rotation,changed",
- __ge_win_rot_changed_cb);
+ __ge_win_rot_changed_cb);
ge_dereg_db_update_noti();
/************* Destroy UI objects **************/
app_control_get_mime(service, &mime);
if (mime) {
- if (!g_strcmp0(mime, GE_MIME_IMAGE_ALL))
+ if (!g_strcmp0(mime, GE_MIME_IMAGE_ALL)) {
ugd->file_type_mode = GE_FILE_T_IMAGE;
- else if (!g_strcmp0(mime, GE_MIME_VIDEO_ALL))
+ } else if (!g_strcmp0(mime, GE_MIME_VIDEO_ALL)) {
ugd->file_type_mode = GE_FILE_T_VIDEO;
- else
+ } else {
ugd->file_type_mode = GE_FILE_T_ALL;
+ }
return 0;
}
}
- GE_DEFAULT_FILE_TYPE:
+GE_DEFAULT_FILE_TYPE:
ge_dbg("file type is default, set default type(ALL).");
ugd->file_type_mode = GE_FILE_T_ALL;
ge_sdbg("operation [%s]", operation);
app_control_get_extra_data(service, APPSVC_DATA_SELECTION_MODE,
- &select_mode);
+ &select_mode);
if (select_mode) {
- if (!strcasecmp(select_mode, GE_BUNDLE_SELECTION_MODE_SINGLE))
+ if (!strcasecmp(select_mode, GE_BUNDLE_SELECTION_MODE_SINGLE)) {
launch_type = strdup(GE_LAUNCH_SELECT_ONE);
- else if (!strcasecmp(select_mode, GE_BUNDLE_SELECTION_MODE_MULTI))
+ } else if (!strcasecmp(select_mode, GE_BUNDLE_SELECTION_MODE_MULTI)) {
launch_type = strdup(GE_LAUNCH_SELECT_MULTIPLE);
+ }
GE_FREE(select_mode);
}
if (launch_type == NULL)
app_control_get_extra_data(service, GE_BUNDLE_LAUNCH_TYPE,
- &launch_type);
+ &launch_type);
if (launch_type == NULL) {
if (operation &&
- !strcasecmp(operation, APP_CONTROL_OPERATION_PICK)) {
+ !strcasecmp(operation, APP_CONTROL_OPERATION_PICK)) {
launch_type = strdup(GE_LAUNCH_SELECT_ONE);
ge_dbg("Set launch-type to default");
} else {
app_control_get_extra_data(service, "indicator-state", &indicator);
if (indicator) {
ge_dbg("indicator: %s", indicator);
- if (!strcasecmp(indicator, "hide"))
+ if (!strcasecmp(indicator, "hide")) {
ugd->b_hide_indicator = true;
+ }
GE_FREE(indicator);
}
}
#endif
/* Add window rotation callback to rotate view as fast as possible */
evas_object_smart_callback_add(ugd->win, "wm,rotation,changed",
- __ge_win_rot_changed_cb, (void *)ugd);
+ __ge_win_rot_changed_cb, (void *)ugd);
__ge_get_rotate_value(ugd);
app_control_clone(&(ugd->service), service);
/* Connect DB first */
- if (_ge_data_init(ugd) != 0)
+ if (_ge_data_init(ugd) != 0) {
ge_dbgE("_ge_data_init failed!");
+ }
/*Register db udpate callback*/
_ge_db_update_reg_cb(ugd);
/* Parse parameters passed from parent */
ge_dbg("Normal mode");
}
if ((ugd->file_select_mode != GE_FILE_SELECT_T_NONE) ||
- (ugd->album_select_mode != GE_ALBUM_SELECT_T_NONE)) {
+ (ugd->album_select_mode != GE_ALBUM_SELECT_T_NONE)) {
/* create gallery UG */
if (_ge_create_view(ugd) != 0) {
ge_dbgE("Failed to create Gallery UG view!");
}
} else {
ge_dbgE("Wrong file_select_mode[%d] or album_select_mode[%d]",
- ugd->file_select_mode, ugd->album_select_mode);
+ ugd->file_select_mode, ugd->album_select_mode);
}
return ugd->ly_main;
/*update*/
if (ugd->ug_called_by_me == NULL &&
- ugd->file_select_mode != GE_FILE_SELECT_T_SLIDESHOW)
+ ugd->file_select_mode != GE_FILE_SELECT_T_SLIDESHOW) {
ge_update_view(ugd, GE_UPDATE_NONE);
+ }
}
/**
char *pd_selected = GE_STR_PD_SELECTED;
char *text = NULL;
Evas_Object *btn = NULL;
- int ret = 0;
int win_x = 0;
int win_y = 0;
int win_w = 0;
ge_dbg("called by attach panel ");
app_control_get_extra_data(msg, APP_CONTROL_DATA_SELECTION_MODE, &display_mode);
app_control_get_extra_data(msg, "__ATTACH_PANEL_INITIALIZE__", &initialized_mode);
- ret = app_control_get_extra_data(msg, "http://tizen.org/appcontrol/data/total_size", &(ugd->limitsize));
#ifdef FEATURE_SIZE_CHECK
+ int ret = app_control_get_extra_data(msg, "http://tizen.org/appcontrol/data/total_size", &(ugd->limitsize));
if (ret != APP_CONTROL_ERROR_NONE) {
//Test data
//ugd->limitsize = 2 * 1024 * 1024;
//change to single selection
ge_dbg("single_selection ");
if (ugd->nocontents) {
- elm_gengrid_item_size_set(ugd->thumbs_d->gengrid, win_w, win_h/3);
+ elm_gengrid_item_size_set(ugd->thumbs_d->gengrid, win_w, win_h / 3);
}
ugd->attach_panel_display_mode = ATTACH_PANEL_HALF_MODE;
ugd->file_select_mode = GE_FILE_SELECT_T_ONE;
//change to multi selection
ge_dbg("multiple_selection");
if (ugd->nocontents) {
- if (ugd->rotate_mode == GE_ROTATE_LANDSCAPE_UPSIDEDOWN || ugd->rotate_mode == GE_ROTATE_LANDSCAPE)
+ if (ugd->rotate_mode == GE_ROTATE_LANDSCAPE_UPSIDEDOWN || ugd->rotate_mode == GE_ROTATE_LANDSCAPE) {
elm_gengrid_item_size_set(ugd->thumbs_d->gengrid, win_h, LANDSCAPE_HEIGHT);
- else
+ } else {
elm_gengrid_item_size_set(ugd->thumbs_d->gengrid, win_w, FULL_MODE_PORTRAIT_HEIGHT);
+ }
}
ugd->attach_panel_display_mode = ATTACH_PANEL_FULL_MODE;
ugd->file_select_mode = GE_FILE_SELECT_T_MULTIPLE;
return;
- UG_ROTATE_EVENT:
+UG_ROTATE_EVENT:
/* Update rotate mode and view */
ge_dbg("rotate_mode: %d", ugd->rotate_mode);
ge_db_noti_s *db_noti = ugd->db_noti_d;
ge_update_view(ugd, GE_UPDATE_VIEW_INOTIFY);
evas_object_smart_callback_call(ugd->naviframe,
- "gallery,db,data,updated", ugd);
+ "gallery,db,data,updated", ugd);
GE_IF_DEL_IDLER(db_noti->db_idl);
return ECORE_CALLBACK_CANCEL;
}
GE_IF_DEL_TIMER(db_noti->db_timer);
db_noti->db_timer = ecore_timer_add(GE_MONITOE_TIME_DELAY,
- __ge_db_update_timer_cb, ugd);
+ __ge_db_update_timer_cb, ugd);
ge_dbgW("TIMER[1.0f] added!");
return 0;
}
static int __ge_db_update_op(media_content_error_e error, int pid,
- media_content_db_update_item_type_e update_item,
- media_content_db_update_type_e update_type,
- media_content_type_e media_type, char *uuid,
- char *path, char *mime_type, void *data)
+ media_content_db_update_item_type_e update_item,
+ media_content_db_update_type_e update_type,
+ media_content_type_e media_type, char *uuid,
+ char *path, char *mime_type, void *data)
{
GE_CHECK_VAL(data, -1);
ge_ugdata *ugd = (ge_ugdata *)data;
return -1;
}
if (update_item == MEDIA_ITEM_FILE &&
- MEDIA_CONTENT_TYPE_IMAGE != media_type &&
- MEDIA_CONTENT_TYPE_VIDEO != media_type) {
+ MEDIA_CONTENT_TYPE_IMAGE != media_type &&
+ MEDIA_CONTENT_TYPE_VIDEO != media_type) {
ge_dbg("Media type is wrong");
return -1;
} else if (update_item == MEDIA_ITEM_DIRECTORY && media_type == -1) {
if (cnt == db_noti->count) {
ge_dbg("Nothing changed");
if (path &&
- !strcmp(path, GE_ROOT_PATH_MMC)) {
+ !strcmp(path, GE_ROOT_PATH_MMC)) {
ge_dbg("MMC insert or remove!");
} else if (path) {
ge_album_s *album = NULL;
}
static void __ge_db_update_cb(media_content_error_e error, int pid,
- media_content_db_update_item_type_e update_item,
- media_content_db_update_type_e update_type,
- media_content_type_e media_type, char *uuid,
- char *path, char *mime_type, void *data)
+ media_content_db_update_item_type_e update_item,
+ media_content_db_update_type_e update_type,
+ media_content_type_e media_type, char *uuid,
+ char *path, char *mime_type, void *data)
{
ge_dbg("update_item[%d], update_type[%d], media_type[%d]", update_item,
update_type, media_type);
GE_CHECK(data);
ge_dbg("uuid[%s], path[%s]", uuid, path);
__ge_db_update_op(error, pid, update_item, update_type, media_type,
- uuid, path, mime_type, data);
+ uuid, path, mime_type, data);
}
/*
*/
int _ge_db_update_get_info(void *data,
- media_content_db_update_item_type_e *update_item,
- media_content_db_update_type_e *update_type)
+ media_content_db_update_item_type_e *update_item,
+ media_content_db_update_type_e *update_type)
{
GE_CHECK_VAL(data, -1);
ge_ugdata *ugd = (ge_ugdata *)data;
GE_CHECK_VAL(ugd->db_noti_d, -1);
- if (update_item)
+ if (update_item) {
*update_item = ugd->db_noti_d->update_item;
- if (update_type)
+ }
+ if (update_type) {
*update_type = ugd->db_noti_d->update_type;
+ }
return 0;
}
ge_dbg("Set db updated callback");
ret = media_content_set_db_updated_cb(__ge_db_update_cb, ugd);
- if (ret != MEDIA_CONTENT_ERROR_NONE)
+ if (ret != MEDIA_CONTENT_ERROR_NONE) {
ge_dbgE("Set db updated cb failed[%d]!", ret);
+ }
// ret = media_content_set_db_updated_cloud_cb(&(ugd->db_noti_d->cloud_h),
// __ge_db_update_coud_cb,
// ugd);
ge_dbg("Unset db updated callback");
ret = media_content_unset_db_updated_cb();
- if (ret != MEDIA_CONTENT_ERROR_NONE)
+ if (ret != MEDIA_CONTENT_ERROR_NONE) {
ge_dbgE("UNSet db updated cb failed[%d]!", ret);
+ }
GE_CHECK_FALSE(ugd);
GE_CHECK_FALSE(ugd->db_noti_d);
return -1;
}
- if (len)
+ if (len) {
*len = (((unsigned int)c1) << 8) + ((unsigned int)c2);
+ }
return 0;
}
static int __ge_exif_rw_jfif(FILE *fd, char *file_path,
- unsigned int *orientation)
+ unsigned int *orientation)
{
GE_CHECK_VAL(fd, -1);
GE_CHECK_VAL(file_path, -1);
int ret = -1;
/*unsigned char version = 0x00; */
- if (__ge_exif_read_2_bytes(fd, &length) < 0)
+ if (__ge_exif_read_2_bytes(fd, &length) < 0) {
goto GE_EXIF_FAILED;
+ }
ge_dbg("length: %d", length);
for (i = 0; i < 5; i++) {
tmp_exif = __ge_exif_read_1_byte(fd);
- if (tmp_exif < 0)
+ if (tmp_exif < 0) {
goto GE_EXIF_FAILED;
+ }
tmp[i] = (unsigned char)tmp_exif;
}
/* JFIF0 */
if (tmp[0] != 0x4A || tmp[1] != 0x46 || tmp[2] != 0x49 ||
- tmp[3] != 0x46 || tmp[4] != 0x00) {
+ tmp[3] != 0x46 || tmp[4] != 0x00) {
ge_dbgE("Not met Jfif!");
goto GE_EXIF_FAILED;
}
for (i = 0; i < 2; i++) {
tmp_exif = __ge_exif_read_1_byte(fd);
- if (tmp_exif < 0)
+ if (tmp_exif < 0) {
goto GE_EXIF_FAILED;
+ }
tmp[i] = (unsigned char)tmp_exif;
}
/* Find APP1 */
bool b_tag_ff = false;
- while(1) {
+ while (1) {
tmp_exif = __ge_exif_read_1_byte(fd);
- if (tmp_exif < 0)
+ if (tmp_exif < 0) {
goto GE_EXIF_FAILED;
+ }
tmp[0] = (unsigned char)tmp_exif;
}
/* Find Exif */
- while(1) {
+ while (1) {
tmp_exif = __ge_exif_read_1_byte(fd);
- if (tmp_exif < 0)
+ if (tmp_exif < 0) {
goto GE_EXIF_FAILED;
+ }
tmp[0] = (unsigned char)tmp_exif;
- if (tmp[0] != 0x45)
+ if (tmp[0] != 0x45) {
continue;
+ }
for (i = 0; i < 5; i++) {
tmp_exif = __ge_exif_read_1_byte(fd);
- if (tmp_exif < 0)
+ if (tmp_exif < 0) {
goto GE_EXIF_FAILED;
+ }
tmp[i] = (unsigned char)tmp_exif;
ge_dbg("- %02X", tmp[i]);
}
if (tmp[0] == 0x78 && tmp[1] == 0x69 && tmp[2] == 0x66 &&
- tmp[3] == 0x00 && tmp[4] == 0x00) {
+ tmp[3] == 0x00 && tmp[4] == 0x00) {
ge_dbgW("Met Exif!");
break;
} else {
/* Read Exif body */
for (i = 0; i < 4; i++) {
tmp_exif = __ge_exif_read_1_byte(fd);
- if (tmp_exif < 0)
+ if (tmp_exif < 0) {
goto GE_EXIF_FAILED;
+ }
tmp[i] = (unsigned char)tmp_exif;
}
/* Check byte order and Tag Mark , "II(0x4949)" or "MM(0x4d4d)" */
if (tmp[0] == 0x49 && tmp[1] == 0x49 && tmp[2] == 0x2A &&
- tmp[3] == 0x00) {
+ tmp[3] == 0x00) {
ge_dbg("Intel");
is_motorola = false;
} else if (tmp[0] == 0x4D && tmp[1] == 0x4D && tmp[2] == 0x00 &&
- tmp[3] == 0x2A) {
+ tmp[3] == 0x2A) {
ge_dbg("Motorola");
is_motorola = true;
} else {
for (i = 0; i < 4; i++) {
tmp_exif = __ge_exif_read_1_byte(fd);
- if (tmp_exif < 0)
+ if (tmp_exif < 0) {
goto GE_EXIF_FAILED;
+ }
tmp[i] = (unsigned char)tmp_exif;
ge_dbg("- %02X", tmp[i]);
/* Get first IFD offset (offset to IFD0) , MM-08000000, II-00000008 */
if (is_motorola) {
- if (tmp[0] != 0 && tmp[1] != 0)
+ if (tmp[0] != 0 && tmp[1] != 0) {
goto GE_EXIF_FAILED;
+ }
offset = tmp[2];
offset <<= 8;
offset += tmp[3];
} else {
- if (tmp[3] != 0 && tmp[2] != 0)
+ if (tmp[3] != 0 && tmp[2] != 0) {
goto GE_EXIF_FAILED;
+ }
offset = tmp[1];
offset <<= 8;
offset += tmp[0];
unsigned int tags_cnt = 0;
for (i = 0; i < 2; i++) {
tmp_exif = __ge_exif_read_1_byte(fd);
- if (tmp_exif < 0)
+ if (tmp_exif < 0) {
goto GE_EXIF_FAILED;
+ }
tmp[i] = (unsigned char)tmp_exif;
}
/* Every directory entry size is 12 */
for (i = 0; i < 12; i++) {
tmp_exif = __ge_exif_read_1_byte(fd);
- if (tmp_exif < 0)
+ if (tmp_exif < 0) {
goto GE_EXIF_FAILED;
+ }
tmp[i] = (unsigned char)tmp_exif;
}
ge_dbg("Read: %d", *orientation);
ret = 0;
- GE_EXIF_FAILED:
+GE_EXIF_FAILED:
fclose(fd);
ge_dbg("All done");
/* Read File head, check for JPEG SOI + Exif APP1 */
for (i = 0; i < 4; i++) {
tmp_exif = __ge_exif_read_1_byte(fd);
- if (tmp_exif < 0)
+ if (tmp_exif < 0) {
goto GE_EXIF_FAILED;
+ }
exif_data[i] = (unsigned char)tmp_exif;
}
if (exif_data[2] == GE_EXIF_TAG && exif_data[3] == GE_EXIF_APP1) {
ge_dbgW("Exif in APP1!");
} else if (exif_data[2] == GE_EXIF_TAG &&
- exif_data[3] == GE_EXIF_APP0) {
+ exif_data[3] == GE_EXIF_APP0) {
ge_dbgW("Jfif in APP0!");
int ret = __ge_exif_rw_jfif(fd, file_path, orient);
return ret;
}
/* Get the marker parameter length count */
- if (__ge_exif_read_2_bytes(fd, &length) < 0)
+ if (__ge_exif_read_2_bytes(fd, &length) < 0) {
goto GE_EXIF_FAILED;
+ }
ge_dbg("length: %d", length);
/* Length includes itself, so must be at least 2
Following Exif data length must be at least 6 */
}
length -= 8;
- /* Length of an IFD entry */
+ /* Length of an IFD entry */
if (length < 12) {
ge_dbgE("length < 12");
goto GE_EXIF_FAILED;
/* Read Exif head, check for "Exif" */
for (i = 0; i < 6; i++) {
tmp_exif = __ge_exif_read_1_byte(fd);
- if (tmp_exif < 0)
+ if (tmp_exif < 0) {
goto GE_EXIF_FAILED;
+ }
exif_data[i] = (unsigned char)tmp_exif;
ge_dbg("- %02X", exif_data[i]);
}
if (exif_data[0] != 0x45 || exif_data[1] != 0x78 ||
- exif_data[2] != 0x69 || exif_data[3] != 0x66 ||
- exif_data[4] != 0x00 || exif_data[5] != 0x00) {
+ exif_data[2] != 0x69 || exif_data[3] != 0x66 ||
+ exif_data[4] != 0x00 || exif_data[5] != 0x00) {
ge_dbgE("Not met Exif!");
goto GE_EXIF_FAILED;
}
/* Read Exif body */
for (i = 0; i < length; i++) {
tmp_exif = __ge_exif_read_1_byte(fd);
- if (tmp_exif < 0)
+ if (tmp_exif < 0) {
goto GE_EXIF_FAILED;
+ }
exif_data[i] = (unsigned char)tmp_exif;
}
/* Check byte order and Tag Mark , "II(0x4949)" or "MM(0x4d4d)" */
if (exif_data[0] == 0x49 && exif_data[1] == 0x49 &&
- exif_data[2] == 0x2A && exif_data[3] == 0x00) {
+ exif_data[2] == 0x2A && exif_data[3] == 0x00) {
ge_dbg("Intel");
is_motorola = false;
} else if (exif_data[0] == 0x4D && exif_data[1] == 0x4D &&
- exif_data[2] == 0x00 && exif_data[3] == 0x2A) {
+ exif_data[2] == 0x00 && exif_data[3] == 0x2A) {
ge_dbg("Motorola");
is_motorola = true;
} else {
/* Get first IFD offset (offset to IFD0) , MM-00000008, II-08000000 */
if (is_motorola) {
- if (exif_data[4] != 0 && exif_data[5] != 0)
+ if (exif_data[4] != 0 && exif_data[5] != 0) {
goto GE_EXIF_FAILED;
+ }
offset = exif_data[6];
offset <<= 8;
offset += exif_data[7];
} else {
- if (exif_data[7] != 0 && exif_data[6] != 0)
+ if (exif_data[7] != 0 && exif_data[6] != 0) {
goto GE_EXIF_FAILED;
+ }
offset = exif_data[5];
offset <<= 8;
offset += exif_data[4];
if (is_motorola) {
tags_cnt = exif_data[offset];
tags_cnt <<= 8;
- tags_cnt += exif_data[offset+1];
+ tags_cnt += exif_data[offset + 1];
} else {
- tags_cnt = exif_data[offset+1];
+ tags_cnt = exif_data[offset + 1];
tags_cnt <<= 8;
tags_cnt += exif_data[offset];
}
if (is_motorola) {
tag_num = exif_data[offset];
tag_num <<= 8;
- tag_num += exif_data[offset+1];
+ tag_num += exif_data[offset + 1];
} else {
- tag_num = exif_data[offset+1];
+ tag_num = exif_data[offset + 1];
tag_num <<= 8;
tag_num += exif_data[offset];
}
/* Get the Orientation value */
if (is_motorola) {
- if (exif_data[offset+8] != 0) {
+ if (exif_data[offset + 8] != 0) {
ge_dbgE("exif_data[offset+8] != 0");
goto GE_EXIF_FAILED;
}
- *orient = (unsigned int)exif_data[offset+9];
+ *orient = (unsigned int)exif_data[offset + 9];
} else {
- if (exif_data[offset+9] != 0) {
+ if (exif_data[offset + 9] != 0) {
ge_dbgE("exif_data[offset+9] != 0");
goto GE_EXIF_FAILED;
}
- *orient = (unsigned int)exif_data[offset+8];
+ *orient = (unsigned int)exif_data[offset + 8];
}
if (*orient > 8) {
ge_dbgE("*orient > 8");
ret = 0;
- GE_EXIF_FAILED:
+GE_EXIF_FAILED:
fclose(fd);
ge_dbg("All done");
#define GE_EXT_FT_CONTACT "contact"
static int __ge_ext_compose_cmd(ge_ugdata *ugd, GeExtAppType type,
- app_control_h service, char **pkg_name, char *paths,
- int count)
+ app_control_h service, char **pkg_name, char *paths,
+ int count)
{
ge_dbg("type:%d", type);
GE_CHECK_VAL(pkg_name, LAUNCH_FAIL);
switch (type) {
case FILETRANSFER: {
app_control_add_extra_data(service, GE_EXT_LAUNCH_TYPE,
- GE_EXT_LAUNCH_FT_WITH_CONTACT);
+ GE_EXT_LAUNCH_FT_WITH_CONTACT);
app_control_add_extra_data(service, GE_EXT_FT_FILE, paths);
char index_arg[GE_EXT_CMD_ARGS_LEN] = { 0, };
snprintf(index_arg, sizeof(index_arg), "%d",
- ugd->file_select_contact_id);
+ ugd->file_select_contact_id);
app_control_add_extra_data(service, GE_EXT_FT_CONTACT, index_arg);
*pkg_name = GE_EXT_FILETRANSFER;
break;
return LAUNCH_FAIL;
}
- int ret = 0;
+ int ret = 0;
app_control_set_operation(service, APP_CONTROL_OPERATION_DEFAULT);
if (APP_CONTROL_ERROR_NONE != app_control_set_app_id(service, pkg_name)) {
ge_dbgE("app_control_set_app_id failed");
}
ret = app_control_destroy(service);
- if (ret != APP_CONTROL_ERROR_NONE)
+ if (ret != APP_CONTROL_ERROR_NONE) {
return LAUNCH_FAIL;
- else
+ } else {
return LAUNCH_SUCCESS;
+ }
}
ge_dbg("ug_called_by_me does not exist!");
}
- if (ugd->file_select_mode == GE_FILE_SELECT_T_SLIDESHOW)
+ if (ugd->file_select_mode == GE_FILE_SELECT_T_SLIDESHOW) {
ugd->b_destroy_me = false;
+ }
if (!ugd->b_destroy_me) {
ge_dbg("gallery ug is still alive");
if (ugd->file_setas_image_path) {
ge_dbg("GE_SETAS_IMAGE_PATH:%s", ugd->file_setas_image_path);
app_control_add_extra_data(ugd->service,
- GE_SETAS_IMAGE_PATH,
- ugd->file_setas_image_path);
+ GE_SETAS_IMAGE_PATH,
+ ugd->file_setas_image_path);
GE_FREE(ugd->file_setas_image_path);
send_result = true;
}
if (ugd->file_setas_crop_image_path &&
- (ugd->file_select_setas_mode == GE_SETAS_T_CALLERID ||
- ugd->file_select_setas_mode == GE_SETAS_T_CROP_WALLPAPER)) {
+ (ugd->file_select_setas_mode == GE_SETAS_T_CALLERID ||
+ ugd->file_select_setas_mode == GE_SETAS_T_CROP_WALLPAPER)) {
ge_dbg("GE_SETAS_CALLERID_CROP_IMAGE_PATH:%s",
ugd->file_setas_crop_image_path);
app_control_add_extra_data(ugd->service,
- APP_CONTROL_DATA_SELECTED,
- ugd->file_setas_crop_image_path);
+ APP_CONTROL_DATA_SELECTED,
+ ugd->file_setas_crop_image_path);
GE_FREE(ugd->file_setas_crop_image_path);
send_result = true;
/*If set wallpaper success, homescreen_path should not be null.
And if setting wallpaper was canceled in IV, gallery-efl doesn't exit immediately*/
app_control_get_extra_data(result, GE_BUNDLE_HOMESCREEN_PATH,
- &path);
+ &path);
if (NULL == path)
app_control_get_extra_data(result, GE_BUNDLE_LOCKSCREEN_PATH,
- &path);
+ &path);
ge_dbg("SETAS_IMAGE_PATH");
app_control_get_extra_data(result, "Result", &status);
ugd->file_select_setas_mode = 0;
/*If has got homescreen_path, setats_mode should not be callerid and
crop wallpaper*/
if (path == NULL &&
- (ugd->file_select_setas_mode == GE_SETAS_T_CALLERID ||
- ugd->file_select_setas_mode == GE_SETAS_T_CROP_WALLPAPER)) {
+ (ugd->file_select_setas_mode == GE_SETAS_T_CALLERID ||
+ ugd->file_select_setas_mode == GE_SETAS_T_CROP_WALLPAPER)) {
app_control_get_extra_data(result, APP_CONTROL_DATA_SELECTED,
- &path);
+ &path);
ge_dbg("CALLERID_CROP_IMAGE_PATH");
if (path) {
ge_dbg(":%s", path);
char *error_state = NULL;
app_control_get_extra_data(result, GE_IMAGEVIEWER_RETURN_ERROR,
- &error_state);
+ &error_state);
if (error_state) {
ge_dbg("error string : %s", error_state);
GE_CHECK(priv);
ge_ugdata *ugd = (ge_ugdata *)priv;
- if (ugd->file_select_setas_mode == 1)
+ if (ugd->file_select_setas_mode == 1) {
_ge_grid_sel_one(ugd, ugd->file_select_setas_path);
+ }
- if (ugd->b_hide_indicator)
+ if (ugd->b_hide_indicator) {
_ge_ui_hide_indicator((ge_ugdata *)priv);
+ }
}
static char **__ge_ext_get_select_index(ge_ugdata *ugd, int *size)
GE_FREE(media_index);
return NULL;
}
- ge_dbg("Sequence: %d", git->sequence-1);
- snprintf(index, GE_IV_STR_LEN_MAX, "%d", git->sequence-1);
+ ge_dbg("Sequence: %d", git->sequence - 1);
+ snprintf(index, GE_IV_STR_LEN_MAX, "%d", git->sequence - 1);
media_index[i++] = index;
index = NULL;
git = NULL;
}
- if (size)
+ if (size) {
*size = sel_cnt;
+ }
return media_index;
}
ge_dbg("Set selected medias, media_index[%p], size[%d]", media_index,
media_size);
app_control_add_extra_data_array(service, GE_SELECTED_FILES,
- (const char **)media_index, media_size);
+ (const char **)media_index, media_size);
/*free space of the medias index*/
int i = 0;
for (i = 0; i < media_size; ++i) {
}
static int __ge_ext_set_slideshow_data(ge_ugdata *ugd, char *file_url,
- app_control_h service)
+ app_control_h service)
{
GE_CHECK_VAL(service, -1);
GE_CHECK_VAL(file_url, -1);
app_control_add_extra_data(service, GE_PATH, file_url);
app_control_add_extra_data(service, GE_VIEW_MODE, "SLIDESHOW");
app_control_add_extra_data(service, "Sort By", "DateDesc");
- if (ugd->file_type_mode == GE_FILE_T_IMAGE)
+ if (ugd->file_type_mode == GE_FILE_T_IMAGE) {
app_control_add_extra_data(service, GE_MEDIA_TYPE, "Image");
- else if (ugd->file_type_mode == GE_FILE_T_VIDEO)
+ } else if (ugd->file_type_mode == GE_FILE_T_VIDEO) {
app_control_add_extra_data(service, GE_MEDIA_TYPE, "Video");
- else
+ } else {
app_control_add_extra_data(service, GE_MEDIA_TYPE, "All");
+ }
if (__ge_ext_slideshow_selected(ugd, service) != 0) {
ge_dbgE("Create UG failed!");
return -1;
return -1;
}
app_control_add_extra_data(service, "Album index", ugd->slideshow_album_id);
- if (!g_strcmp0(ugd->slideshow_album_id, GE_ALBUM_ALL_ID))
+ if (!g_strcmp0(ugd->slideshow_album_id, GE_ALBUM_ALL_ID)) {
app_control_add_extra_data(service, GE_VIEW_BY, "All");
- else
+ } else {
app_control_add_extra_data(service, GE_VIEW_BY, "By Folder");
+ }
break;
default:
return -1;
}
static int __ge_ext_set_setas_data(ge_ugdata *ugd, char *file_url,
- app_control_h service)
+ app_control_h service)
{
GE_CHECK_VAL(service, -1);
GE_CHECK_VAL(file_url, -1);
app_control_add_extra_data(service, GE_SETAS_TYPE, "Wallpaper Crop");
app_control_add_extra_data(service, "Fixed ratio", "TRUE");
+ int x = 0;
+ int y = 0;
int w = 0;
int h = 0;
- ecore_x_window_size_get(ecore_x_window_root_first_get(),
- &w, &h);
+ elm_win_screen_size_get((Evas_Object *)ug_get_window(), &x, &y, &w, &h);
char *reso_str = (char *)calloc(1, GE_IV_STR_LEN_MAX);
if (reso_str == NULL) {
ge_dbgE("Calloc failed!");
{
struct stat info = {0,};
- if (stat(path, &info) == 0)
+ if (stat(path, &info) == 0) {
return 1;
- else
+ } else {
return 0;
+ }
}
int ge_file_size(const char *filename)
{
struct stat info = {0,};
if (stat(filename, &info) == 0) {
- if (!S_ISDIR(info.st_mode))
+ if (!S_ISDIR(info.st_mode)) {
return info.st_size;
+ }
}
return 0;
int view_m = _ge_get_view_mode(ugd);
ge_dbg("view: %d", view_m);
- if (view_m == GE_VIEW_THUMBS || view_m == GE_VIEW_THUMBS_EDIT)
+ if (view_m == GE_VIEW_THUMBS || view_m == GE_VIEW_THUMBS_EDIT) {
_ge_grid_update_lang(ugd);
+ }
return 0;
}
int r;
eo = elm_layout_add(parent);
- if (eo)
- {
+ if (eo) {
r = elm_layout_file_set(eo, file, group);
- if (!r)
- {
+ if (!r) {
evas_object_del(eo);
return NULL;
}
{
GE_CHECK_NULL(ugd);
Evas_Object *layout = NULL;
- char label_str[GE_NOCONTENTS_LABEL_LEN_MAX] ={0,};
+ char label_str[GE_NOCONTENTS_LABEL_LEN_MAX] = {0,};
if (_ge_get_view_mode(ugd) == GE_VIEW_THUMBS ||
- _ge_get_view_mode(ugd) == GE_VIEW_THUMBS_EDIT) {
+ _ge_get_view_mode(ugd) == GE_VIEW_THUMBS_EDIT) {
if (ugd->file_type_mode) {
if (ugd->file_type_mode == GE_FILE_T_IMAGE)
snprintf(label_str, sizeof(label_str),
- "%s", (char*)GE_STR_NO_IMAGES);
+ "%s", (char*)GE_STR_NO_IMAGES);
else if (ugd->file_type_mode == GE_FILE_T_VIDEO)
snprintf(label_str, sizeof(label_str),
- "%s", (char*)GE_STR_NO_VIDEOS);
+ "%s", (char*)GE_STR_NO_VIDEOS);
else
snprintf(label_str, sizeof(label_str),
- "%s", (char*)GE_STR_NO_ITEMS);
+ "%s", (char*)GE_STR_NO_ITEMS);
} else {
snprintf(label_str, sizeof(label_str), "%s",
- (char*)GE_STR_NO_ITEMS);
+ (char*)GE_STR_NO_ITEMS);
}
} else if (_ge_get_view_mode(ugd) == GE_VIEW_ALBUMS) {
snprintf(label_str, sizeof(label_str), "%s",
- (char*)GE_STR_NO_ALBUMS);
+ (char*)GE_STR_NO_ALBUMS);
} else {
ge_dbgE("view mode is error.");
}
ge_dbg("profile: %s", profile);
if (!g_strcmp0(profile, "mobile")) {
elm_layout_theme_set(layout, "layout", "application",
- "default");
- } else if (!g_strcmp0(profile,"extension")) {
+ "default");
+ } else if (!g_strcmp0(profile, "extension")) {
elm_layout_theme_set(layout, "layout", "application",
- "noindicator");
+ "noindicator");
} else {
elm_layout_theme_set(layout, "layout", "application",
- "default");
+ "default");
}
evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_show(layout);
return layout;
}
}
Evas_Object* ge_ui_create_popup(ge_ugdata* ugd, ge_popup_mode_e mode,
- char* desc)
+ char* desc)
{
ge_dbg("");
GE_CHECK_NULL(ugd);
/*Delete the Popup if the Popup has a BACK event.*/
eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, eext_popup_back_cb,
- NULL);
+ NULL);
evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
elm_object_text_set(popup, desc);
switch (mode) {
case GE_POPUP_EXIT:
__ge_popup_add_timer(ugd, GE_NOBUT_EXIT_POPUP_HIDE_TIME_DELAY);
break;
- case GE_POPUP_ONEBUT:
- {
+ case GE_POPUP_ONEBUT: {
Evas_Object *btn = NULL;
btn = _ge_but_create_but(popup, ugd->th, NULL, GE_STR_ID_OK,
- GE_BTN_POPUP, _ge_ui_response_cb, ugd);
+ GE_BTN_POPUP, _ge_ui_response_cb, ugd);
elm_object_part_content_set(popup, "button1", btn);
break;
}
- case GE_POPUP_TWOBUT:
- {
+ case GE_POPUP_TWOBUT: {
Evas_Object *btn1 = NULL;
btn1 = _ge_but_create_but(popup, ugd->th, NULL, GE_STR_ID_OK,
- GE_BTN_POPUP, _ge_ui_response_cb,
- ugd);
+ GE_BTN_POPUP, _ge_ui_response_cb,
+ ugd);
elm_object_part_content_set(popup, "button1", btn1);
Evas_Object *btn2 = NULL;
btn2 = _ge_but_create_but(popup, ugd->th, NULL, GE_STR_ID_CANCEL,
- GE_BTN_POPUP, _ge_ui_response_cb,
- ugd);
+ GE_BTN_POPUP, _ge_ui_response_cb,
+ ugd);
elm_object_part_content_set(popup, "button2", btn2);
break;
}
{
GE_CHECK_VAL(text, -1);
int ret = notification_status_message_post(text);
- if (ret != 0)
+ if (ret != 0) {
ge_sdbgE("status_message_post()... [0x%x]!", ret);
+ }
return ret;
}
cluster->display_name = strdup(GE_ALBUM_ALL_NAME);
i18n_name = cluster->display_name;
} else if (cluster->type == GE_PHONE || cluster->type == GE_MMC) {
- if (_ge_data_is_root_path(cluster->path)) {
+ if (_ge_data_is_root_path(cluster->path)) {
/* check root case */
i18n_name = GE_ALBUM_ROOT_NAME;
} else {
i18n_name = cluster->display_name;
}
- if (i18n_name == NULL || strlen(i18n_name) <= 0)
+ if (i18n_name == NULL || strlen(i18n_name) <= 0) {
i18n_name = GE_ALBUM_ROOT_NAME;
+ }
return i18n_name;
}
w = (Evas_Coord)evas_object_data_get(obj, "prev_scroller_w");
h = (Evas_Coord)evas_object_data_get(obj, "prev_scroller_h");
ge_dbg("(%dx%d), (%dx%d)", x, y, w, h);
- if (w > 0 && h > 0)
+ if (w > 0 && h > 0) {
elm_scroller_region_show(obj, x, y, w, h);
+ }
return 0;
}
GE_CHECK_VAL(str, -1);
GE_CHECK_VAL(obj, -1);
char *domain = GE_STR_DOMAIN_LOCAL;
- if (strstr(str, "IDS_COM"))
+ if (strstr(str, "IDS_COM")) {
domain = GE_STR_DOMAIN_SYS;
+ }
elm_object_domain_translatable_text_set(obj, domain, str);
return 0;
}
int _ge_ui_set_translate_part_str(Evas_Object *obj, const char *part,
- const char *str)
+ const char *str)
{
GE_CHECK_VAL(str, -1);
GE_CHECK_VAL(part, -1);
GE_CHECK_VAL(obj, -1);
char *domain = GE_STR_DOMAIN_LOCAL;
- if (strstr(str, "IDS_COM"))
+ if (strstr(str, "IDS_COM")) {
domain = GE_STR_DOMAIN_SYS;
+ }
elm_object_domain_translatable_part_text_set(obj, part, domain, str);
GE_CHECK_VAL(str, -1);
GE_CHECK_VAL(nf_it, -1);
char *domain = GE_STR_DOMAIN_LOCAL;
- if (strstr(str, "IDS_COM"))
+ if (strstr(str, "IDS_COM")) {
domain = GE_STR_DOMAIN_SYS;
+ }
elm_object_item_domain_text_translatable_set(nf_it, domain, EINA_TRUE);
return 0;
}
/* Update the label text for selected item showed in naviframe title */
int _ge_ui_update_label_text(Elm_Object_Item *nf_it, int sel_cnt,
- const char *text)
+ const char *text)
{
GE_CHECK_VAL(nf_it, -1);
ge_sdbg("Count: %d, text: %s", sel_cnt, text);
ugd->indi_mode = elm_win_indicator_mode_get(ugd->win);
ugd->indi_o_mode = elm_win_indicator_opacity_get(ugd->win);
ge_dbgW("indi_o_mode: %d, indi_mode: %d", ugd->indi_o_mode,
- ugd->indi_mode);
+ ugd->indi_mode);
/* Save old view's overlap mode */
ugd->overlap_mode = (int)evas_object_data_get(ugd->conform, "overlap");
ge_dbgW("overlap_mode: %d", ugd->overlap_mode);
{
GE_CHECK_VAL(ugd, -1);
ge_dbgW("indi_o_mode: %d, indi_mode: %d", ugd->indi_o_mode,
- ugd->indi_mode);
+ ugd->indi_mode);
ge_dbgW("overlap_mode: %d", ugd->overlap_mode);
/* Set old view's indicator */
elm_win_indicator_mode_set(ugd->win, ugd->indi_mode);
if layout is different with new view and needs starts from (0,60) */
if (!ugd->overlap_mode) {
elm_object_signal_emit(ugd->conform,
- "elm,state,indicator,nooverlap", "");
+ "elm,state,indicator,nooverlap", "");
evas_object_data_set(ugd->conform, "overlap", NULL);
}
ge_dbgW("indicator restored done!");
}
Elm_Object_Item *_ge_ui_append_item(Evas_Object *obj, const char *icon,
- const char *label, Evas_Smart_Cb func,
- const void *data)
+ const char *label, Evas_Smart_Cb func,
+ const void *data)
{
Elm_Object_Item *it = NULL;
it = elm_toolbar_item_append(obj, icon, label, func, data);
}
snprintf(dur_str, GE_FILE_PATH_LEN_MAX, "%02d:%02d:%02d",
- dur_hr, dur_min, dur_sec);
+ dur_hr, dur_min, dur_sec);
} else {
snprintf(dur_str, GE_FILE_PATH_LEN_MAX, "00:00:00");
}
}
double _ge_get_win_factor(Evas_Object *win, bool b_hide_indicator, int *width,
- int *height)
+ int *height)
{
if (win == NULL) {
ge_dbgE("Invalid window!");
double scale = elm_config_scale_get();
ge_dbg("scale: %f", scale);
int fixed_h = GE_FIXED_HEIGHT;
- if (b_hide_indicator)
+ if (b_hide_indicator) {
fixed_h = GE_FIXED_HEIGHT_HIDE;
+ }
if (win_p_h < GE_BASE_WIN_HEIGHT) {
factor = (double)(win_p_h - (int)(fixed_h * scale)) / (double)(GE_BASE_WIN_HEIGHT - fixed_h);
} else if (scale > factor) {
factor = scale;
}
ge_dbg("factor: %f", factor);
- if (width)
+ if (width) {
*width = win_w;
- if (height)
+ }
+ if (height) {
*height = win_h;
+ }
return factor;
}
if (sel_cnt <= 0 || !path_array) {
ge_dbgE("Invalid selection or paths");
app_control_add_extra_data(ugd->service,
- GE_FILE_SELECT_RETURN_COUNT, "0");
+ GE_FILE_SELECT_RETURN_COUNT, "0");
app_control_add_extra_data(ugd->service, GE_FILE_SELECT_RETURN_PATH,
- NULL);
+ NULL);
app_control_add_extra_data(ugd->service, APP_CONTROL_DATA_SELECTED,
- NULL);
+ NULL);
app_control_add_extra_data(ugd->service, APP_CONTROL_DATA_PATH,
- NULL);
+ NULL);
ug_send_result_full(ugd->ug, ugd->service,
- APP_CONTROL_RESULT_FAILED);
+ APP_CONTROL_RESULT_FAILED);
} else {
if (ugd->file_select_mode == GE_FILE_SELECT_T_IMFT) {
_ge_ext_load_app(ugd, FILETRANSFER, paths, sel_cnt);
eina_convert_itoa(sel_cnt, t_str);
app_control_add_extra_data(ugd->service,
- GE_FILE_SELECT_RETURN_COUNT, t_str);
+ GE_FILE_SELECT_RETURN_COUNT, t_str);
app_control_add_extra_data(ugd->service, GE_FILE_SELECT_RETURN_PATH,
- paths);
+ paths);
app_control_add_extra_data_array(ugd->service, APP_CONTROL_DATA_SELECTED,
- (const char **)path_array, sel_cnt);
+ (const char **)path_array, sel_cnt);
app_control_add_extra_data_array(ugd->service, APP_CONTROL_DATA_PATH,
- (const char **)path_array, sel_cnt);
+ (const char **)path_array, sel_cnt);
ug_send_result_full(ugd->ug, ugd->service, APP_CONTROL_RESULT_SUCCEEDED);
}
send_success = true;
}
- GE_SEND_RESULT_FINISHED:
+GE_SEND_RESULT_FINISHED:
if (paths) {
g_free(paths);
}
GE_FREE(path_array);
}
- if (send_success == true)
+ if (send_success == true) {
return 0;
- else
+ } else {
return -1;
+ }
}
int _ge_atoi(const char *number)
char *_ge_str(char *str_id)
{
GE_CHECK_NULL(str_id);
- if (strstr(str_id, "IDS_COM"))
+ if (strstr(str_id, "IDS_COM")) {
return dgettext(GE_STR_DOMAIN_SYS, str_id);
- else if (strstr(str_id, "IDS_"))
+ } else if (strstr(str_id, "IDS_")) {
return dgettext(GE_STR_DOMAIN_LOCAL, str_id);
- else
+ } else {
return str_id;
+ }
}
/* Only for local medias */
static void __ge_albums_create_thumb_cb(media_content_error_e error,
- const char *path, void *user_data)
+ const char *path, void *user_data)
{
if (GE_FILE_EXISTS(path) && error == MEDIA_CONTENT_ERROR_NONE) {
GE_CHECK(user_data);
- ge_cluster *album= (ge_cluster *)user_data;
+ ge_cluster *album = (ge_cluster *)user_data;
album->cover->item->b_create_thumb = false;
GE_CHECK(album->griditem);
elm_gengrid_item_update(album->griditem);
if (GE_FILE_EXISTS(gitem->item->file_url)) {
_ge_data_create_thumb(gitem->item, __ge_albums_create_thumb_cb,
- album);
+ album);
return 0;
}
return -1;
_ge_data_get_album_sel_cnt(ugd, album->cluster->uuid, &sel_cnt);
if (sel_cnt > 0) {
elm_object_item_signal_emit((Elm_Object_Item *)ei,
- "elm,state,elm.text.badge,visible",
- "elm");
+ "elm,state,elm.text.badge,visible",
+ "elm");
album->sel_cnt = sel_cnt;
} else {
album->sel_cnt = 0;
elm_object_item_signal_emit((Elm_Object_Item *)ei,
- "elm,state,elm.text.badge,hidden",
- "elm");
+ "elm,state,elm.text.badge,hidden",
+ "elm");
}
}
ge_dbg("realized");
if (!GE_FILE_EXISTS(album->cover->item->thumb_url) &&
- GE_FILE_EXISTS(album->cover->item->file_url) &&
- (album->cluster->type == GE_PHONE ||
- album->cluster->type == GE_MMC ||
- album->cluster->type == GE_ALL))
+ GE_FILE_EXISTS(album->cover->item->file_url) &&
+ (album->cluster->type == GE_PHONE ||
+ album->cluster->type == GE_MMC ||
+ album->cluster->type == GE_ALL)) {
__ge_albums_create_thumb(album->cover, album);
+ }
GE_CHECK(album->ugd);
ge_ugdata *ugd = album->ugd;
if (ugd->b_multifile) {
if (album->sel_cnt > 0)
elm_object_item_signal_emit(album->griditem,
- "elm,state,elm.text.badge,visible",
- "elm");
+ "elm,state,elm.text.badge,visible",
+ "elm");
else
elm_object_item_signal_emit(album->griditem,
- "elm,state,elm.text.badge,hidden",
- "elm");
+ "elm,state,elm.text.badge,hidden",
+ "elm");
}
}
/* Checking for local files only */
if (album->cluster->type == GE_PHONE ||
- album->cluster->type == GE_MMC ||
- album->cluster->type == GE_ALL) {
+ album->cluster->type == GE_MMC ||
+ album->cluster->type == GE_ALL) {
if (album->cover->item->b_create_thumb) {
_ge_data_cancel_thumb(album->cover->item);
if (ugd->album_select_mode == GE_ALBUM_SELECT_T_ONE) {
ge_dbg("One album selected, return album id");
app_control_add_extra_data(ugd->service,
- GE_ALBUM_SELECT_RETURN_PATH,
- album->cluster->path);
+ GE_ALBUM_SELECT_RETURN_PATH,
+ album->cluster->path);
ge_dbg("return folder-path: %s", album->cluster->path);
ug_send_result_full(ugd->ug, ugd->service, APP_CONTROL_RESULT_SUCCEEDED);
if (!ugd->is_attach_panel) {
__ge_albums_open_album(album_item);
- GE_ALBUMS_DONE:
+GE_ALBUMS_DONE:
ecore_idler_del(ugd->sel_album_idler);
ugd->sel_album_idler = NULL;
}
__ge_split_albums_open_album(album_item);
- GE_ALBUMS_DONE:
+GE_ALBUMS_DONE:
ecore_idler_del(ugd->sel_album_idler);
ugd->sel_album_idler = NULL;
ge_dbg("Select album +++");
snprintf(buf, sizeof(buf), "%d", (int)(album->cluster->count));
if (len > 5) {
snprintf(buf, sizeof(buf), "%.5s... %d", GE_ALBUM_ROOT_NAME, (int)(album->cluster->count));
- }
- else {
+ } else {
snprintf(buf, sizeof(buf), "%s %d", GE_ALBUM_ROOT_NAME, (int)(album->cluster->count));
}
buf[strlen(buf)] = '\0';
} else if (album->cluster->display_name &&
- strlen(album->cluster->display_name)) {
+ strlen(album->cluster->display_name)) {
char *new_name = _ge_ui_get_i18n_album_name(album->cluster);
_ge_data_update_items_cnt(ugd, album);
len = strlen(new_name);
/* Show blue folder name */
if (!g_strcmp0(album->cluster->uuid, GE_ALBUM_ALL_ID) ||
- _ge_data_is_camera_album(album->cluster)) {
+ _ge_data_is_camera_album(album->cluster)) {
Elm_Object_Item *grid_it = album->griditem;
Evas_Object *it_obj = NULL;
it_obj = elm_object_item_widget_get(grid_it);
GE_CHECK_NULL(it_obj);
edje_object_signal_emit(it_obj, "elm,name,show,blue",
- "elm");
+ "elm");
edje_object_message_signal_process(it_obj);
}
} else if (!g_strcmp0(part, "elm.text.date")) {
ge_item *item = NULL;
_ge_data_get_album_cover(ugd, album, &item,
- MEDIA_CONTENT_ORDER_DESC);
+ MEDIA_CONTENT_ORDER_DESC);
if (item == NULL || item->item == NULL) {
album->cover_thumbs_cnt = 0;
_ge_data_util_free_item(item);
ge_dbg("count :%d", sel_cnt);
if (sel_cnt > 0) {
elm_object_item_signal_emit(album->griditem,
- "elm,state,elm.text.badge,visible",
- "elm");
+ "elm,state,elm.text.badge,visible",
+ "elm");
album->sel_cnt = sel_cnt;
snprintf(buf, sizeof(buf), "%d", sel_cnt);
} else {
album->sel_cnt = 0;
elm_object_item_signal_emit(album->griditem,
- "elm,state,elm.text.badge,hidden",
- "elm");
+ "elm,state,elm.text.badge,hidden",
+ "elm");
}
}
return strdup(buf);
static ge_icon_type __ge_albums_set_bg_file(Evas_Object *bg, void *data)
{
GE_CHECK_VAL(data, -1);
- ge_item *git = (ge_item *)data;
+ ge_item *git = (ge_item *)data;
GE_CHECK_VAL(git->album, -1);
ge_cluster *album = git->album;
char *bg_path = GE_ICON_NO_THUMBNAIL;
goto GE_ALBUMS_FAILED;
}
- ret_val= GE_ICON_NORMAL;
- if (GE_FILE_EXISTS(git->item->thumb_url))
+ ret_val = GE_ICON_NORMAL;
+ if (GE_FILE_EXISTS(git->item->thumb_url)) {
bg_path = git->item->thumb_url;
- else if (album && (album->cluster->type == GE_MMC ||
- album->cluster->type == GE_PHONE ||
- album->cluster->type == GE_ALL))
+ } else if (album && (album->cluster->type == GE_MMC ||
+ album->cluster->type == GE_PHONE ||
+ album->cluster->type == GE_ALL)) {
__ge_albums_create_thumb(git, album);
- else
+ } else {
ret_val = -1;
+ }
- GE_ALBUMS_FAILED:
+GE_ALBUMS_FAILED:
#ifdef _USE_ROTATE_BG_GE
_ge_rotate_bg_set_image_file(bg, bg_path);
Evas_Object *_obj = NULL;
if (!g_strcmp0(part, GE_TILE_ICON)) {
_obj = _ge_tile_show_part_icon(obj, part,
- album->cover_thumbs_cnt,
- __ge_albums_set_bg_file,
- (void *)album->cover);
+ album->cover_thumbs_cnt,
+ __ge_albums_set_bg_file,
+ (void *)album->cover);
}
return _obj;
}
GE_CHECK_VAL(ugd, -1);
album->griditem = elm_gengrid_item_append(ugd->albums_view,
- ugd->album_gic, album,
- __ge_albums_sel_cb, album);
+ ugd->album_gic, album,
+ __ge_albums_sel_cb, album);
ge_sdbg("Append [%s], id[%s]", album->cluster->display_name,
- album->cluster->uuid);
+ album->cluster->uuid);
_ge_tile_update_item_size(ugd, ugd->albums_view, ugd->rotate_mode,
- false);
+ false);
album->index = elm_gengrid_items_count(ugd->albums_view);
return 0;
}
GE_CHECK_VAL(ugd, -1);
album->griditem = elm_gengrid_item_append(ugd->albums_view,
- ugd->album_gic, album,
- __ge_split_albums_sel_cb, album);
+ ugd->album_gic, album,
+ __ge_split_albums_sel_cb, album);
ge_sdbg("Append [%s], id[%s]", album->cluster->display_name,
- album->cluster->uuid);
+ album->cluster->uuid);
_ge_tile_update_item_size(ugd, ugd->albums_view, ugd->rotate_mode,
- false);
+ false);
album->index = elm_gengrid_items_count(ugd->albums_view);
return 0;
}
int new_cnt = eina_list_count(ugd->cluster_list->clist);
if (old_cnt != new_cnt)
_ge_tile_update_item_size(ugd, ugd->albums_view,
- ugd->rotate_mode, false);
+ ugd->rotate_mode, false);
ecore_idler_del(ugd->album_idler);
ugd->album_idler = NULL;
ge_dbg("Append album +++");
_ge_ui_save_scroller_pos(parent);
elm_gengrid_clear(parent);
}
- if (is_update)
+ if (is_update) {
_ge_data_get_clusters(ugd, GE_ALBUM_DATA_NONE);
- if (ugd->cluster_list && ugd->cluster_list->clist)
+ }
+ if (ugd->cluster_list && ugd->cluster_list->clist) {
length = eina_list_count(ugd->cluster_list->clist);
- else
+ } else {
return -1;
+ }
ge_dbg("Albums list length: %d", length);
- if (ugd->th)
+ if (ugd->th) {
elm_object_theme_set(parent, ugd->th);
+ }
int grid_cnt = 0;
Elm_Gengrid_Item_Class *gic = elm_gengrid_item_class_new();
if (gic == NULL) {
}
album->griditem = elm_gengrid_item_append(parent,
- gic,
- album,
- __ge_split_albums_sel_cb,
- album);
+ gic,
+ album,
+ __ge_split_albums_sel_cb,
+ album);
if (!strcmp(album->cluster->uuid, ugd->album_item->cluster->uuid)) {
album->select = true;
} else {
album->index = grid_cnt;
grid_cnt++;
ge_sdbg("Append [%s], id=%s.", album->cluster->display_name,
- album->cluster->uuid);
+ album->cluster->uuid);
}
/* Restore previous position of scroller */
_ge_ui_restore_scroller_pos(parent);
}
/* NOT jsut for updating view, but for updating view and data together */
if (ugd->cluster_list->data_type == GE_ALBUM_DATA_LOCAL ||
- ugd->cluster_list->data_type == GE_ALBUM_DATA_WEB) {
+ ugd->cluster_list->data_type == GE_ALBUM_DATA_WEB) {
if (ugd->album_idler) {
ecore_idler_del(ugd->album_idler);
ugd->album_idler = NULL;
_ge_ui_save_scroller_pos(parent);
elm_gengrid_clear(parent);
}
- if (is_update)
+ if (is_update) {
_ge_data_get_clusters(ugd, GE_ALBUM_DATA_NONE);
- if (ugd->cluster_list && ugd->cluster_list->clist)
+ }
+ if (ugd->cluster_list && ugd->cluster_list->clist) {
length = eina_list_count(ugd->cluster_list->clist);
- else
+ } else {
return -1;
+ }
ge_dbg("Albums list length: %d", length);
- if (ugd->th)
+ if (ugd->th) {
elm_object_theme_set(parent, ugd->th);
+ }
/* Jus for updating view, not updating data and view together */
if (ugd->cluster_list->data_type == GE_ALBUM_DATA_NONE &&
- length > GE_ALBUMS_FIRST_COUNT + 1) {
+ length > GE_ALBUMS_FIRST_COUNT + 1) {
length = GE_ALBUMS_FIRST_COUNT + 1;
if (ugd->album_idler) {
ecore_idler_del(ugd->album_idler);
GE_CHECK_VAL(album->cluster, -1);
GE_CHECK_VAL(album->cluster->display_name, -1);
- if (album->cluster->type == GE_ALL)
+ if (album->cluster->type == GE_ALL) {
continue;
+ }
album->griditem = elm_gengrid_item_append(parent,
- ugd->album_gic,
- album,
- __ge_albums_sel_cb,
- album);
+ ugd->album_gic,
+ album,
+ __ge_albums_sel_cb,
+ album);
album->index = grid_cnt;
grid_cnt++;
ge_sdbg("Append [%s], id=%s.", album->cluster->display_name,
- album->cluster->uuid);
+ album->cluster->uuid);
}
/* Restore previous position of scroller */
_ge_ui_restore_scroller_pos(parent);
/* NOT jsut for updating view, but for updating view and data together */
if (ugd->cluster_list->data_type == GE_ALBUM_DATA_LOCAL ||
- ugd->cluster_list->data_type == GE_ALBUM_DATA_WEB) {
+ ugd->cluster_list->data_type == GE_ALBUM_DATA_WEB) {
if (ugd->album_idler) {
ecore_idler_del(ugd->album_idler);
ugd->album_idler = NULL;
static int __ge_albums_del_cbs(Evas_Object *view)
{
- if (view == NULL)
+ if (view == NULL) {
return -1;
+ }
ge_dbg("Delete albums callbacks!");
evas_object_smart_callback_del(view, "realized",
- __ge_albums_realized);
+ __ge_albums_realized);
evas_object_smart_callback_del(view, "unrealized",
- __ge_albums_unrealized);
+ __ge_albums_unrealized);
return 0;
}
elm_gengrid_horizontal_set(grid, EINA_FALSE);
elm_scroller_bounce_set(grid, EINA_FALSE, EINA_TRUE);
elm_scroller_policy_set(grid, ELM_SCROLLER_POLICY_OFF,
- ELM_SCROLLER_POLICY_AUTO);
+ ELM_SCROLLER_POLICY_AUTO);
elm_gengrid_multi_select_set(grid, EINA_TRUE);
evas_object_size_hint_weight_set(grid, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_smart_callback_add(grid, "unrealized",
- __ge_albums_unrealized, ugd);
+ __ge_albums_unrealized, ugd);
evas_object_smart_callback_add(grid, "realized", __ge_split_albums_realized,
- ugd);
+ ugd);
if (__ge_split_view_append_albums(ugd, grid, false) != 0) {
ge_dbgW("Failed to append album items!");
__ge_albums_del_cbs(grid);
ge_dbg("");
GE_CHECK_NULL(parent);
Evas_Object *layout = ge_ui_load_edj(parent, GE_EDJ_FILE,
- GE_GRP_ALBUMVIEW);
+ GE_GRP_ALBUMVIEW);
GE_CHECK_NULL(layout);
- evas_object_show (layout);
+ evas_object_show(layout);
return layout;
}
ge_item *gitem = NULL;
void *pop_cb = evas_object_data_get(ugd->naviframe,
- GE_NAVIFRAME_POP_CB_KEY);
+ GE_NAVIFRAME_POP_CB_KEY);
if (pop_cb) {
- Eina_Bool (*_pop_cb) (void *ugd);
+ Eina_Bool(*_pop_cb)(void * ugd);
_pop_cb = pop_cb;
if (_pop_cb(ugd)) {
}
Evas_Object *ge_thumb_show_part_icon_image(Evas_Object *obj, char *path,
- int item_w, int item_h)
+ int item_w, int item_h)
{
GE_CHECK_NULL(obj);
elm_layout_theme_set(layout, "gengrid", "photoframe",
- "default_layout");
+ "default_layout");
elm_object_part_content_set(layout, "elm.swallow.icon", bg);
evas_object_show(layout);
{
ge_dbgE("Transferring Data to caller");
ge_ugdata *ugd = (ge_ugdata*)data;
- GE_CHECK_VAL(ugd, -1);
+ GE_CHECK(ugd);
/* file selection mode */
char *paths = NULL;
char **path_array = NULL; /* the array size is sel_cnt */
- bool send_success = false;
int sel_cnt = 0;
int i = 0;
_ge_data_get_sel_paths(ugd, &paths, &path_array, &sel_cnt);
if (sel_cnt <= 0) {
ge_dbgE("Invalid selected path count!");
- send_success = false;
goto GE_SEND_RESULT_FINISHED;
}
- char t_str[32] = { 0, };
+ char t_str[32] = {0,};
eina_convert_itoa(sel_cnt, t_str);
app_control_add_extra_data(ugd->service,
- GE_FILE_SELECT_RETURN_COUNT, t_str);
+ GE_FILE_SELECT_RETURN_COUNT, t_str);
app_control_add_extra_data(ugd->service, GE_FILE_SELECT_RETURN_PATH,
- paths);
+ paths);
app_control_add_extra_data_array(ugd->service, APP_CONTROL_DATA_SELECTED,
- (const char **)path_array, sel_cnt);
+ (const char **)path_array, sel_cnt);
app_control_add_extra_data_array(ugd->service, APP_CONTROL_DATA_PATH,
- (const char **)path_array, sel_cnt);
+ (const char **)path_array, sel_cnt);
ug_send_result_full(ugd->ug, ugd->service, APP_CONTROL_RESULT_SUCCEEDED);
- send_success = true;
ugd->selected_elist = eina_list_free(ugd->selected_elist);
+
GE_SEND_RESULT_FINISHED:
if (paths) {
if (!g_strcmp0(gitem->item->thumb_url, DEFAULT_THUMBNAIL)) {
elm_check_state_set(obj, EINA_FALSE);
char *pStrWarning = g_strdup_printf(
- GE_STR_UNSUPPORTED_FILE,
- NULL);
+ GE_STR_UNSUPPORTED_FILE,
+ NULL);
notification_status_message_post(pStrWarning);
GE_FREE(pStrWarning);
_ge_data_util_free_sel_item(sit);
if ((ugd->max_count != -1) && (gitem->ugd->thumbs_d->tot_selected + 1 > ugd->max_count)) {
elm_check_state_set(obj, EINA_FALSE);
char *pStrWarning = g_strdup_printf(
- GE_STR_MAX_PICTURES_SELECTED,
- ugd->max_count);
+ GE_STR_MAX_PICTURES_SELECTED,
+ ugd->max_count);
notification_status_message_post(pStrWarning);
GE_FREE(pStrWarning);
_ge_data_util_free_sel_item(sit);
char *text = NULL;
Evas_Object *btn = NULL;
- btn = elm_object_item_part_content_get (ugd->nf_it , GE_NAVIFRAME_TITLE_RIGHT_BTN);
+ btn = elm_object_item_part_content_get(ugd->nf_it , GE_NAVIFRAME_TITLE_RIGHT_BTN);
if (btn == NULL) {
ge_dbgE("Failed to get part information");
}
ge_ugdata *ugd = (ge_ugdata *)data;
Evas_Object *layout = ge_ui_load_edj(ugd->albums_view, GE_EDJ_FILE,
- "nocontent");
+ "nocontent");
ge_dbg("Nocontents label: %s", GE_STR_NO_ITEMS);
/* Full view nocontents */
Evas_Object *noc_lay = elm_layout_add(layout);
evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
GE_CHECK_NULL(layout);
- evas_object_show (layout);
+ evas_object_show(layout);
return layout;
}
if (gitem->item->type == MEDIA_CONTENT_TYPE_IMAGE) {
layout = ge_thumb_show_part_icon_image(obj, path,
- ugd->thumbs_d->icon_w,
- ugd->thumbs_d->icon_h);
+ ugd->thumbs_d->icon_w,
+ ugd->thumbs_d->icon_h);
}
elm_check_state_set(ck, gitem->checked);
ugd->thumbs_d->check = ck;
evas_object_smart_callback_add(ck, "changed",
- __ge_check_state_changed_cb, gitem);
+ __ge_check_state_changed_cb, gitem);
evas_object_show(ck);
return ck;
static char*
__ge_gengrid_text_get_cb(void *data, Evas_Object *obj, const char *part)
{
- return strdup(GE_STR_GALLERY);
+ return strdup(GE_STR_GALLERY);
}
static void
__ge_gallery_ug_result_cb(app_control_h request, app_control_h reply, app_control_result_e result, void *data)
{
- ge_ugdata *ugd=(ge_ugdata *)data;
+ ge_ugdata *ugd = (ge_ugdata *)data;
char **pathArray = NULL;
int arrayLength = 0;
int i = 0;
eina_convert_itoa(arrayLength, t_str);
app_control_add_extra_data(ugd->service,
- GE_FILE_SELECT_RETURN_COUNT, t_str);
+ GE_FILE_SELECT_RETURN_COUNT, t_str);
app_control_add_extra_data_array(ugd->service, APP_CONTROL_DATA_SELECTED,
- (const char **)pathArray, arrayLength);
+ (const char **)pathArray, arrayLength);
app_control_add_extra_data_array(ugd->service, APP_CONTROL_DATA_PATH,
- (const char **)pathArray, arrayLength);
+ (const char **)pathArray, arrayLength);
ug_send_result_full(ugd->ug, ugd->service, APP_CONTROL_RESULT_SUCCEEDED);
if (pathArray) {
static void
__ge_launch_ug_gallery(void *data, Evas_Object *obj, void *ei)
{
- ge_ugdata *ugd=(ge_ugdata *)data;
- GE_CHECK_VAL(ugd, -1);
+ ge_ugdata *ugd = (ge_ugdata *)data;
+ GE_CHECK(ugd);
char maximum_count [10];
- snprintf (maximum_count, 10, "%d", ugd->max_count);
+ snprintf(maximum_count, 10, "%d", ugd->max_count);
app_control_h svc_handle = NULL;
app_control_add_extra_data(svc_handle, APP_CONTROL_DATA_TOTAL_COUNT, maximum_count);
#endif
app_control_add_extra_data(svc_handle, "launch-type", "select-multiple");
- app_control_add_extra_data(svc_handle, "file-type","image");
+ app_control_add_extra_data(svc_handle, "file-type", "image");
app_control_add_extra_data(svc_handle, "hide-personal", "true");
app_control_send_launch_request(svc_handle, __ge_gallery_ug_result_cb, data);
int ret = app_control_destroy(svc_handle);
ge_dbgW("Add file path failed!");
}
ret = app_control_add_extra_data_array(ugd->service, APP_CONTROL_DATA_SELECTED,
- (const char **)path_array, 1);
+ (const char **)path_array, 1);
ret = app_control_add_extra_data_array(ugd->service, APP_CONTROL_DATA_PATH,
- (const char **)path_array, 1);
+ (const char **)path_array, 1);
if (ret != APP_CONTROL_ERROR_NONE) {
ge_dbgW("Add selected path failed!");
}
ret = ug_send_result_full(ugd->ug, ugd->service,
- APP_CONTROL_RESULT_SUCCEEDED);
+ APP_CONTROL_RESULT_SUCCEEDED);
if (ret != 0) {
ge_dbgW("Send result failed!");
}
elm_gengrid_item_selected_set(ei, EINA_FALSE);
- if (ugd->file_select_mode == GE_FILE_SELECT_T_ONE){
+ if (ugd->file_select_mode == GE_FILE_SELECT_T_ONE) {
int ret = __ge_grid_select_one(gitem, gitem->item->file_url);
if (ret != 0) {
} else if (ugd->file_select_mode == GE_FILE_SELECT_T_MULTIPLE) {
Evas_Object *ck = elm_object_item_part_content_get((Elm_Object_Item *) ei, "checkbox_swallow");
- Eina_Bool *bl = elm_check_state_get(ck);
+ Eina_Bool bl = elm_check_state_get(ck);
if (bl == EINA_FALSE) {
if (!g_strcmp0(gitem->item->thumb_url, DEFAULT_THUMBNAIL)) {
char *pStrWarning = g_strdup_printf(
- GE_STR_UNSUPPORTED_FILE,
- NULL);
+ GE_STR_UNSUPPORTED_FILE,
+ NULL);
notification_status_message_post(pStrWarning);
GE_FREE(pStrWarning);
return;
}
if ((ugd->max_count != -1) && (gitem->ugd->thumbs_d->tot_selected + 1 > ugd->max_count)) {
char *pStrWarning = g_strdup_printf(
- GE_STR_MAX_PICTURES_SELECTED,
- ugd->max_count);
+ GE_STR_MAX_PICTURES_SELECTED,
+ ugd->max_count);
notification_status_message_post(pStrWarning);
GE_FREE(pStrWarning);
return;
_ge_data_util_free_sel_item(sit);
}
- btn = elm_object_item_part_content_get (ugd->nf_it , GE_NAVIFRAME_TITLE_RIGHT_BTN);
+ btn = elm_object_item_part_content_get(ugd->nf_it, GE_NAVIFRAME_TITLE_RIGHT_BTN);
if (btn == NULL) {
ge_dbgE("Failed to get part information");
}
static void
__ge_cancel_cb(void *data, Evas_Object *obj, void *ei)
{
- ge_ugdata *app_data=(ge_ugdata *)data;
+ ge_ugdata *app_data = (ge_ugdata *)data;
Eina_List *l = NULL;
ge_item *gitem = NULL;
if (app_data->is_attach_panel && (app_data->attach_panel_display_mode == ATTACH_PANEL_FULL_MODE)) {
- int ret;
- app_control_h app_control = NULL;
- ret = app_control_create(&app_control);
- if (ret == APP_CONTROL_ERROR_NONE) {
- app_control_add_extra_data(app_control, ATTACH_PANEL_FLICK_MODE_KEY, ATTACH_PANEL_FLICK_MODE_ENABLE);
- app_control_add_extra_data_array(app_control, APP_CONTROL_DATA_PATH,
- NULL, 0);
- /*ret = app_control_add_extra_data(app_control, "__ATTACH_PANEL_SHOW_PANEL__", "false");
-
- if (ret != APP_CONTROL_ERROR_NONE) {
- ge_dbgW("Attach panel show failed");
- }*/
- ret = ug_send_result_full(app_data->ug, app_control, APP_CONTROL_RESULT_FAILED);
- }
- app_control_destroy(app_control);
+ int ret;
+ app_control_h app_control = NULL;
+ ret = app_control_create(&app_control);
+ if (ret == APP_CONTROL_ERROR_NONE) {
+ app_control_add_extra_data(app_control, ATTACH_PANEL_FLICK_MODE_KEY, ATTACH_PANEL_FLICK_MODE_ENABLE);
+ app_control_add_extra_data_array(app_control, APP_CONTROL_DATA_PATH,
+ NULL, 0);
+ /*ret = app_control_add_extra_data(app_control, "__ATTACH_PANEL_SHOW_PANEL__", "false");
+
+ if (ret != APP_CONTROL_ERROR_NONE) {
+ ge_dbgW("Attach panel show failed");
+ }*/
+ ret = ug_send_result_full(app_data->ug, app_control, APP_CONTROL_RESULT_FAILED);
+ }
+ app_control_destroy(app_control);
}
EINA_LIST_FOREACH(app_data->thumbs_d->medias_elist, l, gitem) {
}
app_data->selected_elist = eina_list_free(app_data->selected_elist);
- elm_naviframe_item_pop (app_data->naviframe);
+ elm_naviframe_item_pop(app_data->naviframe);
}
int
ugd->thumbs_d->tot_selected = 0;
ret = _ge_data_get_medias(ugd, ugd->thumbs_d->album_uuid,
- GE_ALL,
- 0,
- GE_GET_UNTIL_LAST_RECORD,
- &(ugd->thumbs_d->medias_elist),
- NULL, NULL);
+ GE_ALL,
+ 0,
+ GE_GET_UNTIL_LAST_RECORD,
+ &(ugd->thumbs_d->medias_elist),
+ NULL, NULL);
if (ret != 0) {
ge_dbgE("###Get items list over[%d]###", ret);
}
elm_gengrid_item_size_set(ugd->thumbs_d->gengrid, size, size);
elm_gengrid_item_append(ugd->thumbs_d->gengrid,
- gic_first,
- NULL, __ge_launch_ug_gallery,
- ugd);
+ gic_first,
+ NULL, __ge_launch_ug_gallery,
+ ugd);
for (i = 0; i < ugd->thumbs_d->medias_cnt; i++) {
gitem = eina_list_nth(ugd->thumbs_d->medias_elist, i);
if (gitem == NULL || gitem->item == NULL ||
- gitem->item->uuid == NULL) {
+ gitem->item->uuid == NULL) {
ge_dbgE("Invalid gitem!");
continue;
}
gitem->ugd = ugd;
gitem->elm_item = elm_gengrid_item_append(ugd->thumbs_d->gengrid,
- ugd->thumbs_d->gic,
- gitem, __ge_gengrid_item_sel_cb,
- gitem);
+ ugd->thumbs_d->gic,
+ gitem, __ge_gengrid_item_sel_cb,
+ gitem);
item_cnt++;
gitem->sequence = item_cnt + 1;
}
} else {
if (ugd->attach_panel_display_mode == ATTACH_PANEL_FULL_MODE) {
- elm_gengrid_item_size_set(ugd->thumbs_d->gengrid, win_w, FULL_MODE_PORTRAIT_HEIGHT);
+ elm_gengrid_item_size_set(ugd->thumbs_d->gengrid, win_w, FULL_MODE_PORTRAIT_HEIGHT);
} else {
elm_gengrid_item_size_set(ugd->thumbs_d->gengrid, win_w, HALF_MODE_PORTRAIT_HEIGHT);
}
ugd->nocontents = _ge_nocontents_create(ugd);
elm_gengrid_item_append(ugd->thumbs_d->gengrid,
- no_content ,
- ugd, NULL,
- ugd);
+ no_content ,
+ ugd, NULL,
+ ugd);
}
ugd->file_select_mode = GE_FILE_SELECT_T_ONE;
ret = _ge_data_get_medias(ugd, ugd->thumbs_d->album_uuid,
- GE_ALL,
- 0,
- GE_GET_UNTIL_LAST_RECORD,
- &(ugd->thumbs_d->medias_elist),
- NULL, NULL);
+ GE_ALL,
+ 0,
+ GE_GET_UNTIL_LAST_RECORD,
+ &(ugd->thumbs_d->medias_elist),
+ NULL, NULL);
if (ret != 0) {
ge_dbgE("###Get items list over[%d]###", ret);
elm_scroller_bounce_set(gengrid, EINA_FALSE, EINA_TRUE);
#endif
elm_scroller_policy_set(gengrid, ELM_SCROLLER_POLICY_OFF,
- ELM_SCROLLER_POLICY_AUTO);
+ ELM_SCROLLER_POLICY_AUTO);
evas_object_size_hint_weight_set(gengrid, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
if (ugd->is_attach_panel && (ugd->attach_panel_display_mode != ATTACH_PANEL_FULL_MODE)) {
if (ugd->is_attach_panel) {
evas_object_smart_callback_add(gengrid, "scroll,anim,stop",
- _ge_grid_move_stop_cb, ugd);
+ _ge_grid_move_stop_cb, ugd);
evas_object_smart_callback_add(gengrid, "scroll,drag,stop",
- _ge_grid_move_stop_cb, ugd);
+ _ge_grid_move_stop_cb, ugd);
}
ugd->thumbs_d->gic = elm_gengrid_item_class_new();
if (ugd->thumbs_d->medias_cnt > 0) {
elm_gengrid_item_size_set(gengrid, size, size);
elm_gengrid_item_append(gengrid,
- gic_first,
- NULL, __ge_launch_ug_gallery,
- ugd);
+ gic_first,
+ NULL, __ge_launch_ug_gallery,
+ ugd);
/* From zeroth IMAGE item to last one */
for (i = 0; i < ugd->thumbs_d->medias_cnt; i++) {
gitem = eina_list_nth(ugd->thumbs_d->medias_elist, i);
if (gitem == NULL || gitem->item == NULL ||
- gitem->item->uuid == NULL) {
+ gitem->item->uuid == NULL) {
ge_dbgE("Invalid gitem!");
continue;
}
gitem->ugd = ugd;
gitem->elm_item = elm_gengrid_item_append(gengrid,
- ugd->thumbs_d->gic,
- gitem, __ge_gengrid_item_sel_cb,
- gitem);
+ ugd->thumbs_d->gic,
+ gitem, __ge_gengrid_item_sel_cb,
+ gitem);
item_cnt++;
gitem->sequence = item_cnt + 1;
ugd->nocontents = _ge_nocontents_create(ugd);
elm_gengrid_item_size_set(gengrid, win_w, HALF_MODE_PORTRAIT_HEIGHT);
elm_gengrid_item_append(gengrid,
- no_content,
- ugd, NULL,
- ugd);
+ no_content,
+ ugd, NULL,
+ ugd);
}
evas_object_show(gengrid);
/* Changed to show no contents if needed */
if (!ugd->cluster_list->clist ||
- (eina_list_count(ugd->cluster_list->clist) == 0)) {
+ (eina_list_count(ugd->cluster_list->clist) == 0)) {
_ge_data_get_clusters(ugd, GE_ALBUM_DATA_NONE);
ugd->cluster_list->append_cb = __ge_albums_append;
if (!ugd->cluster_list->clist ||
- (eina_list_count(ugd->cluster_list->clist) == 0)) {
- ge_dbgW("Clusters list is empty!");
- goto ALBUMS_FAILED;
+ (eina_list_count(ugd->cluster_list->clist) == 0)) {
+ ge_dbgW("Clusters list is empty!");
+ goto ALBUMS_FAILED;
}
}
ugd->albums_view = __ge_albums_add_view(ugd, ugd->naviframe);
GE_CHECK_VAL(ugd->albums_view, -1);
- Evas_Object *tmp=NULL;
- tmp=elm_object_part_content_get(ugd->albums_view_ly,"contents");
- if (tmp!=NULL) {
- ge_dbgE("tmp was not empty MULKUKU:------------------------------>");
+ Evas_Object *tmp = NULL;
+ tmp = elm_object_part_content_get(ugd->albums_view_ly, "contents");
+ if (tmp != NULL) {
+ ge_dbgE("tmp was not empty");
elm_object_part_content_unset(ugd->albums_view_ly, "contents");
evas_object_hide(tmp);
}
elm_object_part_content_set(ugd->albums_view_ly, "contents",
- ugd->albums_view);
+ ugd->albums_view);
ge_dbgE("!!!!! album view !!!!!!!! is pushed in the naviframe instead of content set");
- ugd->nf_it = elm_naviframe_item_push(ugd->naviframe, GE_ALBUM_NAME, NULL, NULL, ugd->albums_view, NULL );
+ ugd->nf_it = elm_naviframe_item_push(ugd->naviframe, GE_ALBUM_NAME, NULL, NULL, ugd->albums_view, NULL);
if (ugd->nf_it != NULL) {
ge_dbgE("!!!! album view !!!!! is push successfully in the nf");
- }
- else
+ } else {
ge_dbgE("!!!!!! album view !!!!!1111 failed to push in nf ");
+ }
evas_object_show(ugd->albums_view);
} else {
- if (__ge_albums_append_albums(ugd, ugd->albums_view, true) != 0)
+ if (__ge_albums_append_albums(ugd, ugd->albums_view, true) != 0) {
goto ALBUMS_FAILED;
- else {
+ } else {
elm_naviframe_item_pop(ugd->naviframe);
- ugd->nf_it = elm_naviframe_item_push(ugd->naviframe, GE_ALBUM_NAME, NULL, NULL, ugd->albums_view, NULL );
+ ugd->nf_it = elm_naviframe_item_push(ugd->naviframe, GE_ALBUM_NAME, NULL, NULL, ugd->albums_view, NULL);
if (ugd->nf_it != NULL) {
ge_dbgE("!!!! album view !!!!! is push successfully in the nf");
- }
- else
+ } else {
ge_dbgE("!!!!!! album view !!!!!1111 failed to push in nf ");
+ }
}
}
sel_cnt = _ge_data_get_sel_cnt(ugd);
if (ugd->done_it != NULL) {
- if (sel_cnt > 0 && (ugd->max_count < 0 || sel_cnt <= ugd->max_count))
+ if (sel_cnt > 0 && (ugd->max_count < 0 || sel_cnt <= ugd->max_count)) {
_ge_ui_disable_item(ugd->done_it, false);
- else
+ } else {
_ge_ui_disable_item(ugd->done_it, true);
+ }
} else {
ge_dbgW("done item is NULL");
}
_ge_ui_update_label_text(nf_it, sel_cnt, ugd->albums_view_title);
return 0;
- ALBUMS_FAILED:
+ALBUMS_FAILED:
sel_cnt = _ge_data_get_sel_cnt(ugd);
if (ugd->done_it != NULL) {
- if (sel_cnt > 0 && (ugd->max_count < 0 || sel_cnt <= ugd->max_count))
+ if (sel_cnt > 0 && (ugd->max_count < 0 || sel_cnt <= ugd->max_count)) {
_ge_ui_disable_item(ugd->done_it, false);
- else
+ } else {
_ge_ui_disable_item(ugd->done_it, true);
+ }
} else {
ge_dbgW("done item is NULL");
}
- if (ugd->albums_view && ugd->albums_view != ugd->nocontents)
+ if (ugd->albums_view && ugd->albums_view != ugd->nocontents) {
__ge_albums_del_cbs(ugd->albums_view);
+ }
evas_object_del(ugd->albums_view);
evas_object_show(ugd->albums_view);
elm_object_part_content_set(ugd->albums_view_ly, "contents",
- ugd->albums_view);
+ ugd->albums_view);
ge_dbgE("!!!!! album view !!!!!!!! is pushed in the naviframe instead of content set");
- ugd->nf_it = elm_naviframe_item_push(ugd->naviframe, GE_ALBUM_NAME, NULL, NULL,ugd->albums_view, NULL );
+ ugd->nf_it = elm_naviframe_item_push(ugd->naviframe, GE_ALBUM_NAME, NULL, NULL, ugd->albums_view, NULL);
if (ugd->nf_it != NULL) {
ge_dbgE("!!!! album view !!!!! is push successfully in the nf");
- }
- else
+ } else {
ge_dbgE("!!!!!! album view !!!!!1111 failed to push in nf ");
+ }
return -1;
}
static void __ge_grid_done_cb(void *data, Evas_Object *obj, void *ei);
static void __ge_grid_thumb_created_cb(media_content_error_e error,
- const char *path, void *user_data)
+ const char *path, void *user_data)
{
if (GE_FILE_EXISTS(path) && error == MEDIA_CONTENT_ERROR_NONE) {
GE_CHECK(user_data);
int __ge_grid_append_sel_item(ge_ugdata *ugd, ge_item *gitem)
{
if (ugd == NULL || ugd->thumbs_d == NULL ||
- ugd->thumbs_d->album_uuid == NULL || gitem == NULL ||
- gitem->item == NULL) {
+ ugd->thumbs_d->album_uuid == NULL || gitem == NULL ||
+ gitem->item == NULL) {
ge_dbgE("Error input!");
return -1;
}
ge_sel_album_s *salbum = NULL;
Eina_List *l = NULL;
EINA_LIST_FOREACH(ugd->selected_elist, l, salbum) {
- if (salbum == NULL || salbum->uuid == NULL)
+ if (salbum == NULL || salbum->uuid == NULL) {
continue;
+ }
if (!g_strcmp0(salbum->uuid, ugd->thumbs_d->album_uuid)) {
ge_dbg("Found[%s]", salbum->uuid);
ge_dbg("Add new select album");
salbum = _ge_data_util_new_sel_album(ugd->thumbs_d->album_uuid);
ugd->selected_elist = eina_list_append(ugd->selected_elist,
- salbum);
+ salbum);
ge_dbg("Album count: %d", eina_list_count(ugd->selected_elist));
}
if (salbum == NULL) {
int __ge_grid_remove_sel_item(ge_ugdata *ugd, ge_item *gitem)
{
if (ugd == NULL || ugd->thumbs_d == NULL ||
- ugd->thumbs_d->album_uuid == NULL || gitem == NULL ||
- gitem->item == NULL) {
+ ugd->thumbs_d->album_uuid == NULL || gitem == NULL ||
+ gitem->item == NULL) {
ge_dbgE("Error input!");
return -1;
}
ge_sel_album_s *salbum = NULL;
Eina_List *l = NULL;
EINA_LIST_FOREACH(ugd->selected_elist, l, salbum) {
- if (salbum == NULL || salbum->uuid == NULL)
+ if (salbum == NULL || salbum->uuid == NULL) {
continue;
+ }
if (!g_strcmp0(salbum->uuid, ugd->thumbs_d->album_uuid)) {
ge_dbg("Found[%s]", salbum->uuid);
/* Remove item */
ge_sel_item_s *sit = NULL;
EINA_LIST_FOREACH(salbum->elist, l, sit) {
- if (sit == NULL || sit->uuid == NULL)
+ if (sit == NULL || sit->uuid == NULL) {
continue;
- if (g_strcmp0(sit->uuid, gitem->item->uuid))
+ }
+ if (g_strcmp0(sit->uuid, gitem->item->uuid)) {
continue;
+ }
salbum->elist = eina_list_remove(salbum->elist, sit);
_ge_data_util_free_sel_item(sit);
static int __ge_grid_check_sel_items(ge_ugdata *ugd)
{
if (ugd == NULL || ugd->thumbs_d == NULL ||
- ugd->thumbs_d->album_uuid == NULL) {
+ ugd->thumbs_d->album_uuid == NULL) {
ge_dbgE("Error input!");
return -1;
}
ge_sel_album_s *salbum = NULL;
Eina_List *l = NULL;
EINA_LIST_FOREACH(ugd->selected_elist, l, salbum) {
- if (salbum == NULL || salbum->uuid == NULL)
+ if (salbum == NULL || salbum->uuid == NULL) {
continue;
+ }
- if (!g_strcmp0(salbum->uuid, ugd->thumbs_d->album_uuid))
+ if (!g_strcmp0(salbum->uuid, ugd->thumbs_d->album_uuid)) {
break;
+ }
salbum = NULL;
}
/* Remove item */
ge_sel_item_s *sit = NULL;
EINA_LIST_FOREACH(salbum->elist, l, sit) {
- if (sit == NULL || sit->uuid == NULL)
+ if (sit == NULL || sit->uuid == NULL) {
continue;
+ }
if (sit->valid == 1) {
sit->valid = 0;
continue;
static int __ge_grid_get_sel_cnt(ge_ugdata *ugd)
{
if (ugd == NULL || ugd->selected_elist == NULL ||
- ugd->thumbs_d == NULL)
+ ugd->thumbs_d == NULL) {
return 0;
+ }
- if (ugd->thumbs_d->b_mainview)
+ if (ugd->thumbs_d->b_mainview) {
return eina_list_count(ugd->selected_elist);
+ }
- if (ugd->thumbs_d->album_uuid == NULL)
+ if (ugd->thumbs_d->album_uuid == NULL) {
return 0;
+ }
/* Check album is created or not */
ge_sel_album_s *salbum = NULL;
int cnt = 0;
Eina_List *l = NULL;
EINA_LIST_FOREACH(ugd->selected_elist, l, salbum) {
if (salbum == NULL || salbum->elist == NULL ||
- salbum->uuid == NULL ||
- g_strcmp0(salbum->uuid, ugd->thumbs_d->album_uuid))
+ salbum->uuid == NULL ||
+ g_strcmp0(salbum->uuid, ugd->thumbs_d->album_uuid)) {
continue;
+ }
cnt = eina_list_count(salbum->elist);
break;
}
ge_dbg("Count: %d", cnt);
-
+
int cnt_all = _ge_data_get_sel_cnt(ugd);
if (cnt_all > 0) {
ge_dbg("Album count if part ");
Evas_Object *btn = NULL;
- btn = elm_object_item_part_content_get (ugd->thumbs_d->nf_it , GE_NAVIFRAME_TITLE_RIGHT_BTN);
+ btn = elm_object_item_part_content_get(ugd->thumbs_d->nf_it, GE_NAVIFRAME_TITLE_RIGHT_BTN);
if (btn == NULL) {
ge_dbgE("Failed to get part information");
return 0;
}
elm_object_disabled_set(btn, EINA_FALSE);
evas_object_smart_callback_add(btn, "clicked", __ge_grid_done_cb, (void *)ugd);
- }
- else {
+ } else {
ge_dbg("Album count else part ");
Evas_Object *btn = NULL;
- btn = elm_object_item_part_content_get (ugd->thumbs_d->nf_it , GE_NAVIFRAME_TITLE_RIGHT_BTN);
+ btn = elm_object_item_part_content_get(ugd->thumbs_d->nf_it , GE_NAVIFRAME_TITLE_RIGHT_BTN);
if (btn == NULL) {
ge_dbgE("Failed to get part information");
return 0;
elm_object_disabled_set(btn, EINA_TRUE);
evas_object_smart_callback_add(btn, "clicked", NULL, (void *)ugd);
}
-
+
return cnt;
}
GE_CHECK(gitem->item);
/* Checking for local files only */
if (gitem->store_type == GE_MMC || gitem->store_type == GE_ALL ||
- gitem->store_type == GE_PHONE) {
+ gitem->store_type == GE_PHONE) {
/* Use default image */
if (!GE_FILE_EXISTS(gitem->item->thumb_url) &&
- GE_FILE_EXISTS(gitem->item->file_url)) {
+ GE_FILE_EXISTS(gitem->item->file_url)) {
ge_sdbg("File[%s]", gitem->item->file_url);
_ge_data_create_thumb(gitem->item,
- __ge_grid_thumb_created_cb,
- gitem);
+ __ge_grid_thumb_created_cb,
+ gitem);
}
}
}
GE_CHECK(gitem->item);
/* Checking for local files only */
if (gitem->store_type == GE_MMC ||
- gitem->store_type == GE_ALL ||
- gitem->store_type == GE_PHONE) {
+ gitem->store_type == GE_ALL ||
+ gitem->store_type == GE_PHONE) {
if (gitem->item->b_create_thumb) {
_ge_data_cancel_thumb(gitem->item);
}
int ret = -1;
ret = app_control_add_extra_data(ugd->service, GE_FILE_SELECT_RETURN_PATH, file_url);
- if (ret != APP_CONTROL_ERROR_NONE)
+ if (ret != APP_CONTROL_ERROR_NONE) {
ge_dbgW("Add file path failed!");
+ }
ret = app_control_add_extra_data_array(ugd->service, APP_CONTROL_DATA_SELECTED,
- (const char **)path_array, 1);
+ (const char **)path_array, 1);
ret = app_control_add_extra_data_array(ugd->service, APP_CONTROL_DATA_PATH,
- (const char **)path_array, 1);
- if (ret != APP_CONTROL_ERROR_NONE)
+ (const char **)path_array, 1);
+ if (ret != APP_CONTROL_ERROR_NONE) {
ge_dbgW("Add selected path failed!");
+ }
ret = ug_send_result_full(ugd->ug, ugd->service,
- APP_CONTROL_RESULT_SUCCEEDED);
- if (ret != 0)
+ APP_CONTROL_RESULT_SUCCEEDED);
+ if (ret != 0) {
ge_dbgW("Send result failed!");
+ }
if (!ugd->is_attach_panel) {
ug_destroy_me(ugd->ug);
}
if (gitem->item->type == MEDIA_CONTENT_TYPE_IMAGE) {
ge_dbg("Loading UG-IMAGE(VIDEO)-VIEWER");
char album_index_str[12] = {0,};
- eina_convert_itoa( gitem->sequence,album_index_str);
+ eina_convert_itoa(gitem->sequence, album_index_str);
ugd->file_select_setas_path = gitem->item->file_url;
fileurl = strdup(GE_ALBUM_ALL_ID);
_ge_ext_load_iv_ug(ugd, gitem->item->file_url, fileurl, gitem->sequence);
} else if (gitem->item->type == MEDIA_CONTENT_TYPE_VIDEO &&
- ugd->popup == NULL) {
+ ugd->popup == NULL) {
ge_ui_create_popup(ugd, GE_POPUP_ONEBUT,
- GE_POPUP_ONLY_SUPPORT_IMAGE);
+ GE_POPUP_ONLY_SUPPORT_IMAGE);
}
- }
+ }
#ifdef TODO
else if (gitem->item->type == MEDIA_CONTENT_TYPE_IMAGE ||
- gitem->item->type == MEDIA_CONTENT_TYPE_VIDEO) {
+ gitem->item->type == MEDIA_CONTENT_TYPE_VIDEO) {
ge_dbg("Loading UG-IMAGE(VIDEO)-VIEWER");
fileurl = strdup(GE_ALBUM_ALL_ID);
_ge_ext_load_iv_ug(ugd, gitem->item->file_url, fileurl, gitem->sequence);
if (ugd->file_select_mode != GE_FILE_SELECT_T_SETAS) {
if (_ge_get_view_mode(ugd) != GE_VIEW_THUMBS) {
ge_dbgW("Edit mode!");
- if (ugd->thumbs_d->b_multifile)
+ if (ugd->thumbs_d->b_multifile) {
__ge_grid_change_check(data, (Elm_Object_Item *)ei);
- else
+ } else {
_ge_grid_sel_one(ugd, gitem->item->file_url);
+ }
return;
} else {
ge_dbg("ViewMode");
Eina_Bool checked = elm_check_state_get(obj);
if (checked) {
ge_sdbg("Append:%s", gitem->item->file_url);
- if (!ugd->thumbs_d->b_mainview)
+ if (!ugd->thumbs_d->b_mainview) {
__ge_grid_append_sel_item(ugd, gitem);
- else
+ } else
ugd->selected_elist = eina_list_append(ugd->selected_elist,
- gitem);
+ gitem);
} else {
ge_sdbg("Remove:%s", gitem->item->file_url);
- if (!ugd->thumbs_d->b_mainview)
+ if (!ugd->thumbs_d->b_mainview) {
__ge_grid_remove_sel_item(ugd, gitem);
- else
+ } else
ugd->selected_elist = eina_list_remove(ugd->selected_elist,
- gitem);
+ gitem);
}
ugd->thumbs_d->album->select = true;
elm_gengrid_item_update(ugd->thumbs_d->album->griditem);
int local_sel_cnt = __ge_grid_get_sel_cnt(ugd);
int sel_cnt = _ge_data_get_sel_cnt(ugd);
_ge_ui_update_label_text(ugd->thumbs_d->nf_it, sel_cnt,
- ugd->albums_view_title);
+ ugd->albums_view_title);
if (local_sel_cnt == ugd->thumbs_d->medias_cnt) {
ugd->ck_state = EINA_TRUE;
} else {
}
}
if (ugd->thumbs_d->done_it != NULL) {
- if (sel_cnt > 0 && !b_disabled)
+ if (sel_cnt > 0 && !b_disabled) {
_ge_ui_disable_item(ugd->thumbs_d->done_it, false);
- else
+ } else {
_ge_ui_disable_item(ugd->thumbs_d->done_it, true);
+ }
} else {
ge_dbgW("done item is NULL");
}
bool b_favor = false;
int ret = -1;
ret = media_info_get_favorite(gitem->item->media_h, &b_favor);
- if (ret != MEDIA_CONTENT_ERROR_NONE)
+ if (ret != MEDIA_CONTENT_ERROR_NONE) {
ge_dbg("media_info_get_favorite error! ERROR[%d]", ret);
+ }
if (gitem->item->type == MEDIA_CONTENT_TYPE_VIDEO) {
int v_dur = 0;
- _ge_local_data_get_duration(gitem->item->media_h, &v_dur);
+ _ge_local_data_get_duration(gitem->item->media_h, &v_dur);
layout = _ge_thumb_show_part_icon_video(obj, path,
- v_dur, 0, b_favor,
- ugd->thumbs_d->icon_w,
- ugd->thumbs_d->icon_h);
+ v_dur, 0, b_favor,
+ ugd->thumbs_d->icon_w,
+ ugd->thumbs_d->icon_h);
} else {
layout = _ge_thumb_show_part_icon_image(obj, path,
- orient, b_favor,
- ugd->thumbs_d->icon_w,
- ugd->thumbs_d->icon_h);
+ orient, b_favor,
+ ugd->thumbs_d->icon_w,
+ ugd->thumbs_d->icon_h);
}
return layout;
} else if (!g_strcmp0(part, GE_GRID_CHECKBOX) &&
- (_ge_get_view_mode(ugd) == GE_VIEW_THUMBS_EDIT) &&
- ugd->thumbs_d->b_multifile) { /* Show checkbox for multiple files selection */
+ (_ge_get_view_mode(ugd) == GE_VIEW_THUMBS_EDIT) &&
+ ugd->thumbs_d->b_multifile) { /* Show checkbox for multiple files selection */
Evas_Object* ck = NULL;
ck = elm_check_add(obj);
GE_CHECK_NULL(ck);
evas_object_propagate_events_set(ck, EINA_FALSE);
elm_check_state_set(ck, gitem->checked);
evas_object_smart_callback_add(ck, "changed",
- __ge_grid_check_changed, data);
+ __ge_grid_check_changed, data);
evas_object_show(ck);
return ck;
_ge_ui_save_scroller_pos(parent);
elm_gengrid_clear(parent);
}
- if (is_update)
+ if (is_update) {
_ge_grid_update_data(ugd);
- if (ugd->th)
+ }
+ if (ugd->th) {
elm_object_theme_set(parent, ugd->th);
+ }
for (i = 0; i < ugd->thumbs_d->medias_cnt; i++) {
gitem = eina_list_nth(ugd->thumbs_d->medias_elist, i);
if (gitem == NULL || gitem->item == NULL ||
- gitem->item->uuid == NULL) {
+ gitem->item->uuid == NULL) {
ge_dbgE("Invalid gitem!");
continue;
}
gitem->ugd = ugd;
gitem->elm_item = elm_gengrid_item_append(parent,
- ugd->thumbs_d->gic,
- gitem, __ge_grid_sel,
- gitem);
+ ugd->thumbs_d->gic,
+ gitem, __ge_grid_sel,
+ gitem);
item_cnt++;
gitem->sequence = item_cnt;
}
/* Restore previous position of scroller */
_ge_ui_restore_scroller_pos(parent);
- if (item_cnt == 0)
+ if (item_cnt == 0) {
return EINA_FALSE;
- else
+ } else {
return EINA_TRUE;
+ }
}
static Evas_Object* __ge_grid_create_ly(Evas_Object *parent)
layout = ge_ui_load_edj(parent, GE_EDJ_FILE, GE_GRP_GRIDVIEW);
GE_CHECK_NULL(layout);
- evas_object_show (layout);
+ evas_object_show(layout);
return layout;
}
if (view) {
ge_dbg("Delete callbacks");
evas_object_smart_callback_del(view, "realized",
- __ge_grid_realized);
+ __ge_grid_realized);
evas_object_smart_callback_del(view, "unrealized",
- __ge_grid_unrealized);
+ __ge_grid_unrealized);
}
return 0;
}
static int __ge_grid_rotate_view(ge_ugdata *ugd)
{
if (ugd && ugd->thumbs_d && ugd->thumbs_d->view &&
- ugd->thumbs_d->nocontents != ugd->thumbs_d->view) {
+ ugd->thumbs_d->nocontents != ugd->thumbs_d->view) {
_ge_thumb_set_size(ugd, ugd->thumbs_d->view, ugd->rotate_mode,
- &(ugd->thumbs_d->icon_w),
- &(ugd->thumbs_d->icon_h));
+ &(ugd->thumbs_d->icon_w),
+ &(ugd->thumbs_d->icon_h));
return 0;
} else {
return -1;
/* Free data after layout deleted */
static void __ge_grid_delete_layout_cb(void *data, Evas *e, Evas_Object *obj,
- void *ei)
+ void *ei)
{
ge_dbg("Delete layout ---");
-/* evas_object_event_callback_del(obj, EVAS_CALLBACK_DEL,
- __ge_grid_delete_layout_cb);*/
+ /* evas_object_event_callback_del(obj, EVAS_CALLBACK_DEL,
+ __ge_grid_delete_layout_cb);*/
GE_CHECK(data);
ge_ugdata *ugd = (ge_ugdata *)data;
GE_CHECK(ugd->thumbs_d);
GE_IF_DEL_IDLER(ugd->thumbs_d->append_idler)
if (ugd->file_select_mode == GE_FILE_SELECT_T_ONE) {
app_control_remove_extra_data(ugd->service,
- GE_FILE_SELECT_RETURN_PATH);
+ GE_FILE_SELECT_RETURN_PATH);
}
ugd->rotate_cbs = eina_list_remove(ugd->rotate_cbs,
- __ge_grid_rotate_view);
+ __ge_grid_rotate_view);
if (ugd->thumbs_d->nocontents != ugd->thumbs_d->view) {
elm_gengrid_clear(ugd->thumbs_d->view);
__ge_grid_del_cbs(ugd->thumbs_d->view);
_ge_ui_del_scroller_pos(ugd->thumbs_d->view);
}
- if (ugd->thumbs_d->gic)
+ if (ugd->thumbs_d->gic) {
elm_gengrid_item_class_free(ugd->thumbs_d->gic);
+ }
/* Clear view data */
_ge_data_free_medias(&(ugd->thumbs_d->medias_elist));
ugd->thumbs_d->medias_cnt = 0;
int ret = -1;
ge_dbg("First view medias count: %d;", ugd->thumbs_d->medias_cnt);
- if (ugd->thumbs_d->medias_cnt != (GE_FIRST_VIEW_END_POS+1)) {
+ if (ugd->thumbs_d->medias_cnt != (GE_FIRST_VIEW_END_POS + 1)) {
ge_dbg("No any more items!");
- if (ugd->thumbs_d->b_multifile)
+ if (ugd->thumbs_d->b_multifile) {
__ge_grid_check_sel_items(ugd);
+ }
return -1;
}
Eina_List *sel_ids = NULL;
if (ugd->thumbs_d->b_multifile) {
- ge_dbg("Edit view for multiple selection");
+ ge_dbg("Edit view for multiple selection");
/* Get ID list of selected items */
_ge_grid_get_selected_ids(ugd, &sel_ids);
}
/* Get other items from DB */
ret = _ge_data_get_medias(ugd, ugd->thumbs_d->album_uuid,
- ugd->thumbs_d->store_type,
- (GE_FIRST_VIEW_END_POS+1),
- GE_GET_UNTIL_LAST_RECORD,
- &(ugd->thumbs_d->medias_elist),
- _ge_data_restore_selected, sel_ids);
- if (ugd->thumbs_d->b_multifile)
+ ugd->thumbs_d->store_type,
+ (GE_FIRST_VIEW_END_POS + 1),
+ GE_GET_UNTIL_LAST_RECORD,
+ &(ugd->thumbs_d->medias_elist),
+ _ge_data_restore_selected, sel_ids);
+ if (ugd->thumbs_d->b_multifile) {
__ge_grid_check_sel_items(ugd);
+ }
ge_dbgW("###Get items list over[%d]###", ret);
if (ret < 0) {
for (i = GE_FIRST_VIEW_END_POS + 1; i < ugd->thumbs_d->medias_cnt; i++) {
gitem = eina_list_nth(ugd->thumbs_d->medias_elist, i);
if (gitem == NULL || gitem->item == NULL ||
- gitem->item->uuid == NULL) {
+ gitem->item->uuid == NULL) {
ge_dbgE("Invalid gitem!");
continue;
}
gitem->ugd = ugd;
gitem->elm_item = elm_gengrid_item_append(ugd->thumbs_d->view,
- ugd->thumbs_d->gic,
- gitem, __ge_grid_sel,
- gitem);
+ ugd->thumbs_d->gic,
+ gitem, __ge_grid_sel,
+ gitem);
item_cnt++;
gitem->sequence = item_cnt + GE_FIRST_VIEW_END_POS + 1;
}
ge_dbgW("Use idler to append other medias--Done");
- if (item_cnt == 0)
+ if (item_cnt == 0) {
return -1;
- else
+ } else {
return 0;
+ }
}
static Eina_Bool __ge_grid_append_thumb_idler_cb(void *data)
if (ugd->file_select_mode == GE_FILE_SELECT_T_SLIDESHOW) {
ug_send_result_full(ugd->ug, ugd->service,
- APP_CONTROL_RESULT_FAILED);
+ APP_CONTROL_RESULT_FAILED);
//ug_destroy_me(ugd->ug);
ge_dbg("ug_destroy_me");
/*If return ture, ug will pop naviframe first.*/
for (; i < ugd->thumbs_d->medias_cnt; ++i) {
gitem = eina_list_nth(ugd->thumbs_d->medias_elist, i);
if (NULL == gitem || NULL == gitem->item ||
- NULL == gitem->item->file_url || NULL == gitem->elm_item) {
+ NULL == gitem->item->file_url || NULL == gitem->elm_item) {
continue;
}
if (gitem->checked == ugd->ck_state) {
gitem->checked = ugd->ck_state;
if (ugd->ck_state == EINA_TRUE) {
__ge_grid_append_sel_item(ugd, gitem);
- }
- else {
+ } else {
__ge_grid_remove_sel_item(ugd, gitem);
}
ck = elm_object_item_part_content_get(gitem->elm_item, GE_GRID_CHECKBOX);
int sel_cnt = __ge_grid_get_sel_cnt(ugd);
sel_cnt = _ge_data_get_sel_cnt(ugd);
_ge_ui_update_label_text(ugd->thumbs_d->nf_it, sel_cnt,
- ugd->albums_view_title);
+ ugd->albums_view_title);
elm_gengrid_item_update(ugd->thumbs_d->album->griditem);
}
static void __ge_grid_done_cb(void *data, Evas_Object *obj, void *ei)
int i = 0;
ge_item *gitem = NULL;
Evas_Object *ck = NULL;
-
+
/* Check album is created or not */
ge_sel_album_s *salbum = NULL;
int cnt = 0;
Eina_List *l = NULL;
EINA_LIST_FOREACH(ugd->selected_elist, l, salbum) {
if (salbum == NULL || salbum->elist == NULL ||
- salbum->uuid == NULL ||
- g_strcmp0(salbum->uuid, ugd->thumbs_d->album_uuid))
+ salbum->uuid == NULL ||
+ g_strcmp0(salbum->uuid, ugd->thumbs_d->album_uuid)) {
continue;
+ }
cnt = eina_list_count(salbum->elist);
break;
}
ge_dbg("Count: %d", cnt);
-
- if (cnt == 0)
+
+ if (cnt == 0) {
return;
-
+ }
+
for (; i < ugd->thumbs_d->medias_cnt; ++i) {
gitem = eina_list_nth(ugd->thumbs_d->medias_elist, i);
if (NULL == gitem || NULL == gitem->item ||
- NULL == gitem->item->file_url || NULL == gitem->elm_item)
+ NULL == gitem->item->file_url || NULL == gitem->elm_item) {
continue;
+ }
- if (gitem->checked == ugd->ck_state)
+ if (gitem->checked == ugd->ck_state) {
continue;
+ }
gitem->checked = ugd->ck_state;
if (!ugd->thumbs_d->b_mainview) {
- if (ugd->ck_state == EINA_TRUE)
- {
+ if (ugd->ck_state == EINA_TRUE) {
ge_dbgE("if part fun will be called ");
// __ge_main_done_cb(ugd, NULL, NULL);
_ge_send_result(ugd);
ug_destroy_me(ugd->ug);
}
//__ge_grid_append_sel_item(ugd, gitem);
- }
- else
- {
+ } else {
ge_dbgE("else part fun will be called ");
// __ge_main_done_cb(ugd, NULL, NULL);
_ge_send_result(ugd);
} else {
if (ugd->ck_state == EINA_TRUE)
ugd->selected_elist = eina_list_append(ugd->selected_elist,
- gitem);
+ gitem);
else
ugd->selected_elist = eina_list_remove(ugd->selected_elist,
- gitem);
+ gitem);
}
ck = elm_object_item_part_content_get(gitem->elm_item, GE_GRID_CHECKBOX);
if (ck == NULL) {
ge_dbgE("Invalid checkbox!");
continue;
}
- if (elm_check_state_get(ck) != ugd->ck_state)
+ if (elm_check_state_get(ck) != ugd->ck_state) {
elm_check_state_set(ck, ugd->ck_state);
+ }
}
int sel_cnt = __ge_grid_get_sel_cnt(ugd);
_ge_ui_update_label_text(ugd->thumbs_d->nf_it, sel_cnt,
- ugd->albums_view_title);
+ ugd->albums_view_title);
bool b_disabled = false;
if (!ugd->thumbs_d->b_mainview) {
sel_cnt = _ge_data_get_sel_cnt(ugd);
if (ugd->max_count > 0 && sel_cnt > ugd->max_count) {
char *noti = NULL;
- noti = g_strdup_printf(GE_STR_MAXIMUM_COUNT);
+ noti = g_strdup_printf(GE_STR_MAXIMUM_COUNT, ugd->max_count);
_ge_ui_create_notiinfo(noti);
GE_GFREEIF(noti);
b_disabled = true;
}
}
if (ugd->thumbs_d->done_it != NULL) {
- if (sel_cnt > 0 && !b_disabled)
+ if (sel_cnt > 0 && !b_disabled) {
_ge_ui_disable_item(ugd->thumbs_d->done_it, false);
- else
+ } else {
_ge_ui_disable_item(ugd->thumbs_d->done_it, true);
+ }
} else {
ge_dbgW("done item is NULL");
}
}
static int __ge_grid_add_btns(ge_ugdata *ugd, Evas_Object *parent,
- Elm_Object_Item *nf_it)
+ Elm_Object_Item *nf_it)
{
ge_dbg("Multiple selection, show Done");
/* Done */
ge_ugdata *ugd = (ge_ugdata *)data;
void *pop_cb = evas_object_data_get(ugd->naviframe,
- GE_NAVIFRAME_POP_CB_KEY);
+ GE_NAVIFRAME_POP_CB_KEY);
if (pop_cb) {
- Eina_Bool (*_pop_cb) (void *ugd);
+ Eina_Bool(*_pop_cb)(void * ugd);
_pop_cb = pop_cb;
if (_pop_cb(ugd)) {
void _my_custom_keydown_cb(void* data, int type, void* event)
{
Ecore_Event_Key* ev = (Ecore_Event_Key*)event;
- ge_ugdata *app_data=(ge_ugdata *)data;
+ ge_ugdata *app_data = (ge_ugdata *)data;
ge_dbgE("key down call back ");
- if(!strcmp(ev->keyname, "XF86Back")) {
+ if (!strcmp(ev->keyname, "XF86Back")) {
ge_dbg("back key event");
if (app_data->is_attach_panel && (app_data->attach_panel_display_mode == ATTACH_PANEL_FULL_MODE)) {
if (_ge_get_view_mode(app_data) != GE_VIEW_ALBUMS) {
}
}
_ge_tile_update_item_size(app_data, app_data->albums_view, app_data->rotate_mode,
- false);
+ false);
} else if (!strcmp(ev->keyname, "XF86Stop")) {
char label[100];
Elm_Object_Item *top = elm_naviframe_top_item_get(app_data->naviframe);
snprintf(label, sizeof(label), "______________ the label is %s", elm_object_item_part_text_get(top , NULL));
- ge_dbg("%s",label);
+ ge_dbg("%s", label);
back_cnt++;
- if (((a-b) == 1 || back_cnt <= 2)) {
+ if (((a - b) == 1 || back_cnt <= 2)) {
if (back_cnt == 1) {
elm_naviframe_item_pop(app_data->naviframe);
Eina_List *list = elm_naviframe_items_get(app_data->naviframe);
ge_dbgE("Size of the list before pop");
Eina_List *list = elm_naviframe_items_get(app_data->naviframe);
char str[100];
- snprintf(str,sizeof(str)," --------> %d",eina_list_count(list));
- ge_dbg("%s",str );
+ snprintf(str, sizeof(str), " --------> %d", eina_list_count(list));
+ ge_dbg("%s", str);
a = eina_list_count(list);
- ge_dbg(" value of a is %d",a);
+ ge_dbg(" value of a is %d", a);
Elm_Object_Item *top = elm_naviframe_top_item_get(app_data->naviframe);
elm_object_item_del(top);
ge_dbgE("Size of the list after pop");
list = elm_naviframe_items_get(app_data->naviframe);
- snprintf(str,sizeof(str)," --------> %d",eina_list_count(list));
- ge_dbg("%s",str);
+ snprintf(str, sizeof(str), " --------> %d", eina_list_count(list));
+ ge_dbg("%s", str);
b = eina_list_count(list);
ge_dbg("value of b is %d", b);
elm_naviframe_item_push(app_data->naviframe, GE_ALBUM_NAME, NULL, NULL, app_data->albums_view, NULL);
static void __ge_albums_detail_cancel_cb(void *data, Evas_Object *obj, void *ei)
{
- ge_ugdata *app_data=(ge_ugdata *)data;
+ ge_ugdata *app_data = (ge_ugdata *)data;
ge_dbg("back key event");
if (app_data->is_attach_panel && (app_data->attach_panel_display_mode == ATTACH_PANEL_FULL_MODE)) {
if (_ge_get_view_mode(app_data) != GE_VIEW_ALBUMS) {
}
}
_ge_tile_update_item_size(app_data, app_data->albums_view, app_data->rotate_mode,
- false);
- elm_naviframe_item_pop (app_data->naviframe);
+ false);
+ elm_naviframe_item_pop(app_data->naviframe);
}
static int __ge_grid_push_view(ge_ugdata *ugd, Evas_Object *parent,
- Evas_Object *obj, char *title)
+ Evas_Object *obj, char *title)
{
GE_CHECK_VAL(ugd, -1);
GE_CHECK_VAL(parent, -1);
}
ge_dbg("title: %s", title);
/* Add prev button */
-/* Evas_Object *prev_btn = NULL;
- Evas_Object *prev_item = NULL;
- prev_btn = _ge_but_create_but(obj, ugd->th, NULL, NULL,
- GE_BTN_NAVI_PRE, NULL, NULL);
- GE_CHECK_VAL(prev_btn, -1);
-*/
+ /* Evas_Object *prev_btn = NULL;
+ Evas_Object *prev_item = NULL;
+ prev_btn = _ge_but_create_but(obj, ugd->th, NULL, NULL,
+ GE_BTN_NAVI_PRE, NULL, NULL);
+ GE_CHECK_VAL(prev_btn, -1);
+ */
elm_naviframe_prev_btn_auto_pushed_set(parent, EINA_FALSE);
nf_it = elm_naviframe_item_push(parent, title, NULL, NULL, obj,
- NULL);
+ NULL);
if (nf_it == NULL) {
ge_dbgW("nf_it is NULL");
- }
- else {
+ } else {
ge_dbgW("nf_it is NOT NULL");
}
- Eina_List *list=elm_naviframe_items_get(ugd->naviframe);
+ Eina_List *list = elm_naviframe_items_get(ugd->naviframe);
a = eina_list_count(list);
ugd->thumbs_d->nf_it = nf_it;
ugd->key_down_handler = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN,
- (Ecore_Event_Handler_Cb)_my_custom_keydown_cb,
- ugd);
+ (Ecore_Event_Handler_Cb)_my_custom_keydown_cb,
+ ugd);
Evas_Object *btn1 = elm_button_add(parent);
elm_object_text_set(btn2, GE_STR_ID_DONE_CAP);
elm_object_disabled_set(btn2, EINA_TRUE);
elm_object_item_part_content_set(nf_it,
- GE_NAVIFRAME_TITLE_RIGHT_BTN,
- btn2);
+ GE_NAVIFRAME_TITLE_RIGHT_BTN,
+ btn2);
ugd->ck_state = EINA_FALSE;
} else {
elm_object_style_set(btn1, "naviframe/end_btn/default");
elm_object_item_part_content_set(ugd->thumbs_d->nf_it, "prev_btn", btn1);
}
- evas_object_smart_callback_add(btn1, "clicked", __ge_albums_detail_cancel_cb, ugd);
+ evas_object_smart_callback_add(btn1, "clicked", __ge_albums_detail_cancel_cb, ugd);
return 0;
}
/* Register delete callback */
evas_object_event_callback_add(parent, EVAS_CALLBACK_DEL,
- __ge_grid_delete_layout_cb, ugd);
-/* evas_object_smart_callback_add(grid, "unrealized",
- __ge_grid_unrealized, ugd);
- evas_object_smart_callback_add(grid, "realized",
- __ge_grid_realized, ugd);
-*/
+ __ge_grid_delete_layout_cb, ugd);
+ /* evas_object_smart_callback_add(grid, "unrealized",
+ __ge_grid_unrealized, ugd);
+ evas_object_smart_callback_add(grid, "realized",
+ __ge_grid_realized, ugd);
+ */
if (ugd->is_attach_panel && (ugd->attach_panel_display_mode != ATTACH_PANEL_FULL_MODE)) {
elm_scroller_movement_block_set(grid, ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL);
}
if (ugd->is_attach_panel) {
evas_object_smart_callback_add(grid, "scroll,anim,stop",
- _ge_detail_view_grid_move_stop_cb, ugd);
+ _ge_detail_view_grid_move_stop_cb, ugd);
evas_object_smart_callback_add(grid, "scroll,drag,stop",
- _ge_detail_view_grid_move_stop_cb, ugd);
+ _ge_detail_view_grid_move_stop_cb, ugd);
}
_ge_ui_reset_scroller_pos(parent);
elm_scroller_bounce_set(grid, EINA_FALSE, EINA_TRUE);
#endif
elm_scroller_policy_set(grid, ELM_SCROLLER_POLICY_OFF,
- ELM_SCROLLER_POLICY_AUTO);
+ ELM_SCROLLER_POLICY_AUTO);
elm_gengrid_multi_select_set(grid, EINA_TRUE);
evas_object_size_hint_weight_set(grid, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
_ge_thumb_set_size(ugd, grid, ugd->rotate_mode,
- &(ugd->thumbs_d->icon_w), &(ugd->thumbs_d->icon_h));
+ &(ugd->thumbs_d->icon_w), &(ugd->thumbs_d->icon_h));
return grid;
}
{
GE_CHECK_VAL(ids_list, -1);
if (ugd == NULL || ugd->selected_elist == NULL ||
- ugd->thumbs_d == NULL || ugd->thumbs_d->album_uuid== NULL)
+ ugd->thumbs_d == NULL || ugd->thumbs_d->album_uuid == NULL) {
return -1;
+ }
/* Check album is created or not */
ge_sel_album_s *salbum = NULL;
Eina_List *l = NULL;
EINA_LIST_FOREACH(ugd->selected_elist, l, salbum) {
if (salbum == NULL || salbum->elist == NULL ||
- salbum->uuid == NULL)
+ salbum->uuid == NULL) {
continue;
- if (g_strcmp0(salbum->uuid, ugd->thumbs_d->album_uuid))
+ }
+ if (g_strcmp0(salbum->uuid, ugd->thumbs_d->album_uuid)) {
continue;
+ }
*ids_list = salbum->elist;
return 0;
}
thumbs_d->layout = __ge_grid_create_ly(ugd->naviframe);
- if (thumbs_d->layout == NULL)
+ if (thumbs_d->layout == NULL) {
goto GE_GRID_FAILED;
+ }
thumbs_d->gic = elm_gengrid_item_class_new();
- if (thumbs_d->gic == NULL)
+ if (thumbs_d->gic == NULL) {
goto GE_GRID_FAILED;
+ }
ugd->thumbs_d->gic->item_style = "gallery_efl/thumbnail_view";
ugd->thumbs_d->gic->func.text_get = NULL;
ugd->thumbs_d->gic->func.content_get = __ge_grid_get_content;
thumbs_d->view = __ge_grid_add_view(ugd, thumbs_d->layout);
- if (thumbs_d->view == NULL)
+ if (thumbs_d->view == NULL) {
goto GE_GRID_FAILED;
+ }
int w = -1, h = -1;
evas_object_geometry_get(ugd->win, NULL, NULL, &w, &h);
Evas_Object *sel_all_btn = elm_button_add(thumbs_d->layout);
elm_object_part_content_set(thumbs_d->layout, "select.all.area.check.fg", sel_all_btn);
elm_object_style_set(sel_all_btn, "transparent");
- evas_object_smart_callback_add(sel_all_btn, "clicked",__ge_grid_selall_cb, ugd);
+ evas_object_smart_callback_add(sel_all_btn, "clicked", __ge_grid_selall_cb, ugd);
if (w < h) {
- elm_gengrid_item_size_set(thumbs_d->split_view, (w/3)-40, (w/3)-20);
+ elm_gengrid_item_size_set(thumbs_d->split_view, (w / 3) - 40, (w / 3) - 20);
} else {
- elm_gengrid_item_size_set(thumbs_d->split_view, (h/3)-20, (h/3)-40);
+ elm_gengrid_item_size_set(thumbs_d->split_view, (h / 3) - 20, (h / 3) - 40);
}
elm_object_part_content_set(thumbs_d->layout, "contents",
- thumbs_d->view);
+ thumbs_d->view);
elm_object_part_content_set(thumbs_d->layout, "split.view",
- thumbs_d->split_view);
+ thumbs_d->split_view);
__ge_grid_push_view(ugd, ugd->naviframe, thumbs_d->layout,
- ugd->albums_view_title);
+ ugd->albums_view_title);
int sel_cnt = _ge_data_get_sel_cnt(ugd);
if (ugd->thumbs_d->done_it != NULL) {
- if (sel_cnt > 0 && (ugd->max_count < 0 || sel_cnt <= ugd->max_count))
+ if (sel_cnt > 0 && (ugd->max_count < 0 || sel_cnt <= ugd->max_count)) {
_ge_ui_disable_item(ugd->thumbs_d->done_it, false);
- else
+ } else {
_ge_ui_disable_item(ugd->thumbs_d->done_it, true);
+ }
} else {
ge_dbgW("done item is NULL");
}
Evas_Object *ck = elm_object_part_content_get(ugd->thumbs_d->layout, "select.all.area.check");
elm_check_state_set(ck, ugd->ck_state);
_ge_ui_update_label_text(ugd->thumbs_d->nf_it, sel_cnt,
- ugd->albums_view_title);
+ ugd->albums_view_title);
if (ugd->thumbs_d->medias_cnt == (GE_FIRST_VIEW_END_POS + 1)) {
ge_dbgW("Use idler to append other medias--Start");
GE_IF_DEL_IDLER(ugd->thumbs_d->append_idler)
ugd->thumbs_d->append_idler = ecore_idler_add(__ge_grid_append_thumb_idler_cb,
- ugd);
+ ugd);
} else {
if (ugd->thumbs_d->b_multifile) {
__ge_grid_check_sel_items(ugd);
}
}
ugd->rotate_cbs = eina_list_append(ugd->rotate_cbs,
- __ge_grid_rotate_view);
+ __ge_grid_rotate_view);
return 0;
- GE_GRID_FAILED:
+GE_GRID_FAILED:
if (thumbs_d->gic) {
elm_gengrid_item_class_free(thumbs_d->gic);
ge_dbg(" ");
thumbs_d->view = NULL;
thumbs_d->view = __ge_grid_add_view(ugd, thumbs_d->layout);
- if (thumbs_d->view == NULL)
+ if (thumbs_d->view == NULL) {
goto GE_GRID_FAILED;
+ }
elm_object_part_content_set(thumbs_d->layout, "contents",
- thumbs_d->view);
+ thumbs_d->view);
int sel_cnt = _ge_data_get_sel_cnt(ugd);
int grid_sel_cnt = __ge_grid_get_sel_cnt(ugd);
if (grid_sel_cnt == ugd->thumbs_d->medias_cnt) {
Evas_Object *ck = elm_object_part_content_get(ugd->thumbs_d->layout, "select.all.area.check");
elm_object_part_text_set(ugd->thumbs_d->layout, "select.all.area.label", "Select all");
if (ugd->thumbs_d->b_multifile) {
- elm_object_signal_emit(ugd->thumbs_d->layout, "elm,selectall,state,visible,bg", "elm");
- elm_object_signal_emit(ugd->thumbs_d->layout, "elm,selectall,state,visible", "elm");
- }
+ elm_object_signal_emit(ugd->thumbs_d->layout, "elm,selectall,state,visible,bg", "elm");
+ elm_object_signal_emit(ugd->thumbs_d->layout, "elm,selectall,state,visible", "elm");
+ }
elm_check_state_set(ck, ugd->ck_state);
_ge_ui_update_label_text(ugd->thumbs_d->nf_it, sel_cnt,
- ugd->albums_view_title);
+ ugd->albums_view_title);
if (ugd->thumbs_d->medias_cnt == (GE_FIRST_VIEW_END_POS + 1)) {
ge_dbgW("Use idler to append other medias--Start");
GE_IF_DEL_IDLER(ugd->thumbs_d->append_idler)
ugd->thumbs_d->append_idler = ecore_idler_add(__ge_grid_append_thumb_idler_cb,
- ugd);
+ ugd);
} else {
- if (ugd->thumbs_d->b_multifile)
+ if (ugd->thumbs_d->b_multifile) {
__ge_grid_check_sel_items(ugd);
+ }
}
return 0;
- GE_GRID_FAILED:
+GE_GRID_FAILED:
if (thumbs_d->gic) {
elm_gengrid_item_class_free(thumbs_d->gic);
GE_CHECK_VAL(ugd->thumbs_d, -1);
Eina_List *sel_ids = NULL;
if (ugd->b_multifile) {
- ge_dbg("Multiple selection");
+ ge_dbg("Multiple selection");
ugd->thumbs_d->b_multifile = ugd->b_multifile;
/* Get ID list of selected items */
_ge_grid_get_selected_ids(ugd, &sel_ids);
}
/* Get album contents from DB */
_ge_data_get_medias(ugd, album->cluster->uuid, album->cluster->type,
- GE_FIRST_VIEW_START_POS, GE_FIRST_VIEW_END_POS,
- &(ugd->thumbs_d->medias_elist),
- _ge_data_restore_selected, sel_ids);
+ GE_FIRST_VIEW_START_POS, GE_FIRST_VIEW_END_POS,
+ &(ugd->thumbs_d->medias_elist),
+ _ge_data_restore_selected, sel_ids);
ugd->thumbs_d->medias_cnt = eina_list_count(ugd->thumbs_d->medias_elist);
return ugd->thumbs_d->medias_cnt;
int _ge_grid_create_split_view_thumb(ge_cluster *album)
{
- if (back_cnt == 1)
+ if (back_cnt == 1) {
A = 0;
+ }
ge_dbgE("split thumb view starts here");
GE_CHECK_VAL(album, -1);
GE_CHECK_VAL(album->cluster, -1);
elm_object_item_signal_emit(album->griditem, "elm,state,focused", "elm");
if (ugd->selected_griditem && album->griditem != ugd->selected_griditem) {
- elm_object_item_signal_emit(ugd->selected_griditem, "elm,state,unfocused", "elm");
+ elm_object_item_signal_emit(ugd->selected_griditem, "elm,state,unfocused", "elm");
}
ugd->selected_griditem = album->griditem;
return 0;
- GE_GRID_FAILED:
+GE_GRID_FAILED:
GE_FREEIF(ugd->thumbs_d->album_uuid);
GE_FREE(thumbs_d);
int _ge_grid_create_thumb(ge_cluster *album)
{
- if (back_cnt == 1)
+ if (back_cnt == 1) {
A = 0;
+ }
ge_dbgE("thumb view starts here");
GE_CHECK_VAL(album, -1);
GE_CHECK_VAL(album->cluster, -1);
elm_object_item_signal_emit(album->griditem, "elm,state,focused", "elm");
- if (_ge_grid_create_view(ugd, thumbs_d) < 0)
+ if (_ge_grid_create_view(ugd, thumbs_d) < 0) {
goto GE_GRID_FAILED;
+ }
return 0;
- GE_GRID_FAILED:
+GE_GRID_FAILED:
GE_FREEIF(ugd->thumbs_d->album_uuid);
GE_FREE(thumbs_d);
return -1;
} else {
_ge_thumb_set_size(ugd, ugd->thumbs_d->view, ugd->rotate_mode,
- &(ugd->thumbs_d->icon_w),
- &(ugd->thumbs_d->icon_h));
+ &(ugd->thumbs_d->icon_w),
+ &(ugd->thumbs_d->icon_h));
int sel_cnt = __ge_grid_get_sel_cnt(ugd);
_ge_ui_update_label_text(ugd->thumbs_d->nf_it, sel_cnt,
- ugd->albums_view_title);
+ ugd->albums_view_title);
if (!ugd->thumbs_d->b_mainview) {
sel_cnt = _ge_data_get_sel_cnt(ugd);
if (ugd->thumbs_d->done_it != NULL) {
- if (sel_cnt > 0 && (ugd->max_count < 0 || sel_cnt <= ugd->max_count))
+ if (sel_cnt > 0 && (ugd->max_count < 0 || sel_cnt <= ugd->max_count)) {
_ge_ui_disable_item(ugd->thumbs_d->done_it, false);
- else
+ } else {
_ge_ui_disable_item(ugd->thumbs_d->done_it, true);
+ }
} else {
ge_dbgW("done item is NULL");
}
Evas_Object *_ge_grid_get_layout(ge_ugdata *ugd)
{
- if (ugd && ugd->thumbs_d)
+ if (ugd && ugd->thumbs_d) {
return ugd->thumbs_d->layout;
- else
+ } else {
return NULL;
+ }
}
int _ge_grid_update_lang(ge_ugdata *ugd)
}
int count = __ge_grid_get_sel_cnt(ugd);
/* Update the label text */
- _ge_ui_update_label_text(nf_it, count, ugd->albums_view_title);
+ _ge_ui_update_label_text(nf_it, count, ugd->albums_view_title);
return 0;
}
ge_dbg("current album: %s", ugd->thumbs_d->album_uuid);
if (ugd->thumbs_d->b_multifile) {
- ge_dbg("Edit view for multiple selection");
+ ge_dbg("Edit view for multiple selection");
/* Get ID list of selected items */
_ge_grid_get_selected_ids(ugd, &sel_ids);
}
int ret = -1;
if (ugd->tab_mode == GE_CTRL_TAB_ALBUMS) {
ret = _ge_data_update_medias(ugd, ugd->thumbs_d->album_uuid,
- ugd->thumbs_d->store_type,
- &(ugd->thumbs_d->medias_elist),
- _ge_data_restore_selected,
- sel_ids);
+ ugd->thumbs_d->store_type,
+ &(ugd->thumbs_d->medias_elist),
+ _ge_data_restore_selected,
+ sel_ids);
}
- if (ret < 0)
+ if (ret < 0) {
ugd->thumbs_d->medias_cnt = 0;
- else
+ } else {
ugd->thumbs_d->medias_cnt = eina_list_count(ugd->thumbs_d->medias_elist);
+ }
- if (ugd->thumbs_d->b_multifile)
+ if (ugd->thumbs_d->b_multifile) {
__ge_grid_check_sel_items(ugd);
+ }
if (ugd->thumbs_d->medias_cnt <= 0) {
ge_dbgW("Current album is empty!");
int _ge_grid_get_store_type(ge_ugdata *ugd)
{
- if (ugd && ugd->thumbs_d)
+ if (ugd && ugd->thumbs_d) {
return ugd->thumbs_d->store_type;
- else
+ } else {
return -1;
+ }
}
int _ge_grid_create_main_view(ge_ugdata *ugd)
switch (ugd->slideshow_viewby) {
case GE_VIEW_BY_ALL:
case GE_VIEW_BY_ALBUMS:
- if (!ugd->slideshow_album_id)
+ if (!ugd->slideshow_album_id) {
goto GE_GRID_FAILED;
+ }
ugd->thumbs_d->album_uuid = strdup(ugd->slideshow_album_id);
/* Get album contents from DB */
_ge_data_get_medias(ugd, ugd->slideshow_album_id, GE_ALL,
- GE_FIRST_VIEW_START_POS,
- GE_FIRST_VIEW_END_POS,
- &(ugd->thumbs_d->medias_elist), NULL, NULL);
+ GE_FIRST_VIEW_START_POS,
+ GE_FIRST_VIEW_END_POS,
+ &(ugd->thumbs_d->medias_elist), NULL, NULL);
break;
default:
goto GE_GRID_FAILED;
}
return 0;
- GE_GRID_FAILED:
+GE_GRID_FAILED:
GE_FREEIF(ugd->thumbs_d->album_uuid);
GE_FREE(thumbs_d);
elm_object_text_set(btn1, GE_STR_ID_CANCEL_CAP);
elm_object_item_part_content_set(ugd->thumbs_d->nf_it, GE_NAVIFRAME_TITLE_LEFT_BTN, btn1);
Evas_Object *temp = elm_object_item_part_content_unset(ugd->thumbs_d->nf_it,
- "prev_btn");
+ "prev_btn");
ge_dbg("Multiple selection, show Done");
/* Done */
__ge_grid_add_btns(ugd, ugd->naviframe, ugd->thumbs_d->nf_it);
elm_object_text_set(btn2, GE_STR_ID_DONE_CAP);
elm_object_disabled_set(btn2, EINA_TRUE);
elm_object_item_part_content_set(ugd->thumbs_d->nf_it,
- GE_NAVIFRAME_TITLE_RIGHT_BTN,
- btn2);
+ GE_NAVIFRAME_TITLE_RIGHT_BTN,
+ btn2);
ugd->ck_state = EINA_FALSE;
elm_object_signal_emit(ugd->thumbs_d->layout, "elm,selectall,state,visible,bg", "elm");
elm_object_signal_emit(ugd->thumbs_d->layout, "elm,selectall,state,visible", "elm");
}
} else {
Evas_Object *temp = elm_object_item_part_content_unset(ugd->thumbs_d->nf_it,
- GE_NAVIFRAME_TITLE_RIGHT_BTN);
+ GE_NAVIFRAME_TITLE_RIGHT_BTN);
elm_object_style_set(btn1, "naviframe/end_btn/default");
elm_object_item_part_content_set(ugd->thumbs_d->nf_it, "prev_btn", btn1);
Evas_Object *temp1 = elm_object_item_part_content_unset(ugd->thumbs_d->nf_it,
- GE_NAVIFRAME_TITLE_LEFT_BTN);
- elm_object_signal_emit(ugd->thumbs_d->layout, "elm,selectall,state,default", "elm");
+ GE_NAVIFRAME_TITLE_LEFT_BTN);
+ elm_object_signal_emit(ugd->thumbs_d->layout, "elm,selectall,state,default", "elm");
if (temp) {
evas_object_hide(temp);
}
while (it) {
elm_gengrid_item_update(it);
elm_object_item_signal_emit((Elm_Object_Item *)it,
- "elm,state,elm.text.badge,hidden",
- "elm");
+ "elm,state,elm.text.badge,hidden",
+ "elm");
it = elm_gengrid_item_next_get(it);
}
evas_object_smart_callback_add(btn1, "clicked", __ge_albums_detail_cancel_cb, ugd);
grid = ugd->thumbs_d->view;
- }
- else {
+ } else {
ge_dbg("thumb data is null ");
}
} else if (_ge_get_view_mode(ugd) == GE_VIEW_ALBUMS) {
}
}
-bool _ge_is_grid_view(ge_ugdata *ugd) {
+bool _ge_is_grid_view(ge_ugdata *ugd)
+{
if (ugd->thumbs_d && ugd->thumbs_d->nf_it) {
return true;
}
}
static int __ge_main_add_btns(ge_ugdata *ugd, Evas_Object *parent,
- Elm_Object_Item *nf_it)
+ Elm_Object_Item *nf_it)
{
ge_dbg("Multiple selection, show Done");
/* Done */
Elm_Object_Item *tb_it = NULL;
Evas_Object *toolbar = _ge_ui_add_toolbar(parent);
_ge_ui_append_item(toolbar, NULL, GE_STR_ID_CANCEL, __ge_main_cancel_cb,
- ugd);
+ ugd);
tb_it = _ge_ui_append_item(toolbar, NULL, GE_STR_ID_DONE,
- __ge_main_done_cb, ugd);
+ __ge_main_done_cb, ugd);
if (tb_it != NULL) {
_ge_ui_disable_item(tb_it, true);
}
ge_ugdata *ugd = (ge_ugdata *)data;
void *pop_cb = evas_object_data_get(ugd->naviframe,
- GE_NAVIFRAME_POP_CB_KEY);
+ GE_NAVIFRAME_POP_CB_KEY);
if (pop_cb) {
- Eina_Bool (*_pop_cb) (void *ugd);
+ Eina_Bool(*_pop_cb)(void * ugd);
_pop_cb = pop_cb;
if (_pop_cb(ugd)) {
ge_dbg("");
GE_CHECK_NULL(parent);
Evas_Object *layout = ge_ui_load_edj(parent, GE_EDJ_FILE,
- GE_GRP_ALBUMVIEW);
+ GE_GRP_ALBUMVIEW);
GE_CHECK_NULL(layout);
- evas_object_show (layout);
+ evas_object_show(layout);
return layout;
}
#include "ge-ui-util.h"
Evas_Object *_ge_but_create_but(Evas_Object *parent, Elm_Theme *theme,
- const char *icon, const char *text,
- const char *style, But_Smart_Cb cb_func,
- const void *data)
+ const char *icon, const char *text,
+ const char *style, But_Smart_Cb cb_func,
+ const void *data)
{
Evas_Object *btn = NULL;
GE_CHECK_NULL(parent);
btn = elm_button_add(parent);
GE_CHECK_NULL(btn);
- if (theme)
+ if (theme) {
elm_object_theme_set(btn, theme);
+ }
- if (style)
+ if (style) {
elm_object_style_set(btn, style);
+ }
evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL);
if (icon) {
elm_image_aspect_fixed_set(ic, EINA_TRUE);
elm_image_fill_outside_set(ic, EINA_TRUE);
evas_object_size_hint_aspect_set(ic,
- EVAS_ASPECT_CONTROL_VERTICAL,
- 1, 1);
+ EVAS_ASPECT_CONTROL_VERTICAL,
+ 1, 1);
evas_object_size_hint_align_set(ic, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EVAS_HINT_FILL);
evas_object_size_hint_weight_set(ic, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
elm_image_resizable_set(ic, EINA_TRUE, EINA_TRUE);
elm_object_content_set(btn, ic);
}
_ge_ui_set_translate_str(btn, text);
}
- if (cb_func)
+ if (cb_func) {
evas_object_smart_callback_add(btn, "clicked", cb_func, data);
+ }
return btn;
}
Evas_Object *_ge_but_create_image_but(Evas_Object *parent, const char *icon,
- const char *text, const char *style,
- Evas_Smart_Cb cb_func, void *data,
- Eina_Bool flag_propagate)
+ const char *text, const char *style,
+ Evas_Smart_Cb cb_func, void *data,
+ Eina_Bool flag_propagate)
{
GE_CHECK_NULL(parent);
Evas_Object *btn;
btn = elm_button_add(parent);
GE_CHECK_NULL(btn);
ge_ugdata *ugd = (ge_ugdata *)data;
-
+
if (style) {
elm_object_style_set(btn, style);
}
}
evas_object_propagate_events_set(btn, flag_propagate);
- if (cb_func)
+ if (cb_func) {
evas_object_smart_callback_add(btn, "clicked", cb_func, (void *)data);
+ }
return btn;
}
}
static void __ge_rotate_bg_delete_cb(void *data, Evas *e, Evas_Object *obj,
- void *ei)
+ void *ei)
{
if (data) {
ge_bg *bg_data = (ge_bg *)data;
}
static void __ge_rotate_bg_custom_resize(void *data, Evas *e, Evas_Object *obj,
- void *ei)
+ void *ei)
{
GE_CHECK(data);
ge_bg *bg_data = (ge_bg *)data;
}
Evas_Object *_ge_rotate_bg_add_layout(Evas_Object *parent, const char *file,
- const char *group)
+ const char *group)
{
Evas_Object *eo = NULL;
int r = 0;
Evas_Object *base = NULL;
base = _ge_rotate_bg_add_layout(parent, GE_EDJ_FILE,
- GE_ROTATE_BG_GROUP);
+ GE_ROTATE_BG_GROUP);
if (base == NULL) {
GE_FREE(bg_data);
return NULL;
}
- bg_data->base= base;
- bg_data->b_preload= b_preload;
+ bg_data->base = base;
+ bg_data->b_preload = b_preload;
if (!b_preload)
evas_object_event_callback_add(base, EVAS_CALLBACK_RESIZE,
- __ge_rotate_bg_custom_resize,
- bg_data);
+ __ge_rotate_bg_custom_resize,
+ bg_data);
evas_object_event_callback_add(base, EVAS_CALLBACK_DEL,
- __ge_rotate_bg_delete_cb, bg_data);
+ __ge_rotate_bg_delete_cb, bg_data);
evas_object_data_set(base, GE_ROTATE_BG_DATA_KEY, bg_data);
return base;
GE_CHECK_VAL(bg_data, -1);
if (bg_data->file && g_strcmp0(bg_data->file, GE_ICON_NO_THUMBNAIL) &&
- g_strcmp0(bg_data->file, GE_ICON_CONTENTS_BROKEN))
+ g_strcmp0(bg_data->file, GE_ICON_CONTENTS_BROKEN)) {
__ge_rotate_bg_rotate_image(bg_data->img, orient);
- else
+ } else {
__ge_rotate_bg_rotate_image(bg_data->img, GE_ORIENTATION_ROT_0);
- if (!bg_data->b_preload)
+ }
+ if (!bg_data->b_preload) {
__ge_rotate_bg_custom_resize(bg_data, NULL, NULL, NULL);
+ }
return 0;
}
#define GE_GRID_TEXT "elm.text"
Evas_Object *_ge_thumb_show_part_icon_image(Evas_Object *obj, char *path,
- unsigned int orient, bool b_favor,
- int item_w, int item_h)
+ unsigned int orient, bool b_favor,
+ int item_w, int item_h)
{
GE_CHECK_NULL(obj);
#endif
elm_layout_theme_set(layout, GE_CLASS_GENGRID, GE_GRP_PHOTOFRAME,
- GE_PHOTOFRAME_STYLE_DEFAULT);
+ GE_PHOTOFRAME_STYLE_DEFAULT);
elm_object_part_content_set(layout, "elm.swallow.icon", bg);
evas_object_show(layout);
}
Evas_Object *_ge_thumb_show_part_icon_video(Evas_Object *obj, char *path,
- unsigned int v_dur, int bk_len,
- bool b_favor, int item_w, int item_h)
+ unsigned int v_dur, int bk_len,
+ bool b_favor, int item_w, int item_h)
{
GE_CHECK_NULL(obj);
#endif
elm_layout_theme_set(layout, GE_CLASS_GENGRID, GE_GRP_PHOTOFRAME,
- GE_PHOTOFRAME_STYLE_VIDEO);
+ GE_PHOTOFRAME_STYLE_VIDEO);
elm_object_part_content_set(layout, "elm.swallow.icon", bg);
if (bk_len) {
GE_ICON_SET_FILE(icon, GE_THUMB_BOOKMARK);
evas_object_show(icon);
elm_object_part_content_set(layout, "elm.swallow.bookmarkicon",
- icon);
+ icon);
}
char *dur_str = _ge_get_duration_string(v_dur);
#ifdef _USE_SCROL_HORIZONRAL
/* Change icon size and gengrid alignment */
int _ge_thumb_set_size(ge_ugdata *ugd, Evas_Object *view, int rotate_mode,
- int *size_w, int *size_h)
+ int *size_w, int *size_h)
{
GE_CHECK_VAL(view, -1);
GE_CHECK_VAL(ugd, -1);
int win_w = 0;
int win_h = 0;
double scale = _ge_get_win_factor(ugd->win, ugd->b_hide_indicator,
- &win_w, &win_h);
+ &win_w, &win_h);
int _w = 0;
int _h = 0;
int _w_l = 0;
ge_dbg("rotate_mode: %d, count: %d", rotate_mode, count);
_w_l = (int)(GE_GRID_ITEM_SIZE_L_W * scale);
- if (ugd->b_hide_indicator)
+ if (ugd->b_hide_indicator) {
_h_l = (int)(GE_GRID_ITEM_SIZE_L_H_HIDE * scale);
- else
+ } else {
_h_l = (int)(GE_GRID_ITEM_SIZE_L_H * scale);
+ }
if (count <= GE_GRID_ITEM_ZOOM_LEVEL_02_CNT) {
_w = (int)(win_w / GE_GRID_2_PER_ROW);
- if (ugd->b_hide_indicator)
+ if (ugd->b_hide_indicator) {
_h = (int)(GE_GRID_ITEM_SIZE_H_ZOOM_02_HIDE * scale);
- else
+ } else {
_h = (int)(GE_GRID_ITEM_SIZE_H_ZOOM_02 * scale);
+ }
align_c = GE_GRID_ITEM_ZOOM_02_CNT;
} else {
_w = (int)(win_w / GE_GRID_3_PER_ROW);
}
if ((rotate_mode == GE_ROTATE_LANDSCAPE) ||
- (rotate_mode == GE_ROTATE_LANDSCAPE_UPSIDEDOWN)) {
+ (rotate_mode == GE_ROTATE_LANDSCAPE_UPSIDEDOWN)) {
align_c = GE_GRID_ITEM_L_CNT;
elm_gengrid_item_size_set(view, _w_l, _h_l);
- if (size_w)
- *size_w = _w_l-4;
- if (size_h)
- *size_h = _h_l-4;
+ if (size_w) {
+ *size_w = _w_l - 4;
+ }
+ if (size_h) {
+ *size_h = _h_l - 4;
+ }
} else {
elm_gengrid_item_size_set(view, _w, _h);
- if (size_w)
- *size_w = _w-4;
- if (size_h)
- *size_h = _h-4;
+ if (size_w) {
+ *size_w = _w - 4;
+ }
+ if (size_h) {
+ *size_h = _h - 4;
+ }
}
elm_gengrid_align_set(view, 0.0, 0.0);
if (size_w && size_h)
#else
/* Change icon size and gengrid alignment */
int _ge_thumb_set_size(ge_ugdata *ugd, Evas_Object *view, int rotate_mode,
- int *size_w, int *size_h)
+ int *size_w, int *size_h)
{
GE_CHECK_VAL(view, -1);
GE_CHECK_VAL(ugd, -1);
int win_w = 0;
int win_h = 0;
double scale = _ge_get_win_factor(ugd->win, ugd->b_hide_indicator,
- &win_w, &win_h);
+ &win_w, &win_h);
int _w = 0;
int _h = 0;
int _w_l = 0;
_h_l = (int)(356 * scale);
if ((rotate_mode == GE_ROTATE_LANDSCAPE) ||
- (rotate_mode == GE_ROTATE_LANDSCAPE_UPSIDEDOWN)) {
+ (rotate_mode == GE_ROTATE_LANDSCAPE_UPSIDEDOWN)) {
_h_l = _w_l;
elm_gengrid_item_size_set(view, _w_l, _h_l);
- if (size_w)
- *size_w = _w_l-4;
- if (size_h)
- *size_h = _h_l-4;
+ if (size_w) {
+ *size_w = _w_l - 4;
+ }
+ if (size_h) {
+ *size_h = _h_l - 4;
+ }
} else {
_h = _w;
elm_gengrid_item_size_set(view, _w, _h);
- if (size_w)
- *size_w = _w-4;
- if (size_h)
- *size_h = _h-4;
+ if (size_w) {
+ *size_w = _w - 4;
+ }
+ if (size_h) {
+ *size_h = _h - 4;
+ }
}
/*if (count <= align_c)
elm_gengrid_align_set(view, 0.5, 0.5);
}
Evas_Object *_ge_tile_show_part_icon(Evas_Object *obj, const char *part,
- int length, bg_file_set_cb func,
- void *data)
+ int length, bg_file_set_cb func,
+ void *data)
{
GE_CHECK_NULL(part);
GE_CHECK_NULL(strlen(part));
#ifdef _USE_SCROL_HORIZONRAL
/* Change icon size and gengrid alignment */
int _ge_tile_update_item_size(ge_ugdata *ugd, Evas_Object *grid,
- int rotate_mode, bool b_update)
+ int rotate_mode, bool b_update)
{
GE_CHECK_VAL(grid, -1);
GE_CHECK_VAL(ugd, -1);
int win_w = 0;
int win_h = 0;
double scale = _ge_get_win_factor(ugd->win, ugd->b_hide_indicator,
- &win_w, &win_h);
+ &win_w, &win_h);
int w = 0;
int h = 0;
int c = 0;
ge_dbg("scale: %f", scale);
w = (int)(win_w / GE_TILE_2_PER_ROW);
- if (ugd->b_hide_indicator)
+ if (ugd->b_hide_indicator) {
h = (int)(GE_TILE_ITEM_HEIGHT_HIDE * scale);
- else
+ } else {
h = (int)(GE_TILE_ITEM_HEIGHT * scale);
- w_l= (int)(win_h / GE_TILE_3_PER_ROW);
+ }
+ w_l = (int)(win_h / GE_TILE_3_PER_ROW);
h_l = (int)(GE_TILE_ITEM_L_H * scale);
c = GE_TILE_ITEM_CNT;
c_l = GE_TILE_ITEM_L_CNT;
elm_gengrid_align_set(grid, 0.0, 0.0);
if ((rotate_mode == GE_ROTATE_LANDSCAPE) ||
- (rotate_mode == GE_ROTATE_LANDSCAPE_UPSIDEDOWN))
+ (rotate_mode == GE_ROTATE_LANDSCAPE_UPSIDEDOWN)) {
elm_gengrid_item_size_set(grid, w_l, h_l);
- else
+ } else {
elm_gengrid_item_size_set(grid, w, h);
+ }
- if (b_update)
+ if (b_update) {
elm_gengrid_realized_items_update(grid);
+ }
return 0;
}
#else
/* Change icon size and gengrid alignment */
int _ge_tile_update_item_size(ge_ugdata *ugd, Evas_Object *grid,
- int rotate_mode, bool b_update)
+ int rotate_mode, bool b_update)
{
GE_CHECK_VAL(grid, -1);
GE_CHECK_VAL(ugd, -1);
int win_w = 0;
int win_h = 0;
double scale = _ge_get_win_factor(ugd->win, ugd->b_hide_indicator,
- &win_w, &win_h);
+ &win_w, &win_h);
int w = 0;
int h = 0;
int c = 0;
ge_dbg("scale: %f", scale);
w = (int)(win_w / GE_TILE_2_PER_ROW);
h = (int)(300 * scale);
- w_l= (int)(win_h / GE_TILE_3_PER_ROW);
+ w_l = (int)(win_h / GE_TILE_3_PER_ROW);
h_l = w_l;
h = w;
c = GE_TILE_ITEM_CNT;
elm_gengrid_align_set(grid, 0.0, 0.0);
if ((rotate_mode == GE_ROTATE_LANDSCAPE) ||
- (rotate_mode == GE_ROTATE_LANDSCAPE_UPSIDEDOWN))
+ (rotate_mode == GE_ROTATE_LANDSCAPE_UPSIDEDOWN)) {
elm_gengrid_item_size_set(grid, w_l, h_l);
- else
+ } else {
elm_gengrid_item_size_set(grid, w, h);
+ }
- if (b_update)
+ if (b_update) {
elm_gengrid_realized_items_update(grid);
+ }
return 0;
}
#endif