Resolve warnings in compilation 25/50425/1
authorPrakash <prakashc.p@samsung.com>
Wed, 28 Oct 2015 12:14:22 +0000 (17:44 +0530)
committerPrakash <prakashc.p@samsung.com>
Wed, 28 Oct 2015 12:14:22 +0000 (17:44 +0530)
Change-Id: I3e4f738b9774540f3b192d8b8f941ecda4b2b3ae
Signed-off-by: Prakash <prakashc.p@samsung.com>
src/common/mp-ug-launch.c
src/view/mp-player-view.c

index eec47f7dadc84cd36378bb6c467f237747bdacce..d232bcb18d828338250cc1cc9e2fd5be729bfc4d 100755 (executable)
@@ -214,9 +214,9 @@ mp_ug_gallery_get_picture(void *data)
                ERROR_TRACE("app_control_create() is failed !!");
                return -1;
        }
-
+/*
        app_control_set_window(svc_handle, elm_win_xwindow_get(ad->win_main));
-
+*/
        int a, b;
 
        evas_object_geometry_get(ad->win_main, NULL, NULL, &a, &b);
@@ -284,9 +284,9 @@ mp_ug_camera_take_picture(void *data)
                ERROR_TRACE("app_control_create() is failed !!");
                return -1;
        }
-
+/*
        app_control_set_window(svc_handle, elm_win_xwindow_get(ad->win_main));
-
+*/
        int a, b;
 
        evas_object_geometry_get(ad->win_main, NULL, NULL, &a, &b);
@@ -332,12 +332,12 @@ int
 mp_ug_contact_user_sel(const char *filepath, void *user_data)
 {
        startfunc;
-       struct appdata *ad = NULL;
+       //struct appdata *ad = NULL;
        app_control_h service = NULL;
         int err = 0;
 
        mp_retvm_if (filepath == NULL, -1, "file path is NULL");
-       ad = mp_util_get_appdata();
+       //ad = mp_util_get_appdata();
 
        if (app_control_create(&service) != APP_CONTROL_ERROR_NONE)
        {
@@ -373,7 +373,7 @@ mp_ug_contact_user_sel(const char *filepath, void *user_data)
                app_control_destroy(service);
                return -1;
        }
-
+/*
         err = app_control_set_window(service, ad->xwin);
         if (err != APP_CONTROL_ERROR_NONE)
        {
@@ -381,7 +381,7 @@ mp_ug_contact_user_sel(const char *filepath, void *user_data)
                app_control_destroy(service);
                return -1;
        }
-
+*/
         err = app_control_send_launch_request(service, _mp_ug_contact_reply_cb, NULL);
         if (err != APP_CONTROL_ERROR_NONE)
        {
@@ -403,13 +403,13 @@ int
 mp_ug_set_as_alarm_tone(const char *filepath, int position)
 {
        startfunc;
-       struct appdata *ad = NULL;
+       //struct appdata *ad = NULL;
        app_control_h service = NULL;
         int err = 0;
         char *pos = NULL;
 
        mp_retvm_if (filepath == NULL, -1, "file path is NULL");
-       ad = mp_util_get_appdata();
+       //ad = mp_util_get_appdata();
 
        if (app_control_create(&service) != APP_CONTROL_ERROR_NONE)
        {
@@ -462,7 +462,7 @@ mp_ug_set_as_alarm_tone(const char *filepath, int position)
                app_control_destroy(service);
                return -1;
        }
-
+/*
         err = app_control_set_window(service, ad->xwin);
         if (err != APP_CONTROL_ERROR_NONE)
        {
@@ -470,7 +470,7 @@ mp_ug_set_as_alarm_tone(const char *filepath, int position)
                app_control_destroy(service);
                return -1;
        }
-
+*/
         err = app_control_send_launch_request(service, NULL, NULL);
         if (err != APP_CONTROL_ERROR_NONE)
        {
@@ -539,12 +539,13 @@ mp_send_via_appcontrol(struct appdata *ad, mp_send_type_e send_type, const char
        }
 
        /* set window */
+/*
        ret = app_control_set_window(service, ad->xwin);
        if (ret != APP_CONTROL_ERROR_NONE) {
                mp_error("app_control_set_window()... [0x%x]", ret);
                goto END;
        }
-
+*/
        ret = app_control_send_launch_request(service, NULL, NULL);
        if (ret != APP_CONTROL_ERROR_NONE) {
                mp_error("app_control_send_launch_request()... [0x%x]", ret);
@@ -567,7 +568,7 @@ mp_setting_privacy_launch(void)
 {
        startfunc;
 
-       struct appdata *ad = mp_util_get_appdata();
+       //struct appdata *ad = mp_util_get_appdata();
 
        bool result = false;
 
@@ -585,12 +586,13 @@ mp_setting_privacy_launch(void)
        }
 
        /* set window */
+/*
        ret = app_control_set_window(service, ad->xwin);
        if (ret != APP_CONTROL_ERROR_NONE) {
                mp_error("app_control_set_window()... [0x%x]", ret);
                goto END;
        }
-
+*/
        ret = app_control_send_launch_request(service, NULL, NULL);
        if (ret != APP_CONTROL_ERROR_NONE) {
                mp_error("app_control_send_launch_request()... [0x%x]", ret);
@@ -610,8 +612,8 @@ _mp_ug_launch_as_appcontrol(const char *ug_name)
 {
        MP_CHECK_FALSE(ug_name);
 
-       struct appdata *ad = mp_util_get_appdata();
-       MP_CHECK_FALSE(ad);
+       //struct appdata *ad = mp_util_get_appdata();
+       //MP_CHECK_FALSE(ad);
 
        bool result = false;
 
@@ -629,12 +631,13 @@ _mp_ug_launch_as_appcontrol(const char *ug_name)
        }
 
        /* set window */
+/*
        ret = app_control_set_window(service, ad->xwin);
        if (ret != APP_CONTROL_ERROR_NONE) {
                mp_error("app_control_set_window()... [0x%x]", ret);
                goto END;
        }
-
+*/
        ret = app_control_send_launch_request(service, NULL, NULL);
        if (ret != APP_CONTROL_ERROR_NONE) {
                mp_error("app_control_send_launch_request()... [0x%x]", ret);
index 1b68c147a13dad5f5372475cf8f1a98d3ce5d805..a0db283412f42763846119e640bc12ab85012deb 100755 (executable)
@@ -1789,6 +1789,7 @@ _mp_player_view_volume_hw_key_cb(void *user_data, mp_volume_key_e key, bool rele
        }
 }
 
+#ifndef MP_SOUND_PLAYER
 static void _mp_player_view_set_shuffle_image(void *data, int shuffle_state)
 {
        MpPlayerView_t *view = (MpPlayerView_t *)data;
@@ -1804,6 +1805,8 @@ static void _mp_player_view_set_shuffle_image(void *data, int shuffle_state)
        }
        mp_util_domain_translatable_part_text_set(view->player_view_control_layout, "shuffle_text", STR_PLAYER_VIEW_SHUFFLE);
 }
+#endif
+
 /*add favourite begin*/
 static void _mp_player_view_set_favourite_image(void *data, int favourite_state)
 {
@@ -1831,7 +1834,7 @@ static void _mp_player_view_set_favourite_image(void *data, int favourite_state)
 }
 /*add favourite end*/
 
-
+#ifndef MP_SOUND_PLAYER
 static void _mp_player_view_set_rep_image(void *data, int repeat_state)
 {
        MpPlayerView_t *view = (MpPlayerView_t *)data;
@@ -1865,6 +1868,7 @@ static void _mp_player_view_set_rep_image(void *data, int repeat_state)
        }
        mp_util_domain_translatable_part_text_set(view->player_view_control_layout, "repeat_text", STR_PLAYER_VIEW_REPEAT);
 }
+#endif
 
 void mp_player_view_set_play_image(void *data, bool playing)
 {
@@ -2616,6 +2620,43 @@ _mp_player_view_ff_rew_btn_del_cb(void *data, Evas *e, Evas_Object *obj, void *e
        mp_play_control_reset_ff_rew();
 }
 
+static void _mp_player_view_volume_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       DEBUG_TRACE("volume button clicked");
+       MpPlayerView_t *view = (MpPlayerView_t *)data;
+       MP_CHECK(view);
+       mp_player_view_volume_popup_control(view, false);
+}
+
+static void _mp_player_view_play_pause_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       DEBUG_TRACE("play_pause button clicked");
+       struct appdata *ad = mp_util_get_appdata();
+       MP_CHECK(ad);
+
+       MpPlayerView_t *view = (MpPlayerView_t *)data;
+       MP_CHECK(view);
+
+       if (ad->player_state == PLAY_STATE_NONE && ad->music_pos > 0) {
+               DEBUG_TRACE("ad->music_pos = %f", ad->music_pos);
+               ad->start_pos = ad->music_pos * 1000;
+               mp_play_control_play_pause(ad, true);
+               mp_player_view_set_play_image(view, true);
+       } else if (ad->player_state == PLAY_STATE_PLAYING) {
+               mp_play_control_play_pause(ad, false);
+               mp_player_view_set_play_image(view, false);
+       } else {
+               mp_play_control_play_pause(ad, true);
+               /*when player mgr resume failed*/
+               if (ad->player_state != PLAY_STATE_PLAYING) {
+                       mp_player_view_set_play_image(view, false);
+               } else {
+                       mp_player_view_set_play_image(view, true);
+               }
+       }
+}
+
+#ifndef MP_SOUND_PLAYER
 static void _mp_player_view_shuffle_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info)
 {
        DEBUG_TRACE("shuffle button clicked");
@@ -2679,42 +2720,6 @@ static void _mp_player_view_repeat_btn_clicked_cb(void *data, Evas_Object *obj,
        mp_view_mgr_post_event(GET_VIEW_MGR, MP_UPDATE_NOW_PLAYING);
 }
 
-static void _mp_player_view_volume_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info)
-{
-       DEBUG_TRACE("volume button clicked");
-       MpPlayerView_t *view = (MpPlayerView_t *)data;
-       MP_CHECK(view);
-       mp_player_view_volume_popup_control(view, false);
-}
-
-static void _mp_player_view_play_pause_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info)
-{
-       DEBUG_TRACE("play_pause button clicked");
-       struct appdata *ad = mp_util_get_appdata();
-       MP_CHECK(ad);
-
-       MpPlayerView_t *view = (MpPlayerView_t *)data;
-       MP_CHECK(view);
-
-       if (ad->player_state == PLAY_STATE_NONE && ad->music_pos > 0) {
-               DEBUG_TRACE("ad->music_pos = %f", ad->music_pos);
-               ad->start_pos = ad->music_pos * 1000;
-               mp_play_control_play_pause(ad, true);
-               mp_player_view_set_play_image(view, true);
-       } else if (ad->player_state == PLAY_STATE_PLAYING) {
-               mp_play_control_play_pause(ad, false);
-               mp_player_view_set_play_image(view, false);
-       } else {
-               mp_play_control_play_pause(ad, true);
-               /*when player mgr resume failed*/
-               if (ad->player_state != PLAY_STATE_PLAYING) {
-                       mp_player_view_set_play_image(view, false);
-               } else {
-                       mp_player_view_set_play_image(view, true);
-               }
-       }
-}
-
 static void _mp_player_view_prev_btn_pressed_cb(void *data, Evas_Object *obj, void *event_info)
 {
        DEBUG_TRACE("prev button pressed");
@@ -2754,8 +2759,6 @@ static void _mp_player_view_next_btn_clicked_cb(void *data, Evas_Object *obj, vo
                mp_play_control_ff(false, false, true);
 }
 
-
-#ifndef MP_SOUND_PLAYER
 static void _mp_player_view_queue_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info)
 {
        DEBUG_TRACE("queue button clicked");