Modify coding guidelines 52/51552/2 accepted/tizen/mobile/20151111.044624 submit/tizen_mobile/20151110.135702
authorPrakash <prakashc.p@samsung.com>
Tue, 10 Nov 2015 12:18:53 +0000 (17:48 +0530)
committerPrakash <prakashc.p@samsung.com>
Tue, 10 Nov 2015 12:42:27 +0000 (18:12 +0530)
Change-Id: I379287e0b844a6a3326a555cbe7114937bbcab05
Signed-off-by: Prakash <prakashc.p@samsung.com>
30 files changed:
include/ge-button.h
include/ge-data-type.h
include/ge-data-util.h
include/ge-db-update.h
include/ge-debug.h
include/ge-local-data.h
include/ge-main-view.h
include/ge-tile.h
include/ge-ui-util.h
include/ge-util.h
src/data/ge-data-type.c
src/data/ge-data-util.c
src/data/ge-data.c
src/data/ge-local-data.c
src/gallery-efl.c
src/util/ge-db-update.c
src/util/ge-exif.c
src/util/ge-ext-exec.c
src/util/ge-ext-ug-load.c
src/util/ge-file-util.c
src/util/ge-lang.c
src/util/ge-ui-util.c
src/util/ge-util.c
src/view/ge-albums.c
src/view/ge-gridview.c
src/view/ge-main-view.c
src/widget/ge-button.c
src/widget/ge-rotate-bg.c
src/widget/ge-thumb.c
src/widget/ge-tile.c

index 03c4c9f..f107aee 100644 (file)
 #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_ */
 
index 709cb12..fdb1a79 100644 (file)
@@ -55,8 +55,7 @@
 #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 */
index db30c67..cc39d97 100644 (file)
@@ -118,8 +118,7 @@ typedef enum {
        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,
index f9e9929..90c46d0 100644 (file)
@@ -23,8 +23,8 @@
 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_
 
index c423cc7..fefa122 100644 (file)
@@ -67,36 +67,36 @@ typedef enum {
 #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!")
index 4426894..9ce071c 100644 (file)
@@ -25,17 +25,17 @@ int _ge_local_data_disconnect(void);
 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);
index b5cbeb4..88f24a9 100644 (file)
@@ -21,8 +21,7 @@
 
 #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;
index 0508afb..3bd50aa 100644 (file)
@@ -35,19 +35,18 @@ typedef enum _ge_tile_type {
        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_
index f1e21ec..33a8436 100644 (file)
@@ -39,9 +39,9 @@ extern "C" {
 #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,
index 03edba0..80cbbde 100644 (file)
@@ -26,7 +26,7 @@
        (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);
@@ -38,7 +38,7 @@ char *_ge_get_duration_string(unsigned int v_dur);
 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);
index d7f395e..f986057 100644 (file)
@@ -70,8 +70,9 @@ int _ge_data_type_free_media_list(Eina_List **list)
        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;
@@ -98,8 +99,9 @@ int _ge_data_type_free_album_list(Eina_List **list)
        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;
@@ -111,15 +113,17 @@ int _ge_data_type_free_geitem(void **item)
        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;
+       }
 }
 
index 39e7b15..ec257fd 100644 (file)
@@ -79,7 +79,7 @@ int _ge_data_util_free_cluster(ge_cluster* gcluster)
 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;
 }
@@ -190,7 +190,7 @@ int _ge_data_util_create_filter2(char *cond, char *keyword, int offset, int coun
 
        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;
@@ -199,10 +199,11 @@ int _ge_data_util_create_filter2(char *cond, char *keyword, int offset, int coun
 
        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;
@@ -221,7 +222,7 @@ int _ge_data_util_create_filter2(char *cond, char *keyword, int offset, int coun
        *filter = _filter;
        return 0;
 
- GE_DATA_UTIL_FAILED:
+GE_DATA_UTIL_FAILED:
 
        if (_filter) {
                media_filter_destroy(_filter);
@@ -246,7 +247,7 @@ int _ge_data_util_create_filter(ge_filter_s *condition, filter_h *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;
@@ -255,8 +256,8 @@ int _ge_data_util_create_filter(ge_filter_s *condition, filter_h *filter)
 
        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;
@@ -266,7 +267,7 @@ int _ge_data_util_create_filter(ge_filter_s *condition, filter_h *filter)
        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;
@@ -276,7 +277,7 @@ int _ge_data_util_create_filter(ge_filter_s *condition, filter_h *filter)
        *filter = tmp_filter;
        return 0;
 
- GE_DATA_UTIL_FAILED:
+GE_DATA_UTIL_FAILED:
 
        if (tmp_filter) {
                media_filter_destroy(tmp_filter);
@@ -299,7 +300,7 @@ int _ge_data_util_destroy_filter(filter_h 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;
@@ -349,17 +350,18 @@ bool _ge_data_util_clone_media(media_info_h media, ge_media_s **pitem,
                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;
@@ -367,7 +369,7 @@ bool _ge_data_util_clone_media(media_info_h media, ge_media_s **pitem,
 
 /** @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);
 
@@ -378,13 +380,13 @@ int _ge_data_util_get_geo_cond(char *cond, double longmin, double longmax,
        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.
@@ -397,15 +399,15 @@ int _ge_data_util_get_geo_cond(char *cond, double longmin, double longmax,
        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);
@@ -416,12 +418,13 @@ int _ge_data_util_get_geo_cond(char *cond, double longmin, double longmax,
 
 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;
 }
 
index c54070e..fcda482 100644 (file)
@@ -30,8 +30,9 @@ int _ge_data_free_sel_album(ge_sel_album_s *album)
        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);
@@ -42,8 +43,9 @@ int _ge_data_free_sel_album(ge_sel_album_s *album)
 /* 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);
@@ -54,16 +56,18 @@ int _ge_data_remove_sel_album(ge_ugdata *ugd, ge_sel_album_s *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;
        }
@@ -91,11 +95,11 @@ int _ge_data_get_sel_paths(ge_ugdata *ugd, char **filepath, char ***filepath_arr
 
        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;
@@ -121,8 +125,9 @@ int _ge_data_get_sel_paths(ge_ugdata *ugd, char **filepath, char ***filepath_arr
        g_string_truncate(selected_path, str_len - 1);
        *filepath = g_string_free(selected_path, false);
 
-       if (cnt)
+       if (cnt) {
                *cnt = _cnt;
+       }
        return 0;
 }
 
@@ -141,7 +146,7 @@ int _ge_data_get_album_sel_cnt(ge_ugdata *ugd, char *uuid, int *cnt)
        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;
                }
@@ -168,14 +173,16 @@ int _ge_data_check_sel_items(ge_ugdata *ugd)
        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;
@@ -186,14 +193,16 @@ int _ge_data_check_sel_items(ge_ugdata *ugd)
 /* 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;
        }
@@ -210,7 +219,7 @@ bool _ge_data_check_selected_id(Eina_List *sel_id_list, const char *id)
 
        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) {
@@ -224,8 +233,8 @@ bool _ge_data_check_selected_id(Eina_List *sel_id_list, const char *id)
                        continue;
                }
 
-                sit->valid = 1;
-                return true;
+               sit->valid = 1;
+               return true;
        }
        return false;
 }
@@ -249,14 +258,15 @@ int _ge_data_update_items_cnt(ge_ugdata *ugd, ge_cluster *album)
        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");
@@ -287,8 +297,9 @@ int _ge_data_free_clusters(ge_ugdata *ugd)
                        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;
                        }
@@ -341,31 +352,34 @@ int _ge_data_get_clusters(ge_ugdata *ugd, int type)
        }
        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;
@@ -379,22 +393,23 @@ int _ge_data_get_clusters(ge_ugdata *ugd, int type)
                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;
@@ -425,8 +440,8 @@ int _ge_data_get_clusters(ge_ugdata *ugd, int type)
                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;
@@ -456,8 +471,9 @@ int _ge_data_get_clusters(ge_ugdata *ugd, int type)
                                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;
        }
@@ -467,11 +483,12 @@ int _ge_data_get_clusters(ge_ugdata *ugd, int type)
                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!");
@@ -501,10 +518,11 @@ int _ge_data_get_cluster(ge_ugdata *ugd, char *uuid, ge_cluster **cluster)
        } 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;
                }
 
@@ -539,8 +557,9 @@ int _ge_data_free_cluster(ge_cluster *cluster)
 /* 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) {
@@ -551,8 +570,8 @@ int _ge_data_free_medias(Eina_List **elist)
 }
 
 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);
@@ -568,7 +587,7 @@ int _ge_data_get_medias(ge_ugdata *ugd, char *uuid, int type, int start_pos,
                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;
@@ -581,7 +600,7 @@ int _ge_data_get_medias(ge_ugdata *ugd, char *uuid, int type, int start_pos,
 
        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;
@@ -603,17 +622,19 @@ int _ge_data_get_medias(ge_ugdata *ugd, char *uuid, int type, int start_pos,
                        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;
@@ -621,9 +642,9 @@ int _ge_data_get_medias(ge_ugdata *ugd, char *uuid, int type, int start_pos,
 
 /* 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);
@@ -640,7 +661,7 @@ int _ge_data_update_medias(ge_ugdata *ugd, char *uuid, int type,
                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;
@@ -652,17 +673,18 @@ int _ge_data_update_medias(ge_ugdata *ugd, char *uuid, int type,
 
        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;
        }
 
@@ -685,8 +707,9 @@ int _ge_data_update_medias(ge_ugdata *ugd, char *uuid, int type,
                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;
@@ -697,7 +720,7 @@ int _ge_data_update_medias(ge_ugdata *ugd, char *uuid, int type,
 }
 
 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);
@@ -718,7 +741,7 @@ int _ge_data_get_album_cover(ge_ugdata *ugd, ge_cluster *album,
                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;
@@ -731,7 +754,7 @@ int _ge_data_get_album_cover(ge_ugdata *ugd, ge_cluster *album,
        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;
@@ -761,7 +784,7 @@ int _ge_data_get_album_cover(ge_ugdata *ugd, ge_cluster *album,
                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;
@@ -773,22 +796,23 @@ int _ge_data_get_album_cover(ge_ugdata *ugd, ge_cluster *album,
        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;
@@ -803,14 +827,14 @@ int _ge_data_get_item_cnt(ge_ugdata *ugd, const char *cluster_id,
                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");
@@ -842,38 +866,42 @@ bool _ge_data_check_update(ge_ugdata *ugd)
        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;
@@ -898,8 +926,9 @@ int _ge_data_free_selected_medias(Eina_List **elist)
        if (elist && *elist) {
                ge_item* gitem = NULL;
                EINA_LIST_FREE(*elist, gitem) {
-                       if (gitem)
+                       if (gitem) {
                                gitem->checked = false;
+                       }
                }
                *elist = NULL;
        }
@@ -949,10 +978,11 @@ bool _ge_data_is_camera_album(ge_album_s *mcluster)
        /* 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);
@@ -978,8 +1008,9 @@ bool _ge_data_is_camera_album(ge_album_s *mcluster)
 
 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);
@@ -994,7 +1025,7 @@ bool _ge_data_is_root_path(const char *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;
        }
@@ -1004,7 +1035,7 @@ bool _ge_data_is_root_path(const char *path)
 
 /* 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);
@@ -1038,7 +1069,7 @@ int _ge_data_restore_selected(Eina_List *sel_ids, ge_item *gitem)
        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;
index 484ca02..ec4a0eb 100644 (file)
@@ -25,7 +25,7 @@
 #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);
@@ -75,7 +75,7 @@ static bool __ge_local_data_clone_album(media_folder_h folder, bool b_path,
        *palbum = album;
        return true;
 
- GE_LOCAL_FAILED:
+GE_LOCAL_FAILED:
 
        _ge_data_type_free_geitem((void **)(&album));
        *palbum = NULL;
@@ -83,7 +83,7 @@ static bool __ge_local_data_clone_album(media_folder_h folder, bool b_path,
 }
 
 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;
@@ -101,8 +101,8 @@ static bool __ge_local_data_get_album_list_cb(media_folder_h folder,
 
        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;
@@ -170,7 +170,7 @@ static bool __ge_local_data_get_cover_cb(media_info_h media, void *data)
        *elist = eina_list_append(*elist, item);
        return true;
 
- GE_LOCAL_FAILED:
+GE_LOCAL_FAILED:
 
        _ge_data_type_free_geitem((void **)(&item));
        return false;
@@ -224,8 +224,9 @@ int _ge_local_data_get_media_by_id(char *media_id, ge_media_s **mitem)
        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;
        }
 
@@ -274,7 +275,7 @@ int _ge_local_data_get_album_by_path(char *path, ge_album_s **album)
        ge_album_s *_item = NULL;
        int i = 0;
 
-       if (strlen(path) <=0) {
+       if (strlen(path) <= 0) {
                ge_dbgE("Invalid path!");
                return -1;
        }
@@ -289,7 +290,7 @@ int _ge_local_data_get_album_by_path(char *path, ge_album_s **album)
        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) {
@@ -339,8 +340,8 @@ int _ge_local_data_get_album_list(ge_filter_s *condition, Eina_List **elilst)
 
        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);
@@ -354,7 +355,7 @@ 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 *condition,
-                                  int *item_cnt)
+                                   int *item_cnt)
 {
        GE_CHECK_VAL(cluster_id, -1);
        GE_CHECK_VAL(condition, -1);
@@ -370,7 +371,7 @@ int _ge_local_data_get_media_count(const char *cluster_id, ge_filter_s *conditio
 
        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);
@@ -431,8 +432,9 @@ int _ge_local_data_get_media(const char *media_id, ge_media_s **mitem)
        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;
        }
 
@@ -474,7 +476,7 @@ 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)
 {
        GE_CHECK_VAL(elist, -1);
        GE_CHECK_VAL(album_id, -1);
@@ -490,8 +492,8 @@ int _ge_local_data_get_album_cover(char *album_id, ge_filter_s *condition,
 
        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);
@@ -505,7 +507,7 @@ int _ge_local_data_get_album_cover(char *album_id, ge_filter_s *condition,
 }
 
 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);
@@ -520,22 +522,22 @@ int _ge_local_data_get_all_albums_cover(ge_filter_s *condition,
 
        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);
@@ -557,8 +559,8 @@ int _ge_local_data_get_album_media_list(char *album_id, ge_filter_s *condition,
 
        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);
@@ -572,7 +574,7 @@ int _ge_local_data_get_album_media_list(char *album_id, ge_filter_s *condition,
 }
 
 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);
@@ -593,18 +595,18 @@ int _ge_local_data_get_all_albums_media_list(ge_filter_s *condition,
 
        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)
@@ -615,12 +617,14 @@ 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);
index 30f184e..d37a0fe 100644 (file)
@@ -41,12 +41,10 @@ static int __ge_create_main_view(ge_ugdata *ugd)
        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);
@@ -63,9 +61,9 @@ static Evas_Object *_ge_create_bg(Evas_Object *parent)
        /* 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);
 
@@ -108,10 +106,11 @@ static void __ge_win_rot_changed_cb(void *data, Evas_Object *obj,
        }
 
        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);
@@ -147,15 +146,15 @@ static int _ge_init_view(ge_ugdata *ugd)
 
 
 
-       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 */
@@ -175,7 +174,7 @@ static int _ge_create_view(ge_ugdata *ugd)
        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) {
@@ -204,7 +203,7 @@ static int _ge_close_view(ge_ugdata *ugd)
        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 **************/
@@ -279,12 +278,13 @@ static int __ge_parse_param_file(ge_ugdata *ugd, app_control_h service)
 
        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;
        }
@@ -308,7 +308,7 @@ static int __ge_parse_param_file(ge_ugdata *ugd, app_control_h service)
        }
 
 
- 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;
@@ -365,20 +365,21 @@ static int _ge_parse_param(ge_ugdata *ugd, app_control_h service)
        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 {
@@ -445,8 +446,9 @@ static int _ge_parse_param(ge_ugdata *ugd, app_control_h service)
                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);
                }
        }
@@ -520,13 +522,14 @@ static void * _ge_create(ui_gadget_h ug, enum ug_mode mode, app_control_h servic
 #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 */
@@ -553,7 +556,7 @@ static void * _ge_create(ui_gadget_h ug, enum ug_mode mode, app_control_h servic
                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!");
@@ -561,7 +564,7 @@ static void * _ge_create(ui_gadget_h ug, enum ug_mode mode, app_control_h servic
                }
        } 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;
@@ -605,8 +608,9 @@ static void _ge_resume(ui_gadget_h ug, app_control_h service, void *priv)
        /*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);
+       }
 }
 
 /**
@@ -643,7 +647,6 @@ static void _ge_message(ui_gadget_h ug, app_control_h msg, app_control_h service
        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;
@@ -654,8 +657,8 @@ static void _ge_message(ui_gadget_h ug, app_control_h msg, app_control_h service
                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;
@@ -666,7 +669,7 @@ static void _ge_message(ui_gadget_h ug, app_control_h msg, app_control_h service
                                //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;
@@ -693,10 +696,11 @@ static void _ge_message(ui_gadget_h ug, app_control_h msg, app_control_h service
                                //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;
@@ -789,7 +793,7 @@ static void _ge_event(ui_gadget_h ug, enum ug_event event, app_control_h service
 
        return;
 
- UG_ROTATE_EVENT:
+UG_ROTATE_EVENT:
 
        /* Update rotate mode and view */
        ge_dbg("rotate_mode: %d", ugd->rotate_mode);
index cea0268..cc42ce9 100644 (file)
@@ -42,7 +42,7 @@ static Eina_Bool __ge_db_update_idler(void *data)
        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;
 }
@@ -69,16 +69,16 @@ static int __ge_db_update_add_timer(ge_ugdata *ugd)
 
        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;
@@ -90,8 +90,8 @@ static int __ge_db_update_op(media_content_error_e error, int pid,
                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) {
@@ -106,7 +106,7 @@ static int __ge_db_update_op(media_content_error_e error, int pid,
                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;
@@ -133,17 +133,17 @@ static int __ge_db_update_op(media_content_error_e error, int pid,
 }
 
 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);
 }
 
 /*
@@ -162,17 +162,19 @@ static void __ge_db_update_coud_cb(media_content_error_e error, int pid,
 */
 
 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;
 }
@@ -194,8 +196,9 @@ bool _ge_db_update_reg_cb(ge_ugdata *ugd)
 
        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);
@@ -210,8 +213,9 @@ bool _ge_db_update_finalize(ge_ugdata *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);
index 27ae736..0731d93 100644 (file)
@@ -130,14 +130,15 @@ static int __ge_exif_read_2_bytes(FILE *fd, unsigned int *len)
                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);
@@ -151,28 +152,31 @@ static int __ge_exif_rw_jfif(FILE *fd, char *file_path,
        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;
        }
 
@@ -193,10 +197,11 @@ static int __ge_exif_rw_jfif(FILE *fd, char *file_path,
 
        /* 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;
 
@@ -227,25 +232,28 @@ static int __ge_exif_rw_jfif(FILE *fd, char *file_path,
        }
 
        /* 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 {
@@ -257,18 +265,19 @@ static int __ge_exif_rw_jfif(FILE *fd, char *file_path,
        /* 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 {
@@ -277,8 +286,9 @@ static int __ge_exif_rw_jfif(FILE *fd, char *file_path,
 
        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]);
@@ -286,14 +296,16 @@ static int __ge_exif_rw_jfif(FILE *fd, char *file_path,
 
        /* 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];
@@ -305,8 +317,9 @@ static int __ge_exif_rw_jfif(FILE *fd, char *file_path,
        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;
        }
@@ -331,8 +344,9 @@ static int __ge_exif_rw_jfif(FILE *fd, char *file_path,
                /* 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;
                }
@@ -383,7 +397,7 @@ static int __ge_exif_rw_jfif(FILE *fd, char *file_path,
        ge_dbg("Read: %d", *orientation);
        ret = 0;
 
- GE_EXIF_FAILED:
+GE_EXIF_FAILED:
 
        fclose(fd);
        ge_dbg("All done");
@@ -413,8 +427,9 @@ static int __ge_exif_rw_orient(char *file_path, unsigned int *orient)
        /* 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;
        }
@@ -429,7 +444,7 @@ static int __ge_exif_rw_orient(char *file_path, unsigned int *orient)
        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;
@@ -439,8 +454,9 @@ static int __ge_exif_rw_orient(char *file_path, unsigned int *orient)
        }
 
        /* 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 */
@@ -450,7 +466,7 @@ static int __ge_exif_rw_orient(char *file_path, unsigned int *orient)
        }
        length -= 8;
 
-        /* Length of an IFD entry */
+       /* Length of an IFD entry */
        if (length < 12) {
                ge_dbgE("length < 12");
                goto GE_EXIF_FAILED;
@@ -459,16 +475,17 @@ static int __ge_exif_rw_orient(char *file_path, unsigned int *orient)
        /* 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;
        }
@@ -476,18 +493,19 @@ static int __ge_exif_rw_orient(char *file_path, unsigned int *orient)
        /* 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 {
@@ -496,14 +514,16 @@ static int __ge_exif_rw_orient(char *file_path, unsigned int *orient)
 
        /* 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];
@@ -519,9 +539,9 @@ static int __ge_exif_rw_orient(char *file_path, unsigned int *orient)
        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];
        }
@@ -543,9 +563,9 @@ static int __ge_exif_rw_orient(char *file_path, unsigned int *orient)
                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];
                }
@@ -568,17 +588,17 @@ static int __ge_exif_rw_orient(char *file_path, unsigned int *orient)
 
        /* 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");
@@ -588,7 +608,7 @@ static int __ge_exif_rw_orient(char *file_path, unsigned int *orient)
 
        ret = 0;
 
- GE_EXIF_FAILED:
+GE_EXIF_FAILED:
 
        fclose(fd);
        ge_dbg("All done");
index 8d418d1..1d4aba0 100644 (file)
@@ -29,8 +29,8 @@
 #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);
@@ -40,12 +40,12 @@ static int __ge_ext_compose_cmd(ge_ugdata *ugd, GeExtAppType type,
        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;
@@ -74,7 +74,7 @@ int _ge_ext_load_app(ge_ugdata *ugd, GeExtAppType type, char *paths, int count)
                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");
@@ -87,9 +87,10 @@ int _ge_ext_load_app(ge_ugdata *ugd, GeExtAppType type, char *paths, int count)
        }
 
        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;
+       }
 }
 
index a7a3160..01e9727 100644 (file)
@@ -47,8 +47,9 @@ static void _ge_ext_destroy_me(ge_ugdata *ugd)
                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");
@@ -58,21 +59,21 @@ static void _ge_ext_destroy_me(ge_ugdata *ugd)
                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;
@@ -129,10 +130,10 @@ static void _ge_ext_iv_result_cb(ui_gadget_h ug, app_control_h result, void *pri
                /*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;
@@ -150,10 +151,10 @@ static void _ge_ext_iv_result_cb(ui_gadget_h ug, app_control_h result, void *pri
                /*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);
@@ -167,7 +168,7 @@ static void _ge_ext_iv_result_cb(ui_gadget_h ug, app_control_h result, void *pri
 
        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);
 
@@ -203,11 +204,13 @@ static void __ge_ext_iv_end_cb(ui_gadget_h ug, void *priv)
        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)
@@ -239,16 +242,17 @@ 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;
 }
@@ -272,7 +276,7 @@ static int __ge_ext_slideshow_selected(ge_ugdata *ugd, app_control_h service)
        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) {
@@ -287,7 +291,7 @@ static int __ge_ext_slideshow_selected(ge_ugdata *ugd, app_control_h service)
 }
 
 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);
@@ -296,12 +300,13 @@ static int __ge_ext_set_slideshow_data(ge_ugdata *ugd, char *file_url,
        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;
@@ -315,10 +320,11 @@ static int __ge_ext_set_slideshow_data(ge_ugdata *ugd, char *file_url,
                        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;
@@ -327,7 +333,7 @@ static int __ge_ext_set_slideshow_data(ge_ugdata *ugd, char *file_url,
 }
 
 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);
@@ -350,10 +356,11 @@ static int __ge_ext_set_setas_data(ge_ugdata *ugd, char *file_url,
                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!");
index 761bbc0..552a6ec 100644 (file)
@@ -38,18 +38,20 @@ int ge_file_exists(const char *path)
 {
        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;
index f8aeca7..fd38bd9 100644 (file)
@@ -28,8 +28,9 @@ int _ge_lang_update(ge_ugdata *ugd)
        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;
 }
 
index 4537963..34386b2 100644 (file)
@@ -81,11 +81,9 @@ Evas_Object* ge_ui_load_edj(Evas_Object *parent, const char *file, const char *g
        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;
                }
@@ -101,27 +99,27 @@ Evas_Object* ge_ui_create_nocontents(ge_ugdata* ugd)
 {
        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.");
        }
@@ -149,17 +147,17 @@ Evas_Object *ge_ui_create_main_ly(Evas_Object *parent)
        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;
 }
@@ -185,7 +183,7 @@ Evas_Object* ge_ui_create_naviframe(ge_ugdata *ugd, Evas_Object *parent)
 }
 
 Evas_Object* ge_ui_create_popup(ge_ugdata* ugd, ge_popup_mode_e mode,
-                               char* desc)
+                                char* desc)
 {
        ge_dbg("");
        GE_CHECK_NULL(ugd);
@@ -204,10 +202,10 @@ Evas_Object* ge_ui_create_popup(ge_ugdata* ugd, ge_popup_mode_e mode,
 
        /*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) {
@@ -215,25 +213,23 @@ Evas_Object* ge_ui_create_popup(ge_ugdata* ugd, ge_popup_mode_e 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;
        }
@@ -254,8 +250,9 @@ int _ge_ui_create_notiinfo(const char *text)
 {
        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;
 }
 
@@ -285,7 +282,7 @@ char *_ge_ui_get_i18n_album_name(ge_album_s *cluster)
                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 {
@@ -297,8 +294,9 @@ char *_ge_ui_get_i18n_album_name(ge_album_s *cluster)
                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;
 }
@@ -353,8 +351,9 @@ int _ge_ui_restore_scroller_pos(Evas_Object *obj)
        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;
 }
 
@@ -363,22 +362,24 @@ int _ge_ui_set_translate_str(Evas_Object *obj, const char *str)
        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);
 
@@ -390,15 +391,16 @@ int _ge_ui_set_translatable_item(Elm_Object_Item *nf_it, const char *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);
@@ -425,7 +427,7 @@ int _ge_ui_get_indicator_state(ge_ugdata *ugd)
        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);
@@ -451,7 +453,7 @@ int _ge_ui_reset_indicator(ge_ugdata *ugd)
 {
        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);
@@ -460,7 +462,7 @@ int _ge_ui_reset_indicator(ge_ugdata *ugd)
            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!");
@@ -480,8 +482,8 @@ Evas_Object *_ge_ui_add_toolbar(Evas_Object *parent)
 }
 
 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);
index 80fd286..75ceb67 100644 (file)
@@ -187,7 +187,7 @@ char *_ge_get_duration_string(unsigned int v_dur)
                }
 
                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");
        }
@@ -209,7 +209,7 @@ 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)
 {
        if (win == NULL) {
                ge_dbgE("Invalid window!");
@@ -228,8 +228,9 @@ double _ge_get_win_factor(Evas_Object *win, bool b_hide_indicator, int *width,
        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) {
@@ -240,10 +241,12 @@ double _ge_get_win_factor(Evas_Object *win, bool b_hide_indicator, int *width,
                factor = scale;
        }
        ge_dbg("factor: %f", factor);
-       if (width)
+       if (width) {
                *width = win_w;
-       if (height)
+       }
+       if (height) {
                *height = win_h;
+       }
        return factor;
 }
 
@@ -272,15 +275,15 @@ int _ge_send_result(ge_ugdata *ugd)
        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);
@@ -289,19 +292,19 @@ int _ge_send_result(ge_ugdata *ugd)
                        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);
@@ -313,10 +316,11 @@ int _ge_send_result(ge_ugdata *ugd)
                }
                GE_FREE(path_array);
        }
-       if (send_success == true)
+       if (send_success == true) {
                return 0;
-       else
+       } else {
                return -1;
+       }
 }
 
 int _ge_atoi(const char *number)
@@ -344,11 +348,12 @@ 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;
+       }
 }
 
index a74bab0..ad53a64 100644 (file)
@@ -38,11 +38,11 @@ static Elm_Gengrid_Item_Class *no_content = NULL;
 
 /* 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);
@@ -61,7 +61,7 @@ static int __ge_albums_create_thumb(ge_item *gitem, ge_cluster *album)
 
        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;
@@ -88,14 +88,14 @@ static void __ge_split_albums_realized(void *data, Evas_Object *obj, void *ei)
        _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");
        }
 }
 
@@ -111,23 +111,24 @@ static void __ge_albums_realized(void *data, Evas_Object *obj, void *ei)
 
        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");
        }
 }
 
@@ -144,8 +145,8 @@ static void __ge_albums_unrealized(void *data, Evas_Object *obj, void *ei)
 
        /* 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);
 
@@ -172,8 +173,8 @@ static int __ge_albums_open_album(ge_cluster *album)
        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) {
@@ -223,7 +224,7 @@ static Eina_Bool __ge_albums_sel_idler_cb(void *data)
 
        __ge_albums_open_album(album_item);
 
- GE_ALBUMS_DONE:
+GE_ALBUMS_DONE:
 
        ecore_idler_del(ugd->sel_album_idler);
        ugd->sel_album_idler = NULL;
@@ -249,7 +250,7 @@ static Eina_Bool __ge_split_albums_sel_idler_cb(void *data)
        }
        __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 +++");
@@ -328,13 +329,12 @@ static char *__ge_split_albums_get_text(void *data, Evas_Object *obj, const char
                        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);
@@ -349,13 +349,13 @@ static char *__ge_split_albums_get_text(void *data, Evas_Object *obj, const char
 
                /* 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")) {
@@ -366,7 +366,7 @@ static char *__ge_split_albums_get_text(void *data, Evas_Object *obj, const char
 
                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);
@@ -385,15 +385,15 @@ static char *__ge_split_albums_get_text(void *data, Evas_Object *obj, const char
                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);
@@ -402,7 +402,7 @@ static char *__ge_split_albums_get_text(void *data, Evas_Object *obj, const char
 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;
@@ -413,17 +413,18 @@ static ge_icon_type __ge_albums_set_bg_file(Evas_Object *bg, void *data)
                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);
@@ -447,9 +448,9 @@ static Evas_Object *__ge_split_albums_get_content(void *data, Evas_Object *obj,
        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;
 }
@@ -461,12 +462,12 @@ static int __ge_albums_append(ge_ugdata *ugd, ge_cluster *album)
        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;
 }
@@ -478,12 +479,12 @@ int __ge_split_albums_append(ge_ugdata *ugd, ge_cluster *album)
        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;
 }
@@ -501,7 +502,7 @@ static Eina_Bool __ge_albums_append_idler_cb(void *data)
        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 +++");
@@ -587,16 +588,19 @@ int __ge_split_view_append_albums(ge_ugdata *ugd, Evas_Object *parent, bool is_u
                _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) {
@@ -623,10 +627,10 @@ int __ge_split_view_append_albums(ge_ugdata *ugd, Evas_Object *parent, bool is_u
                }
 
                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 {
@@ -635,7 +639,7 @@ int __ge_split_view_append_albums(ge_ugdata *ugd, Evas_Object *parent, bool is_u
                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);
@@ -646,7 +650,7 @@ int __ge_split_view_append_albums(ge_ugdata *ugd, Evas_Object *parent, bool is_u
        }
        /* 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;
@@ -676,20 +680,23 @@ static int __ge_albums_append_albums(ge_ugdata *ugd, Evas_Object *parent, bool i
                _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);
@@ -707,25 +714,26 @@ static int __ge_albums_append_albums(ge_ugdata *ugd, Evas_Object *parent, bool i
                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;
@@ -746,13 +754,14 @@ static int __ge_albums_append_albums(ge_ugdata *ugd, Evas_Object *parent, bool i
 
 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;
 }
 
@@ -790,13 +799,13 @@ Evas_Object* __ge_add_albums_split_view(ge_ugdata *ugd, Evas_Object *parent)
        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);
@@ -813,9 +822,9 @@ static Evas_Object* __ge_albums_add_view(ge_ugdata *ugd, Evas_Object *parent)
        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;
 }
 
@@ -828,9 +837,9 @@ static Eina_Bool __ge_main_back_cb(void *data, Elm_Object_Item *it)
        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)) {
@@ -872,7 +881,7 @@ void AppGetResource(const char *edj_file_in, char *edj_path_out, int edj_path_ma
 }
 
 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);
 
@@ -894,7 +903,7 @@ Evas_Object *ge_thumb_show_part_icon_image(Evas_Object *obj, char *path,
 
 
        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);
@@ -906,36 +915,34 @@ __ge_grid_done_cb(void *data, Evas_Object *obj, void *ei)
 {
        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) {
@@ -981,8 +988,8 @@ __ge_check_state_changed_cb(void *data, Evas_Object *obj, void *ei)
                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);
@@ -991,8 +998,8 @@ __ge_check_state_changed_cb(void *data, Evas_Object *obj, void *ei)
                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);
@@ -1033,7 +1040,7 @@ __ge_check_state_changed_cb(void *data, Evas_Object *obj, void *ei)
        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");
        }
@@ -1057,7 +1064,7 @@ __ge_nocontent_get(void *data, Evas_Object *obj, const char *part)
        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);
@@ -1074,7 +1081,7 @@ __ge_nocontent_get(void *data, Evas_Object *obj, const char *part)
        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;
 
 }
@@ -1112,8 +1119,8 @@ __ge_gengrid_item_content_get(void *data, Evas_Object *obj, const char *part)
 
                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);
                }
 
 
@@ -1129,7 +1136,7 @@ __ge_gengrid_item_content_get(void *data, Evas_Object *obj, const char *part)
                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;
@@ -1148,13 +1155,13 @@ __ge_gengrid_item_content_get(void *data, Evas_Object *obj, const char *part)
 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;
@@ -1172,11 +1179,11 @@ __ge_gallery_ug_result_cb(app_control_h request, app_control_h reply, app_contro
                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) {
@@ -1195,11 +1202,11 @@ __ge_gallery_ug_result_cb(app_control_h request, app_control_h reply, app_contro
 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;
 
@@ -1212,7 +1219,7 @@ __ge_launch_ug_gallery(void *data, Evas_Object *obj, void *ei)
                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);
@@ -1258,14 +1265,14 @@ __ge_grid_select_one(ge_item *gitem, char *file_url)
                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!");
        }
@@ -1296,7 +1303,7 @@ __ge_gengrid_item_sel_cb(void *data, Evas_Object *obj, void *ei)
 
        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) {
@@ -1305,21 +1312,21 @@ __ge_gengrid_item_sel_cb(void *data, Evas_Object *obj, void *ei)
        } 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;
@@ -1372,7 +1379,7 @@ __ge_gengrid_item_sel_cb(void *data, Evas_Object *obj, void *ei)
                        _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");
                }
@@ -1393,27 +1400,27 @@ __ge_gengrid_item_sel_cb(void *data, Evas_Object *obj, void *ei)
 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) {
@@ -1421,7 +1428,7 @@ __ge_cancel_cb(void *data, Evas_Object *obj, void *ei)
        }
 
        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
@@ -1454,11 +1461,11 @@ ge_update_gengrid(ge_ugdata *ugd)
        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);
@@ -1476,14 +1483,14 @@ ge_update_gengrid(ge_ugdata *ugd)
                }
                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;
                        }
@@ -1509,25 +1516,25 @@ ge_update_gengrid(ge_ugdata *ugd)
 
                        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);
        }
 
 
@@ -1568,11 +1575,11 @@ ge_create_gengrid(ge_ugdata *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);
@@ -1610,7 +1617,7 @@ ge_create_gengrid(ge_ugdata *ugd)
        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)) {
@@ -1619,9 +1626,9 @@ ge_create_gengrid(ge_ugdata *ugd)
 
        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();
@@ -1658,14 +1665,14 @@ ge_create_gengrid(ge_ugdata *ugd)
        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;
                        }
@@ -1682,9 +1689,9 @@ ge_create_gengrid(ge_ugdata *ugd)
 
                        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;
@@ -1693,9 +1700,9 @@ ge_create_gengrid(ge_ugdata *ugd)
                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);
 
@@ -1742,13 +1749,13 @@ int _ge_albums_update_view(ge_ugdata *ugd)
 
        /* 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;
                }
        }
 
@@ -1759,50 +1766,51 @@ int _ge_albums_update_view(ge_ugdata *ugd)
 
                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");
        }
@@ -1811,20 +1819,22 @@ int _ge_albums_update_view(ge_ugdata *ugd)
        _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);
 
@@ -1835,17 +1845,17 @@ int _ge_albums_update_view(ge_ugdata *ugd)
        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;
 }
index 96f176b..4a041a7 100644 (file)
@@ -42,7 +42,7 @@ static void __ge_grid_check_changed(void *data, Evas_Object *obj, void *ei);
 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);
@@ -63,8 +63,8 @@ static void __ge_grid_thumb_created_cb(media_content_error_e error,
 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;
        }
@@ -73,8 +73,9 @@ int __ge_grid_append_sel_item(ge_ugdata *ugd, ge_item *gitem)
        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);
@@ -89,7 +90,7 @@ int __ge_grid_append_sel_item(ge_ugdata *ugd, ge_item *gitem)
                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) {
@@ -113,8 +114,8 @@ int __ge_grid_append_sel_item(ge_ugdata *ugd, ge_item *gitem)
 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;
        }
@@ -123,8 +124,9 @@ int __ge_grid_remove_sel_item(ge_ugdata *ugd, ge_item *gitem)
        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);
@@ -142,10 +144,12 @@ int __ge_grid_remove_sel_item(ge_ugdata *ugd, ge_item *gitem)
        /* 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);
@@ -157,7 +161,7 @@ int __ge_grid_remove_sel_item(ge_ugdata *ugd, ge_item *gitem)
 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;
        }
@@ -166,11 +170,13 @@ static int __ge_grid_check_sel_items(ge_ugdata *ugd)
        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;
        }
@@ -183,8 +189,9 @@ static int __ge_grid_check_sel_items(ge_ugdata *ugd)
        /* 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;
@@ -201,44 +208,47 @@ static int __ge_grid_check_sel_items(ge_ugdata *ugd)
 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;
@@ -246,7 +256,7 @@ static int __ge_grid_get_sel_cnt(ge_ugdata *ugd)
                elm_object_disabled_set(btn, EINA_TRUE);
                evas_object_smart_callback_add(btn, "clicked", NULL, (void *)ugd);
        }
-       
+
        return cnt;
 }
 
@@ -261,14 +271,14 @@ static void __ge_grid_realized(void *data, Evas_Object *obj, void *ei)
        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);
                }
        }
 }
@@ -284,8 +294,8 @@ static void __ge_grid_unrealized(void *data, Evas_Object *obj, void *ei)
        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);
                }
@@ -310,18 +320,21 @@ int _ge_grid_sel_one(ge_ugdata *ugd, char *file_url)
 
        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);
        }
@@ -372,20 +385,20 @@ static void __ge_grid_sel(void *data, Evas_Object *obj, void *ei)
                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);
@@ -396,10 +409,11 @@ static void __ge_grid_sel(void *data, Evas_Object *obj, void *ei)
        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");
@@ -431,18 +445,18 @@ static void __ge_grid_check_changed(void *data, Evas_Object *obj, void *ei)
        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);
@@ -451,7 +465,7 @@ static void __ge_grid_check_changed(void *data, Evas_Object *obj, void *ei)
        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 {
@@ -471,10 +485,11 @@ static void __ge_grid_check_changed(void *data, Evas_Object *obj, void *ei)
                }
        }
        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");
        }
@@ -513,27 +528,28 @@ static Evas_Object *__ge_grid_get_content(void *data, Evas_Object *obj, const ch
                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);
@@ -541,7 +557,7 @@ static Evas_Object *__ge_grid_get_content(void *data, Evas_Object *obj, const ch
                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;
@@ -567,15 +583,17 @@ static bool __ge_grid_append_thumb(ge_ugdata *ugd, Evas_Object *parent, bool is_
                _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;
                }
@@ -590,19 +608,20 @@ static bool __ge_grid_append_thumb(ge_ugdata *ugd, Evas_Object *parent, bool is_
 
                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)
@@ -613,7 +632,7 @@ 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;
 }
 
@@ -622,9 +641,9 @@ static int __ge_grid_del_cbs(Evas_Object *view)
        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;
 }
@@ -632,10 +651,10 @@ static int __ge_grid_del_cbs(Evas_Object *view)
 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;
@@ -644,11 +663,11 @@ static int __ge_grid_rotate_view(ge_ugdata *ugd)
 
 /* 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);
@@ -661,18 +680,19 @@ static void __ge_grid_delete_layout_cb(void *data, Evas *e, Evas_Object *obj,
        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;
@@ -704,28 +724,30 @@ static int __ge_grid_idler_append_thumbs(void *data)
        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) {
@@ -740,7 +762,7 @@ static int __ge_grid_idler_append_thumbs(void *data)
        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;
                }
@@ -757,18 +779,19 @@ static int __ge_grid_idler_append_thumbs(void *data)
 
                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)
@@ -799,7 +822,7 @@ static Eina_Bool __ge_grid_back_cb(void *data, Elm_Object_Item *it)
 
        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.*/
@@ -869,7 +892,7 @@ static void __ge_grid_selall_cb(void *data, Evas_Object *obj, void *ei)
        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) {
@@ -878,8 +901,7 @@ static void __ge_grid_selall_cb(void *data, Evas_Object *obj, void *ei)
                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);
@@ -894,7 +916,7 @@ static void __ge_grid_selall_cb(void *data, Evas_Object *obj, void *ei)
        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)
@@ -905,37 +927,40 @@ 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);
@@ -943,9 +968,7 @@ static void __ge_grid_done_cb(void *data, Evas_Object *obj, void *ei)
                                        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);
@@ -957,47 +980,49 @@ static void __ge_grid_done_cb(void *data, Evas_Object *obj, void *ei)
                } 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 */
@@ -1034,9 +1059,9 @@ static Eina_Bool __ge_main_back_cb(void *data, Elm_Object_Item *it)
        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)) {
@@ -1062,9 +1087,9 @@ static Eina_Bool __ge_main_back_cb(void *data, Elm_Object_Item *it)
 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) {
@@ -1080,17 +1105,17 @@ void _my_custom_keydown_cb(void* data, int type, void* event)
                        }
                }
                _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);
@@ -1102,18 +1127,18 @@ void _my_custom_keydown_cb(void* data, int type, void* event)
                                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);
@@ -1136,7 +1161,7 @@ void _my_custom_keydown_cb(void* data, int type, void* event)
 
 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) {
@@ -1152,13 +1177,13 @@ static void __ge_albums_detail_cancel_cb(void *data, Evas_Object *obj, void *ei)
                }
        }
        _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);
@@ -1173,30 +1198,29 @@ static int __ge_grid_push_view(ge_ugdata *ugd, Evas_Object *parent,
        }
        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);
 
@@ -1216,14 +1240,14 @@ static int __ge_grid_push_view(ge_ugdata *ugd, Evas_Object *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;
 }
 
@@ -1264,21 +1288,21 @@ static Evas_Object *__ge_grid_add_view(ge_ugdata *ugd, Evas_Object *parent)
 
        /* 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);
@@ -1306,12 +1330,12 @@ static Evas_Object *__ge_grid_add_view(ge_ugdata *ugd, Evas_Object *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;
 }
 
@@ -1319,18 +1343,21 @@ int _ge_grid_get_selected_ids(ge_ugdata *ugd, Eina_List **ids_list)
 {
        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;
@@ -1356,19 +1383,22 @@ int _ge_grid_create_view(ge_ugdata *ugd, ge_thumbs_s *thumbs_d)
        }
 
        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);
@@ -1390,24 +1420,25 @@ int _ge_grid_create_view(ge_ugdata *ugd, ge_thumbs_s *thumbs_d)
        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");
        }
@@ -1420,23 +1451,23 @@ int _ge_grid_create_view(ge_ugdata *ugd, ge_thumbs_s *thumbs_d)
        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);
@@ -1451,10 +1482,11 @@ int _ge_grid_create_split_view(ge_ugdata *ugd, ge_thumbs_s *thumbs_d)
        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) {
@@ -1465,25 +1497,26 @@ int _ge_grid_create_split_view(ge_ugdata *ugd, ge_thumbs_s *thumbs_d)
        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);
@@ -1499,16 +1532,16 @@ int _ge_grid_get_first_data(ge_ugdata *ugd, ge_cluster *album)
        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;
@@ -1516,8 +1549,9 @@ int _ge_grid_get_first_data(ge_ugdata *ugd, ge_cluster *album)
 
 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);
@@ -1538,7 +1572,7 @@ int _ge_grid_create_split_view_thumb(ge_cluster *album)
        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;
 
@@ -1548,7 +1582,7 @@ int _ge_grid_create_split_view_thumb(ge_cluster *album)
 
        return 0;
 
-       GE_GRID_FAILED:
+GE_GRID_FAILED:
 
        GE_FREEIF(ugd->thumbs_d->album_uuid);
        GE_FREE(thumbs_d);
@@ -1558,8 +1592,9 @@ int _ge_grid_create_split_view_thumb(ge_cluster *album)
 
 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);
@@ -1579,12 +1614,13 @@ int _ge_grid_create_thumb(ge_cluster *album)
 
        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);
@@ -1603,19 +1639,20 @@ int _ge_grid_update_view(ge_ugdata *ugd)
                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");
                        }
@@ -1627,10 +1664,11 @@ int _ge_grid_update_view(ge_ugdata *ugd)
 
 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)
@@ -1646,7 +1684,7 @@ 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;
 }
 
@@ -1658,7 +1696,7 @@ int _ge_grid_update_data(ge_ugdata *ugd)
        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);
        }
@@ -1674,19 +1712,21 @@ int _ge_grid_update_data(ge_ugdata *ugd)
        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!");
@@ -1697,10 +1737,11 @@ int _ge_grid_update_data(ge_ugdata *ugd)
 
 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)
@@ -1718,14 +1759,15 @@ 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;
@@ -1738,7 +1780,7 @@ int _ge_grid_create_main_view(ge_ugdata *ugd)
        }
        return 0;
 
- GE_GRID_FAILED:
+GE_GRID_FAILED:
 
        GE_FREEIF(ugd->thumbs_d->album_uuid);
        GE_FREE(thumbs_d);
@@ -1762,7 +1804,7 @@ void _ge_grid_change_selection_mode(ge_ugdata *ugd, bool state)
                                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);
@@ -1771,8 +1813,8 @@ void _ge_grid_change_selection_mode(ge_ugdata *ugd, bool state)
                                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");
@@ -1781,12 +1823,12 @@ void _ge_grid_change_selection_mode(ge_ugdata *ugd, bool state)
                                }
                        } 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);
                                }
@@ -1801,8 +1843,8 @@ void _ge_grid_change_selection_mode(ge_ugdata *ugd, bool state)
                                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);
                                }
 
@@ -1813,8 +1855,7 @@ void _ge_grid_change_selection_mode(ge_ugdata *ugd, bool state)
                        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) {
@@ -1831,7 +1872,8 @@ void _ge_grid_change_selection_mode(ge_ugdata *ugd, bool state)
        }
 }
 
-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;
        }
index 18ed0cf..d67042e 100644 (file)
@@ -42,16 +42,16 @@ static void __ge_main_cancel_cb(void *data, Evas_Object *obj, void *ei)
 }
 
 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);
        }
@@ -68,9 +68,9 @@ static Eina_Bool __ge_main_back_cb(void *data, Elm_Object_Item *it)
        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)) {
@@ -96,9 +96,9 @@ static Evas_Object *__ge_main_create_ly(ge_ugdata *ugd, Evas_Object *parent)
        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;
 }
 
index 05c9a86..46394b6 100644 (file)
@@ -21,9 +21,9 @@
 #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);
@@ -31,11 +31,13 @@ Evas_Object *_ge_but_create_but(Evas_Object *parent, Elm_Theme *theme,
        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) {
@@ -47,12 +49,12 @@ Evas_Object *_ge_but_create_but(Evas_Object *parent, Elm_Theme *theme,
                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);
        }
@@ -62,23 +64,24 @@ Evas_Object *_ge_but_create_but(Evas_Object *parent, Elm_Theme *theme,
                _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);
        }
@@ -98,8 +101,9 @@ Evas_Object *_ge_but_create_image_but(Evas_Object *parent, const char *icon,
        }
 
        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;
 }
 
index e72459e..7850687 100644 (file)
@@ -205,7 +205,7 @@ int __ge_rotate_bg_rotate_image(Evas_Object *obj, unsigned int orient)
 }
 
 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;
@@ -215,7 +215,7 @@ static void __ge_rotate_bg_delete_cb(void *data, Evas *e, Evas_Object *obj,
 }
 
 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;
@@ -270,7 +270,7 @@ static void __ge_rotate_bg_custom_resize(void *data, Evas *e, Evas_Object *obj,
 }
 
 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;
@@ -299,20 +299,20 @@ Evas_Object *_ge_rotate_bg_add(Evas_Object *parent, bool b_preload)
 
        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;
@@ -358,12 +358,14 @@ int _ge_rotate_bg_rotate_image(Evas_Object *bg, unsigned int orient)
        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;
 }
 
index 392fb88..a24a71d 100644 (file)
@@ -34,8 +34,8 @@
 #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);
 
@@ -65,7 +65,7 @@ Evas_Object *_ge_thumb_show_part_icon_image(Evas_Object *obj, char *path,
 #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);
@@ -73,8 +73,8 @@ Evas_Object *_ge_thumb_show_part_icon_image(Evas_Object *obj, char *path,
 }
 
 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);
 
@@ -104,7 +104,7 @@ Evas_Object *_ge_thumb_show_part_icon_video(Evas_Object *obj, char *path,
 #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) {
@@ -112,7 +112,7 @@ Evas_Object *_ge_thumb_show_part_icon_video(Evas_Object *obj, char *path,
                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);
@@ -152,14 +152,14 @@ Evas_Object *_ge_thumb_show_part_icon_video(Evas_Object *obj, char *path,
 #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;
@@ -172,17 +172,19 @@ int _ge_thumb_set_size(ge_ugdata *ugd, Evas_Object *view, int rotate_mode,
        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);
@@ -196,19 +198,23 @@ int _ge_thumb_set_size(ge_ugdata *ugd, Evas_Object *view, int rotate_mode,
        }
 
        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)
@@ -219,14 +225,14 @@ int _ge_thumb_set_size(ge_ugdata *ugd, Evas_Object *view, int rotate_mode,
 #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;
@@ -243,20 +249,24 @@ int _ge_thumb_set_size(ge_ugdata *ugd, Evas_Object *view, int rotate_mode,
        _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);
index 43237ca..1060b26 100644 (file)
@@ -78,8 +78,8 @@ Evas_Object *__ge_tile_add_icon(Evas_Object *obj, bg_file_set_cb func, void *dat
 }
 
 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));
@@ -121,14 +121,14 @@ Evas_Object *_ge_tile_show_part_type_icon(Evas_Object *obj, int type)
 #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;
@@ -139,11 +139,12 @@ int _ge_tile_update_item_size(ge_ugdata *ugd, Evas_Object *grid,
 
        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;
@@ -158,26 +159,28 @@ int _ge_tile_update_item_size(ge_ugdata *ugd, Evas_Object *grid,
 
        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;
@@ -189,7 +192,7 @@ int _ge_tile_update_item_size(ge_ugdata *ugd, Evas_Object *grid,
        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;
@@ -205,13 +208,15 @@ int _ge_tile_update_item_size(ge_ugdata *ugd, Evas_Object *grid,
 
        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