TizenRefApp-5175 Fix compiler warnings in wallpaper-ui-service. Also some unused... 13/54613/10
authorMykola Alieksieiev <m.alieksieie@samsung.com>
Mon, 14 Dec 2015 10:22:14 +0000 (12:22 +0200)
committerMykola Alieksieiev <m.alieksieie@samsung.com>
Fri, 18 Dec 2015 13:53:12 +0000 (15:53 +0200)
Change-Id: Ibbec2d5a81f610cdb25003509807ccb35979364b
Signed-off-by: Mykola Alieksieiev <m.alieksieie@samsung.com>
include/wallpaper-ui-service-main.h
include/wallpaper-ui-service.h
src/wallpaper-ui-service-main.c
src/wallpaper-ui-service.c

index 7398938..76f0d3c 100755 (executable)
@@ -56,7 +56,6 @@ typedef struct {
 
 HAPI void wallpaper_main_create_view(void *data);
 
-
 #endif
 
 /**
index 86d5fa6..34e9d56 100755 (executable)
@@ -37,8 +37,6 @@
 #define APP_STRING(str)                        dgettext(PKGNAME, str)
 #define NOT_LOCALIZED(str)             (str)
 
-#define _(str)                 gettext(str)
-
 #define _NOT_LOCALIZED(str) (str)
 
 #define GENGRID_ITEM_SIZE (126)
@@ -180,6 +178,8 @@ typedef struct _wallpaper_ui_service_appdata {
        char saved_img_path[6][MAX_LENGTH_LINE];
 } wallpaper_ui_service_appdata;
 
+HAPI int wallpaper_ui_service_copy_wallpaper_file(const char *source, char *destination);
+
 #endif
 
 
index 1accc9f..6998f92 100755 (executable)
@@ -89,16 +89,15 @@ struct scaledata {
        Ecore_Idler *idler_handler;
 };
 
-static void _service_imageviewer_ug_result_cb(app_control_h request, app_control_h reply, app_control_result_e result, void *data);
 static void _wallpaper_destroy(void *data);
 static Evas_Object *main_gengrid_add(Evas_Object *parent, void *data);
-static void _edit_clicked_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info);
 static int _lockscreen_gallery_scale_job_maker(int to_w, int to_h, int idx);
 static void _lockscreen_gallery_destroy_func();
 static void _wallpaper_show_focus_highlight(int selected_index) ;
 static void _done_to_set_wallpaper();
 static void _wallpaper_back_key_cb(void *data, Evas_Object *obj, void *event_info);
-static void _preview_clicked_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info);
+static void _preview_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source);
+static void _wallpaper_preview_main();
 
 static int _lockscreen_gallery_file_cb(const char *src, const char *dst)
 {
@@ -300,22 +299,12 @@ static bool _get_media_info_cb(media_info_h pItem, void *pUserData)
 
        if (pItem != NULL) {
                media_info_clone(pAssignFolderItem, pItem);
-               media_info_get_display_name(*pAssignFolderItem, &pItem);
        }
 
        WALLPAPERUI_TRACE_END;
        return FALSE;
 }
 
-static void _done_button_cb()
-{
-       WALLPAPERUI_TRACE_BEGIN;
-
-       _done_to_set_wallpaper();
-
-       WALLPAPERUI_TRACE_END;
-}
-
 static media_content_orientation_e _lockscreen_gallery_get_orientation_by_path(const char *path)
 {
        WALLPAPERUI_TRACE_BEGIN;
@@ -663,7 +652,6 @@ static int _lockscreen_gallery_scale_job_maker(int to_w, int to_h, int idx)
                sd->to_h = to_h;
                sd->curr_job = job_idx;
                sd->next_job = job_idx+1;
-
                sd->idler_handler = ecore_idler_add(_lockscreen_gallery_scale_job_handler, sd);
        }
 
@@ -697,58 +685,25 @@ static void _main_done_button_cb(void *data, Evas_Object *obj, void *event_info)
        WALLPAPERUI_TRACE_END;
 }
 
-static void _gallery_service_imageviewer_ug_result_cb(app_control_h request, app_control_h reply, app_control_result_e result, void *data)
+static void _get_filename_extension_in_uppercase(const char * inputString, char *buf, int bufLength)
 {
        WALLPAPERUI_TRACE_BEGIN;
-       elm_object_disabled_set(ad->win, EINA_FALSE);
-       state_data.flag_edit_click = EINA_FALSE;
-
-       if (result == APP_CONTROL_RESULT_SUCCEEDED) {
-               char **path_array = NULL;
-               int array_length = 0;
-
-               int j = 0;
-               bool bresult = false;
-
-               if (app_control_get_extra_data_array(reply, "http://tizen.org/appcontrol/data/selected", &path_array, &array_length) == APP_CONTROL_ERROR_NONE) {
-
-               for (j = 0; j < array_length; j++) {
-                       WALLPAPERUI_DBG("path_array[%d] = %s", j, path_array[j]);
-               }
-
-               if (!strstr(path_array[0], ".png")
-                       && !strstr(path_array[0], ".PNG")
-                       && !strstr(path_array[0], ".jpg")
-                       && !strstr(path_array[0], ".gif")) {
-                       WALLPAPERUI_DBG("Do not edit the image!: path_array[0] = %s", path_array[0]);
-                       return;
-               }
-
-               /*do not need go into preview_selection */
-               if ((array_length == 1) && path_array[0]) {
-                       state_data.flag_changed = EINA_TRUE;
-                       state_data.flag_image_from_gallery = EINA_TRUE;
-
-                       vconf_set_int(VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE, WALLPAPER_TYPE_GALLERY);
-                       WALLPAPERUI_DBG("Set VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE = WALLPAPER_TYPE_GALLERY");
 
-                       memset(ad->saved_img_path, 0, sizeof(ad->saved_img_path));
-                       strncpy(ad->saved_img_path[0], path_array[0], MAX_LENGTH_LINE - 1);
-                       WALLPAPERUI_DBG("ad->saved_img_path[0] is %s", ad->saved_img_path[0]);
-
-                       elm_image_file_set(ad->preview_image, ad->saved_img_path[0], NULL);
-               }
-
-               int i = 0;
-               for (i = 0; i < array_length; i++) {
-                       if (path_array[i]) {
-                               free(path_array[i]);
-                               path_array[i] = NULL;
+       if (!buf||!inputString||bufLength<1){
+               return;
+       }
+       char *pointChar = strrchr(inputString, '.');
+       if(pointChar) {
+               int i;
+               for (i=0; i < bufLength;++i, ++pointChar, ++buf){
+                       if (*pointChar == '\0'){
+                               break;
+                       }
+                       *buf = toupper(*pointChar);
                        }
-               }
-               _done_button_cb();
-               }
        }
+       *buf = '\0';
+
        WALLPAPERUI_TRACE_END;
 }
 
@@ -759,7 +714,6 @@ static void _service_gallery_ug_result_cb(app_control_h request, app_control_h r
        char **path_array = NULL;
        int array_length = 0;
        Elm_Object_Item *object_item = NULL;
-       bool bresult = false;
        int i = 0;
        Thumbnail *item = NULL;
 
@@ -770,25 +724,31 @@ static void _service_gallery_ug_result_cb(app_control_h request, app_control_h r
                        WALLPAPERUI_DBG("array_length < 1, do not get result from gallery");
                        return;
                } else {
+                       char file_ext[MAX_LENGTH_LINE] = {0, };
                        for (; i < array_length; i++) {
-                               if (!strcasestr(path_array[i], ".PNG")
-                                       && !strcasestr(path_array[i], ".BMP")
-                                       && !strcasestr(path_array[i], ".WBMP")
-                                       && !strcasestr(path_array[i], ".PCX")
-                                       && !strcasestr(path_array[i], ".TIFF")
-                                       && !strcasestr(path_array[i], ".JPEG")
-                                       && !strcasestr(path_array[i], ".TGA")
-                                       && !strcasestr(path_array[i], ".EXIF")
-                                       && !strcasestr(path_array[i], ".FPX")
-                                       && !strcasestr(path_array[i], ".SVG")
-                                       && !strcasestr(path_array[i], ".PSD")
-                                       && !strcasestr(path_array[i], ".CDR")
-                                       && !strcasestr(path_array[i], ".PCD")
-                                       && !strcasestr(path_array[i], ".DXF")
-                                       && !strcasestr(path_array[i], ".UFO")
-                                       && !strcasestr(path_array[i], ".EPS")
-                                       && !strcasestr(path_array[i], ".JPG")
-                                       && !strcasestr(path_array[i], ".GIF")) {
+                               _get_filename_extension_in_uppercase(path_array[i], file_ext, MAX_LENGTH_LINE);
+                               if (*file_ext == 0) {
+                                       WALLPAPERUI_DBG("invalid image path: path_array[%d] = %d", i, path_array[i]);
+                                       return;
+                               }
+                               if (!strcmp(file_ext, ".PNG")
+                                       && !strcmp(file_ext, ".BMP")
+                                       && !strcmp(file_ext, ".WBMP")
+                                       && !strcmp(file_ext, ".PCX")
+                                       && !strcmp(file_ext, ".TIFF")
+                                       && !strcmp(file_ext, ".JPEG")
+                                       && !strcmp(file_ext, ".TGA")
+                                       && !strcmp(file_ext, ".EXIF")
+                                       && !strcmp(file_ext, ".FPX")
+                                       && !strcmp(file_ext, ".SVG")
+                                       && !strcmp(file_ext, ".PSD")
+                                       && !strcmp(file_ext, ".CDR")
+                                       && !strcmp(file_ext, ".PCD")
+                                       && !strcmp(file_ext, ".DXF")
+                                       && !strcmp(file_ext, ".UFO")
+                                       && !strcmp(file_ext, ".EPS")
+                                       && !strcmp(file_ext, ".JPG")
+                                       && !strcmp(file_ext, ".GIF")) {
                                        WALLPAPERUI_DBG("invalid image path: path_array[%d] = %d", i, path_array[i]);
                                        return;
                                } else {
@@ -796,7 +756,6 @@ static void _service_gallery_ug_result_cb(app_control_h request, app_control_h r
                                }
                        }
                }
-
                memset(ad->saved_img_path, 0, sizeof(ad->saved_img_path));
                strncpy(ad->saved_img_path[0], path_array[0], MAX_LENGTH_LINE - 1);
                WALLPAPERUI_DBG("saved_img_path is %s", ad->saved_img_path[0]);
@@ -828,14 +787,13 @@ static void _service_gallery_ug_result_cb(app_control_h request, app_control_h r
        WALLPAPERUI_TRACE_END;
 }
 
-static void _gallery_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
+static void _gallery_clicked_cb(void *data, Evas_Object *obj, void *event_info)
 {
        WALLPAPERUI_TRACE_BEGIN;
 
        Thumbnail *item = (Thumbnail *)data;
        elm_gengrid_item_selected_set(item->item,  EINA_FALSE);
        app_control_h svc_handle = NULL;
-       Evas_Object *win = NULL;
 
        if (obj) {
                elm_object_signal_emit(obj, "unpressed", "elm");
@@ -845,7 +803,6 @@ static void _gallery_clicked_cb(void *data, Evas_Object *obj, const char *emissi
 
        if (!app_control_create(&svc_handle)) {
                app_control_set_operation(svc_handle, APP_CONTROL_OPERATION_PICK);
-               win = (Evas_Object *)ug_get_window();
         app_control_set_launch_mode(svc_handle, APP_CONTROL_LAUNCH_MODE_GROUP);
                app_control_set_app_id(svc_handle,  "ug-gallery-efl");
                app_control_set_mime(svc_handle, "image/*");
@@ -1030,39 +987,10 @@ static void _set_wallpaper(char *path)
        WALLPAPERUI_TRACE_END;
 }
 
-static void _set_home_wallpaper(char *path)
-{
-       WALLPAPERUI_TRACE_BEGIN;
-
-       if (ecore_file_exists(path) != EINA_TRUE) {
-               WALLPAPERUI_ERR("%s does not exist", path);
-               return;
-       }
-
-       if (system_settings_set_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN, path) != SYSTEM_SETTINGS_ERROR_NONE) {
-               WALLPAPERUI_ERR("system_settings_set_value_string() failed");
-               elm_exit();
-               return;
-       }
-       WALLPAPERUI_TRACE_END;
-}
-
-static int _compare_cb(const void *d1, const void *d2)
-{
-       WALLPAPERUI_TRACE_BEGIN;
-
-       char *v1 = (char *)d1;
-       char *v2 = (char *)d2;
-
-       WALLPAPERUI_TRACE_END;
-       return strcmp(v1, v2);
-}
-
 static void _done_to_set_wallpaper()
 {
        WALLPAPERUI_TRACE_BEGIN;
 
-       char path[6][MAX_LENGTH_LINE] = {{0 } } ;
        char *p = NULL;
        char filepath[MAX_LENGTH_LINE] = {0};
        char filename[MAX_LENGTH_LINE] = {0};
@@ -1070,12 +998,6 @@ static void _done_to_set_wallpaper()
        int i = 0;
        int index = 0;
        char *temp_path[6] = {NULL};
-       bool flag = true;
-       int count = 0;
-       char *temp = NULL;
-       char string[MAX_LENGTH_LINE] = {0};
-       Eina_List *path_list = NULL;
-       Eina_List *file_list = NULL;
 
        /*copy lock wallpaper */
        while (i < MAX_MULTIPLE_SELECTION) {
@@ -1162,15 +1084,8 @@ static void _lockscreen_gallery_destroy_func()
        WALLPAPERUI_TRACE_BEGIN;
 
        /*delete unused files */
-       Eina_List *path_list = NULL;
-       int i = 0;
        char path[6][MAX_LENGTH_LINE] = {{0 } };
-       char filepath[MAX_LENGTH_LINE] = {0};
-       int count = 0;
        char *value = NULL;
-       char *temp = NULL;
-       char string[MAX_LENGTH_LINE] = {0};
-       Eina_List *file_list = NULL;
 
        memset(path, 0, sizeof(path));
 
@@ -1274,8 +1189,7 @@ static void _wallpaper_db_update_cb(media_content_error_e error, int pid,
        WALLPAPERUI_TRACE_END;
 }
 
-
-static void _main_preview_image_clicked_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
+static void _main_preview_image_clicked_cb(void *data, Evas_Object *obj, void *event_info)
 {
        WALLPAPERUI_TRACE_BEGIN;
 
@@ -1286,12 +1200,12 @@ static void _main_preview_image_clicked_cb(void *data, Evas *evas, Evas_Object *
        }
 
        feedback_play_type(FEEDBACK_TYPE_SOUND, FEEDBACK_PATTERN_TAP);
-       wallpaper_preview_main();
+       _wallpaper_preview_main();
 
        WALLPAPERUI_TRACE_END;
 }
 
-void wallpaper_preview_main()
+static void _wallpaper_preview_main()
 {
        WALLPAPERUI_TRACE_BEGIN;
 
@@ -1311,22 +1225,19 @@ void wallpaper_preview_main()
     elm_image_fill_outside_set(preview_image, EINA_TRUE);
     elm_image_preload_disabled_set(preview_image, EINA_TRUE);
     elm_object_part_content_set(preveiw_main_layout, "preview", preview_image);
-    edje_object_signal_callback_add(_EDJ(preveiw_main_layout), "preview_clicked", "edj", _preview_clicked_cb, (void *)ad);
+    edje_object_signal_callback_add(_EDJ(preveiw_main_layout), "preview_clicked", "edj", _preview_clicked_cb, ad->navi_bar);
     elm_object_part_content_unset(preveiw_main_layout, "thumblist");
     evas_object_show(preveiw_main_layout);
 
        Elm_Object_Item *navi_item = elm_naviframe_item_push(ad->navi_bar, NULL, NULL, NULL, preveiw_main_layout, NULL);
-       elm_naviframe_item_title_visible_set(navi_item, EINA_FALSE);
-
+       elm_naviframe_item_title_enabled_set (navi_item, EINA_FALSE, EINA_FALSE);
        WALLPAPERUI_TRACE_END;
 }
 
-
 HAPI void wallpaper_main_create_view(void *data)
 {
        WALLPAPERUI_TRACE_BEGIN;
        char *value = NULL;
-       char *from = NULL;
 
        state_data.flag_edit_click = EINA_FALSE;
        state_data.flag_changed = EINA_FALSE;
@@ -1525,7 +1436,6 @@ static void _wallpaper_show_focus_highlight(int selected_index)
 static void _wallpaper_on_item_selected(void *data, Evas_Object *obj, void *event_info)
 {
        WALLPAPERUI_TRACE_BEGIN;
-       Thumbnail *temp_item = NULL;
        Thumbnail *item = (Thumbnail *)data;
 
        if (item == NULL) {
@@ -1582,10 +1492,9 @@ static Evas_Object *main_gengrid_add(Evas_Object *parent, void *data)
        evas_object_size_hint_align_set(ad->gengrid, EVAS_HINT_FILL, EVAS_HINT_FILL);
        elm_gengrid_align_set(ad->gengrid, 0.0, 1.0);
        elm_gengrid_horizontal_set(ad->gengrid, EINA_TRUE);
-       elm_gengrid_bounce_set(ad->gengrid, EINA_FALSE, EINA_FALSE);
+       elm_scroller_bounce_set(ad->gengrid, EINA_FALSE, EINA_FALSE);
        elm_gengrid_multi_select_set(ad->gengrid, EINA_FALSE);
        elm_object_style_set(ad->gengrid, "no_effect");
-
        elm_gengrid_select_mode_set(ad->gengrid, ELM_OBJECT_SELECT_MODE_ALWAYS);
 
        /*int iw, ih;
@@ -1681,104 +1590,10 @@ static Evas_Object *main_gengrid_add(Evas_Object *parent, void *data)
        return ad->gengrid;
 }
 
-static void _service_imageviewer_ug_result_cb(app_control_h request, app_control_h reply, app_control_result_e result, void *data)
-{
-       WALLPAPERUI_TRACE_BEGIN;
-       if (result == APP_CONTROL_RESULT_SUCCEEDED) {
-               char **path_array = NULL;
-               int array_length = 0;
-               int j = 0;
-
-               if (app_control_get_extra_data_array(reply, "http://tizen.org/appcontrol/data/selected", &path_array, &array_length) == APP_CONTROL_ERROR_NONE) {
-               WALLPAPERUI_DBG("array_length = %d", array_length);
-
-               for (j = 0; j < array_length; j++) {
-                       WALLPAPERUI_DBG("path_array[%d] = %s", j, path_array[j]);
-               }
-
-               if (!strstr(path_array[0], ".png") && !strstr(path_array[0], ".jpg")) {
-                       WALLPAPERUI_DBG("Do not edit the image!");
-                       return;
-               }
-
-               if (path_array[0]) {
-                       memset(ad->saved_img_path, 0, sizeof(ad->saved_img_path));
-                       strcpy(ad->saved_img_path[0], path_array[0]);
-
-                       elm_image_file_set(ad->preview_image, path_array[0], NULL);
-
-                       /*set home icon in main */
-                       state_data.flag_changed = EINA_TRUE;
-
-               } else if (path_array[0] && array_length > 1) {
-                       memset(ad->saved_img_path[0], 0, sizeof(ad->saved_img_path[0]));
-                       strcpy(ad->saved_img_path[0], path_array[0]);
-                       WALLPAPERUI_DBG("ad->saved_img_path[%d] = %s", 0, ad->saved_img_path[0]);
-
-                       state_data.flag_changed = EINA_TRUE;
-               }
-
-               int i = 0;
-               for (i = 0; i < array_length; i++) {
-                       if (path_array[i]) {
-                               free(path_array[i]);
-                               path_array[i] = NULL;
-                       }
-               }
-               _done_button_cb();
-               }
-       }
-
-       WALLPAPERUI_TRACE_END;
-}
-
-static void _edit_clicked_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
-{
-       WALLPAPERUI_TRACE_BEGIN;
-
-       Thumbnail *item = NULL;
-       Elm_Object_Item *object_item = NULL;
-       Evas_Object *win = NULL;
-
-
-       feedback_play_type(FEEDBACK_TYPE_SOUND, FEEDBACK_PATTERN_TAP);
-
-       WALLPAPERUI_DBG("1 flag_edit_click=%d", state_data.flag_edit_click);
-
-       if (ad->preview_image_type == WALLPAPER_TYPE_DEFAULT || state_data.flag_edit_click == EINA_FALSE) {
-               WALLPAPERUI_DBG("DEFAULT TYPE NOT SUPPORT PREVIEW");
-               return;
-       }
-
-       app_control_h pService;
-       app_control_create(&pService);
-       app_control_set_operation(pService, "http://tizen.org/appcontrol/operation/image/crop");
-       app_control_set_app_id(pService, "image-viewer-efl");
-/*     app_control_set_uri(pService, lock_path[current_index]); */
-
-
-       object_item = elm_gengrid_first_item_get(ad->gengrid);
-       while (object_item) {
-               item = (Thumbnail *)elm_object_item_data_get(object_item);
-               if (item->path && item->bSelected) {
-                       WALLPAPERUI_DBG("path=%s", item->path);
-                       app_control_set_uri(pService, item->path);
-               }
-               object_item = elm_gengrid_item_next_get(object_item);
-       }
-
-       app_control_add_extra_data(pService, "http://tizen.org/appcontrol/data/image/crop_mode", "fit_to_screen");
-       win = (Evas_Object *)ug_get_window();
-    app_control_set_launch_mode(pService, APP_CONTROL_LAUNCH_MODE_GROUP);
-       app_control_send_launch_request(pService, _service_imageviewer_ug_result_cb, data);
-       app_control_destroy(pService);
-
-       WALLPAPERUI_TRACE_END;
-}
-
-static void _preview_clicked_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
+static void _preview_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
 {
        WALLPAPERUI_TRACE_BEGIN;
+       Evas_Object *navi_bar = (Evas_Object *)data;
 
        if (state_data.flag_edit_click) {
                WALLPAPERUI_DBG("flag_edit_click=%d", state_data.flag_edit_click);
@@ -1788,7 +1603,7 @@ static void _preview_clicked_cb(void *data, Evas *evas, Evas_Object *obj, void *
 
        feedback_play_type(FEEDBACK_TYPE_SOUND, FEEDBACK_PATTERN_TAP);
 
-       elm_naviframe_item_pop(ad->navi_bar);
+       elm_naviframe_item_pop(navi_bar);
 
        WALLPAPERUI_TRACE_END;
 }
index c0af842..af136dc 100755 (executable)
 #include <fcntl.h>
 //#include <dbus/dbus.h>
 #include <app_control_internal.h>
+#include <feedback.h>
 
 #include "wallpaper-ui-service.h"
 #include "wallpaper-ui-service-main.h"
 
-
 static bool flag_view_exist = false;
 
 #define DBUS_HOME_BUS_NAME "org.tizen.coreapps.home"
@@ -129,23 +129,6 @@ static bool _wallpaper_db_destroy(void)
        return true;
 }
 
-static void _reply_to_sender(void *data, int result)
-{
-       WALLPAPERUI_TRACE_BEGIN;
-       ret_if(data == NULL);
-
-       wallpaper_ui_service_appdata *ad = (wallpaper_ui_service_appdata *)data;
-
-       app_control_h svc;
-
-       if (app_control_create(&svc) == 0) {
-               WALLPAPERUI_DBG("reply to caller :: app_control_reply_to_launch_request(%d)", result);
-               app_control_reply_to_launch_request(svc, ad->service, result);
-               app_control_destroy(svc);
-       }
-    WALLPAPERUI_TRACE_END;
-}
-
 static void _del_win(void *data, Evas_Object *obj, void *event)
 {
        WALLPAPERUI_TRACE_BEGIN;
@@ -153,24 +136,6 @@ static void _del_win(void *data, Evas_Object *obj, void *event)
        ui_app_exit();
 }
 
-static void _win_rot_changed_cb(void *data, Evas_Object *obj, void *event)
-{
-       WALLPAPERUI_TRACE_BEGIN;
-       int changed_ang = elm_win_rotation_get(obj);
-
-       switch (changed_ang) {
-               case APP_DEVICE_ORIENTATION_0:
-                       break;
-               case APP_DEVICE_ORIENTATION_90:
-                       break;
-               case APP_DEVICE_ORIENTATION_180:
-                       break;
-               case APP_DEVICE_ORIENTATION_270:
-                       break;
-       }
-       WALLPAPERUI_TRACE_END;
-}
-
 static Evas_Object *_create_win(const char *name, bool transparent)
 {
        WALLPAPERUI_TRACE_BEGIN;
@@ -199,7 +164,6 @@ static Evas_Object *_create_win(const char *name, bool transparent)
                evas_object_resize(eo, w, h);
 
                if (transparent) {
-                       _disable_effect(eo);
                        elm_win_indicator_mode_set(eo, ELM_WIN_INDICATOR_HIDE);
                } else {
                        elm_win_indicator_mode_set(eo, ELM_WIN_INDICATOR_SHOW);
@@ -257,7 +221,7 @@ static Evas_Object *_create_main_layout(Evas_Object *win, const char *edj_path,
        return layout;
 }
 
-HAPI int wallpaper_ui_service_copy_wallpaper_file(char *source, char *destination)
+HAPI int wallpaper_ui_service_copy_wallpaper_file(const char *source, char *destination)
 {
        WALLPAPERUI_TRACE_BEGIN;
 
@@ -617,7 +581,7 @@ static void _app_reset(app_control_h service, void *data)
     ad->win = _create_win("org.tizen.setting.wallpaper-ui-service", bTransparent);
     if (ad->win == NULL) {
         WALLPAPERUI_DBG("Can't create window");
-        return FALSE;
+        return;
     }
 
     flag_view_exist = false;
@@ -652,10 +616,6 @@ static void update_text(void *data)
        wallpaper_ui_service_appdata *ad = (wallpaper_ui_service_appdata *) data;
        ret_if(ad == NULL);
 
-       Evas_Object *cancel_button;
-       Evas_Object *done_button;
-       Evas_Object *obj;
-
        if (ad->main_nf_it) {
                elm_object_item_text_set(ad->main_nf_it, APP_STRING("IDS_LCKSCN_MBODY_WALLPAPERS"));
                Evas_Object *cancel_button = elm_object_item_part_content_get(ad->main_nf_it, "title_left_text_btn");